Bug 999460 - Met 'RangeError' to execute oo-accept-node while deleting one record from /etc/passwd
Met 'RangeError' to execute oo-accept-node while deleting one record from /e...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
All All
medium Severity medium
: ---
: ---
Assigned To: Rob Millner
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-21 07:08 EDT by zhaozhanqi
Modified: 2015-05-14 19:26 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-29 08:54:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description zhaozhanqi 2013-08-21 07:08:21 EDT
Description of problem:
there are one app existing in instance. ssh into instance and delete this app user record from file '/etc/passwd'. And then run 'oo-accept-node -v'

INFO: checking 20 user accounts
INFO: checking application dirs
/usr/sbin/oo-accept-node:140:in `getpwuid': bignum too big to convert into `unsigned long' (RangeError)
	from /usr/sbin/oo-accept-node:140:in `user_fail'
	from /usr/sbin/oo-accept-node:711:in `block in check_app_dirs'
	from /usr/sbin/oo-accept-node:692:in `foreach'
	from /usr/sbin/oo-accept-node:692:in `check_app_dirs'
	from /usr/sbin/oo-accept-node:838:in `<main>'


Version-Release number of selected component (if applicable):
devenv_3680

How reproducible:
always

Steps to Reproduce:
1. create one app for example uuid =992119267718510338375680
2. delete this app record from /etc/passwd
3. run 'oo-accept-node -v'

Actual results:
[root@ip-10-196-218-191 openshift]# oo-accept-node -v
INFO: loading node configuration file /etc/openshift/node.conf
INFO: loading resource limit file /etc/openshift/resource_limits.conf
INFO: finding external network device
INFO: checking node public hostname resolution
INFO: checking selinux status
INFO: checking selinux openshift-hosted policy
INFO: checking selinux booleans
INFO: checking selinux nodes
INFO: checking package list
INFO: checking services
INFO: checking kernel semaphores >= 512
INFO: checking cgroups configuration
INFO: checking cgroups processes
FAIL: Process 15727 is owned by a gear that's no longer on the system, uid: 5455
FAIL: Process 15753 is owned by a gear that's no longer on the system, uid: 5455
FAIL: Process 18491 is owned by a gear that's no longer on the system, uid: 5455
FAIL: Process 18715 is owned by a gear that's no longer on the system, uid: 5455
INFO: checking presence of tc qdisc
INFO: checking for cgroup filter
INFO: checking presence of tc classes
INFO: checking filesystem quotas
INFO: checking quota db file selinux label
INFO: checking 20 user accounts
INFO: checking application dirs
/usr/sbin/oo-accept-node:140:in `getpwuid': bignum too big to convert into `unsigned long' (RangeError)
	from /usr/sbin/oo-accept-node:140:in `user_fail'
	from /usr/sbin/oo-accept-node:711:in `block in check_app_dirs'
	from /usr/sbin/oo-accept-node:692:in `foreach'
	from /usr/sbin/oo-accept-node:692:in `check_app_dirs'
	from /usr/sbin/oo-accept-node:838:in `<main>'


Expected results:

No this error

Additional info:
Comment 1 Rob Millner 2013-08-21 14:34:12 EDT
Pull request:
https://github.com/openshift/origin-server/pull/3454
Comment 2 openshift-github-bot 2013-08-21 15:53:33 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/d7eb986cb3deb0b91dfc8a6cca06d161a56ccd44
Bug 999460 - Trap range error on large, all numeric UUIDs for the test to see if the UUID is really a UID.
Comment 3 zhaozhanqi 2013-08-21 23:12:40 EDT
Tested this issue on devenv_stage_448, it has been fixed

1) delete user record 479428171624072284733440 from /etc/passwd

2) oo-accept-node 

[root@ip-10-40-25-14 openshift]# oo-accept-node -v
INFO: loading node configuration file /etc/openshift/node.conf
INFO: loading resource limit file /etc/openshift/resource_limits.conf
INFO: finding external network device
INFO: checking node public hostname resolution
INFO: checking selinux status
INFO: checking selinux openshift-hosted policy
INFO: checking selinux booleans
INFO: checking selinux nodes
INFO: checking package list
INFO: checking services
INFO: checking kernel semaphores >= 512
INFO: checking cgroups configuration
INFO: checking cgroups processes
INFO: checking presence of tc qdisc
INFO: checking for cgroup filter
INFO: checking presence of tc classes
INFO: checking filesystem quotas
INFO: checking quota db file selinux label
INFO: checking 0 user accounts
INFO: checking application dirs
FAIL: directory 479428171624072284733440 doesn't have an associated user
INFO: checking system httpd configs
FAIL: httpd config references UUID without associated gear: '479428171624072284733440'
INFO: checking cartridge repository
2 ERRORS
[root@ip-10-40-25-14 openshift]# which oo-accept-node
/usr/sbin/oo-accept-node

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