Description of problem: The system_proxy_delete and system_proxy_set methods of OpenShift::Runtime::FrontendProxyServer each return three values: two IO objects (possibly nil) for stdout and stderr and an integer with the exit status of the oo-iptables-port-proxy command that these methods execute. However, these three values are returned in inconsistent orderings: Normally, each method returns its values in the aforementioned ordering (stdout, stderr, exit status), but if either of the methods is given no arguments, it returns the values in a different order (exit status, nil, nil): https://github.com/openshift/origin-server/blob/f838ad7a30cd7c042aa66391b4929d8c56d460db/node/lib/openshift-origin-node/model/frontend_proxy.rb#L227-L229 https://github.com/openshift/origin-server/blob/f838ad7a30cd7c042aa66391b4929d8c56d460db/node/lib/openshift-origin-node/model/frontend_proxy.rb#L253-L255 In addition, the related test cases also have the wrong ordering: https://github.com/openshift/origin-server/blob/f838ad7a30cd7c042aa66391b4929d8c56d460db/node/test/unit/frontend_proxy_test.rb#L239 https://github.com/openshift/origin-server/blob/f838ad7a30cd7c042aa66391b4929d8c56d460db/node/test/unit/frontend_proxy_test.rb#L261 How reproducible: No known reproducer, but the code violates its contract. Actual results: The return values are ordered inconsistently, depending on the arguments to the methods. Expected results: The return values should be ordered consistently, and the tests should reflect this.
PR: https://github.com/openshift/origin-server/pull/5625
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/36b405cc29c13e56c6baa9327e598ea396b794a0 Fix frontend system_proxy_delete/system_proxy_set OpenShift::Runtime::FrontendProxyServer#system_proxy_delete and OpenShift::Runtime::FrontendProxyServer#system_proxy_set: Return values in a consistent ordering (stdout, stderr, exit status) irrespective of whether arguments were passed. Previously, these methods returned the exit status as the first value instead of the last if no arguments were provided. Fix the corresponding test cases to expect the correct ordering. This commit fixes bug 1121238.
Cannot get the stat with missing arguments during system_proxy_set and system_proxy_detele. Do some regression testing related to the scalable app creation and oo-iptables-port-proxy, no new issue found. Move bug to verified.