Bug 1121222 - oo-accept-node inconsistently checks for the non-existence of /sbin/ip
Summary: oo-accept-node inconsistently checks for the non-existence of /sbin/ip
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers
Version: 2.1.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Miciah Dashiel Butler Masters
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1121224
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-18 16:51 UTC by Miciah Dashiel Butler Masters
Modified: 2014-08-04 13:27 UTC (History)
7 users (show)

Fixed In Version: openshift-origin-node-util-1.22.14.1-1.el6op
Doc Type: Bug Fix
Doc Text:
If /sbin/ip did not exist, the oo-accept-node script first printed a proper error message in the find_ext_net_dev test, but subsequently failed with an exception and backtrace in the check_node_public_resolution test. This bug fix updates the oo-accept-node script to gracefully handle the exceptions, and the script now prints clearer output when /sbin/ip does not exist.
Clone Of:
: 1121224 (view as bug list)
Environment:
Last Closed: 2014-08-04 13:27:59 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0999 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.1.4 bug fix and enhancement update 2014-08-04 17:26:43 UTC

Description Miciah Dashiel Butler Masters 2014-07-18 16:51:04 UTC
Description of problem:

oo-accept-node inconsistently checks for the non-existence of /sbin/ip in the tests that use it: 
find_ext_net_dev rescues if there is a Errno::ENOENT exception whereas check_node_public_resolution fails ungracefully with an unrescued exception.


How reproducible:

Completely.


Steps to Reproduce:

1. Install an OpenShift Enterprise PaaS with 1 node.

2. Move /sbin/ip to /sbin/ip on the node from Step 1.

3. Run oo-accept-node -v on the node.


Actual results:

At Step 3, oo-accept-node rescues gracefully in the find_ext_net_dev test but subsequently fails ungracefully with an unrescued exception in the check_node_public_resolution test:

    # oo-accept-node -v
    INFO: using default accept-node extensions
    INFO: loading node configuration file /etc/openshift/node.conf
    INFO: loading resource limit file /etc/openshift/resource_limits.conf
    INFO: finding external network device
    FAIL: SEVERE: could not find ip command (/sbin/ip).
    INFO: checking node public hostname resolution
    /usr/sbin/oo-accept-node:318:in ``': No such file or directory - /sbin/ip addr show scope global (Errno::ENOENT)
            from /usr/sbin/oo-accept-node:318:in `check_node_public_resolution'
            from /usr/sbin/oo-accept-node:914:in `<main>'
    #


Expected results:

At Step 3, oo-accept-node should always gracefully handle Errno::ENOENT errors:

    # oo-accept-node -v
    INFO: using default accept-node extensions
    INFO: loading node configuration file /etc/openshift/node.conf
    INFO: loading resource limit file /etc/openshift/resource_limits.conf
    INFO: finding external network device
    FAIL: SEVERE: could not find ip command (/sbin/ip).
    INFO: checking node public hostname resolution
    FAIL: SEVERE: could not find ip command (/sbin/ip).
    INFO: checking selinux status
    INFO: checking selinux openshift-origin policy
    INFO: checking selinux booleans
    INFO: checking package list
    INFO: checking services
    INFO: checking kernel semaphores >= 512
    INFO: checking cgroups configuration
    INFO: checking cgroups processes
    INFO: find district uuid: 538646d0eaa253c5da000001
    INFO: determining node uid range: 1000 to 6999
    INFO: traffic control not enabled in /etc/openshift/node.conf, set TRAFFIC_CONTROL_ENABLED=true to enable
    INFO: checking filesystem quotas
    INFO: checking quota db file selinux label
    INFO: checking 5 user accounts
    INFO: checking application dirs
    INFO: checking system httpd configs
    INFO: checking cartridge repository
    2 ERRORS
    #

Comment 1 Miciah Dashiel Butler Masters 2014-07-22 20:22:50 UTC
PR: https://github.com/openshift/enterprise-server/pull/335

Comment 4 Anping Li 2014-07-25 12:16:39 UTC
Verified and pass on puddle-2-1-2014-07-24
The error was reported rather than exception.

[root@nd218 ~]# oo-accept-node -v
INFO: using default accept-node extensions
INFO: loading node configuration file /etc/openshift/node.conf
INFO: loading resource limit file /etc/openshift/resource_limits.conf
INFO: finding external network device
FAIL: SEVERE: could not find ip command (/sbin/ip).
INFO: checking that external network device has a globally scoped IPv4 address
FAIL: SEVERE: could not find ip command (/sbin/ip).
INFO: checking node public hostname resolution
FAIL: SEVERE: could not find ip command (/sbin/ip).
INFO: checking selinux status
INFO: checking selinux openshift-origin policy
INFO: checking selinux booleans
INFO: checking package list
INFO: checking services
INFO: checking kernel semaphores >= 512
INFO: checking cgroups configuration
INFO: checking cgroups processes
INFO: find district uuid: 53d22eaa791610df71000001
INFO: determining node uid range: 1000 to 1009
INFO: traffic control not enabled in /etc/openshift/node.conf, set TRAFFIC_CONTROL_ENABLED=true to enable
INFO: checking filesystem quotas
INFO: checking quota db file selinux label
INFO: checking 0 user accounts
INFO: checking application dirs
INFO: checking system httpd configs
INFO: checking cartridge repository
3 ERRORS

Comment 6 errata-xmlrpc 2014-08-04 13:27:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0999.html


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