+++ 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.
PR: https://github.com/openshift/origin-server/pull/5622
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.
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