Bug 1121200 - oo-iptables-port-proxy fails unhelpfully if EXTERNAL_ETH_DEV is set incorrectly
Summary: oo-iptables-port-proxy fails unhelpfully if EXTERNAL_ETH_DEV is set incorrectly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Miciah Dashiel Butler Masters
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 1121195
TreeView+ depends on / blocked
 
Reported: 2014-07-18 15:43 UTC by Miciah Dashiel Butler Masters
Modified: 2015-05-14 23:13 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1121195
Environment:
Last Closed: 2014-10-10 00:46:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Miciah Dashiel Butler Masters 2014-07-18 15:43:09 UTC
+++ This bug was initially created as a clone of Bug #1121195 +++

Description of problem:

When EXTERNAL_ETH_DEV is set to a device that has no globally scoped IPv4 address, oo-iptables-port-proxy fails with unhelpful output.


How reproducible:

Completely.


Steps to Reproduce:

1. Install an OpenShift Enterprise PaaS with 1 node.
2. Set EXTERNAL_ETH_DEV=lo in /etc/openshift/node.conf on the node in Step 1.
3. Create a scalable application on the PaaS created in Step 1 using rhc.
4. Look for errors in /var/log/openshift/node/platform.log on the node.


Actual results:

At Step 3, I see the following output:

    $ rhc app create testapp11 php-5.4 -s --no-git
    Application Options
    -------------------
    Domain:     ose
    Cartridges: php-5.4
    Gear Size:  default
    Scaling:    yes
    
    Creating application 'testapp11' ...
    Unable to complete the requested operation due to: An invalid exit code (1) was returned from the server
    node01.hosts.example.com.  This indicates an unexpected problem during the execution of your request.
    Reference ID: 2b9f4f8625fabb40c49f23b27c464df5

At Step 4, I find the following output:

    July 18 15:32:10 INFO openshift-agent: request end: action=cartridge_do, requestid=1861e5525f925e899df4e5fbfe527e34, senderid=broker01.hosts.example.com, statuscode=1, data={:time=>nil, :output=>"System proxy set for 50451=>127.6.206.1:8080 failed(1): stdout: -I rhc-app-comm 1 -d 127.6.206.1 -p tcp --dport 8080 -j ACCEPT -m comment --comment 50451\n-I rhc-app-comm 1 -d 127.6.206.1 -m conntrack --ctstate NEW -m tcp -p tcp --dport 8080 -j ACCEPT -m comment --comment 50451\n-A OUTPUT -d /32 -m tcp -p tcp --dport 50451 -j DNAT --to-destination 127.6.206.1:8080\n stderr: iptables v1.4.7: host/network `' not found\nTry `iptables -h' or 'iptables --help' for more information.\n: uid=3484", :exitcode=>1, :addtl_params=>nil}

This output is unhelpful in identifying the cause of the problem.


Expected results:

A log file under /var/log/openshift/node/ on the node should have a helpful error message.

Comment 1 Miciah Dashiel Butler Masters 2014-07-18 15:46:12 UTC
PR: https://github.com/openshift/origin-server/pull/5622

Comment 2 openshift-github-bot 2014-07-29 23:19:16 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/a9b143829c0b0b0356465238c1b374e133ba117f
oo-iptables-port-proxy: getaddr: check ipaddr

Check that ipaddr is not empty in getaddr and report a helpful error
message if it is.

This commit fixes bug 1121200.

Comment 3 Wenjing Zheng 2014-07-31 07:55:25 UTC
Verified on devenv-stage_937, clear warning displays:
1. Set EXTERNAL_ETH_DEV=lo in /etc/openshift/node.conf;
2. Add proxy with 
$oo-iptables-port-proxy addproxy 30000 127.0.0.1:200
/usr/bin/oo-iptables-port-proxy: line 20: ipaddr: lo has no globally scoped IPv4 address


Note You need to log in before you can comment on or make changes to this bug.