Description of problem: On instance, oo-pam-enable / oo-pam-disable gives no error messages for wrong input, like unexisted gear_uuid. Version-Release number of selected component (if applicable): devenv_3588 How reproducible: always Steps to Reproduce: 1. Log on instance 2. Run oo-pam-enable -c 123456789 3. echo $? Actual results: The return code is "0". No error message is given. Similar to oo-pam-disable. Expected results: If gear_uuid not existed, a message should be given to let user know. Additional info:
Hi Qiushui, I created a pull request with fix for this bug: https://github.com/openshift/origin-server/pull/3351 Let me know if this fix your problem :)
(In reply to Michal Fojtik from comment #1) > Hi Qiushui, > > I created a pull request with fix for this bug: > > https://github.com/openshift/origin-server/pull/3351 > > Let me know if this fix your problem :) Hi, Michal Your pull request needs to be merged before it could be tested, thanks.
Tested on devenv_3659. When enable an non-exist gear_uuid with oo-pam-enable, no errors, and a file named 84-<uuid>.conf is created under /etc/security/limits.d/ (actually it is better to show user an error message and this file should not be created) Then use oo-pam-disalbe, the file is removed, still no errors. # ls -lh /etc/security/limits.d/ -rw-r--r--. 1 root root 188 Aug 15 21:48 90-nofile.conf -rw-r--r--. 1 root root 191 Oct 15 2012 90-nproc.conf # oo-pam-enable -c 123456 # ls -lh /etc/security/limits.d/ -rw-r--r--. 1 root root 189 Aug 15 23:23 84-123456.conf -rw-r--r--. 1 root root 188 Aug 15 21:48 90-nofile.conf -rw-r--r--. 1 root root 191 Oct 15 2012 90-nproc.conf # oo-pam-disable -c 123456 # ls -lh /etc/security/limits.d/ -rw-r--r--. 1 root root 188 Aug 15 21:48 90-nofile.conf -rw-r--r--. 1 root root 191 Oct 15 2012 90-nproc.conf
Hi Michal Fojtik, I check on the lastest devenv 3671. The code is still not there. Could you please have it checked in when it is convenient for yor? Thanks a lot, Walter
Tested on devenv_3680. [root@ip-10-204-134-218 pkg]# /usr/bin/oo-pam-enable -c 250 ERROR: Unable to find specified container (250) [root@ip-10-204-134-218 pkg]# ls /etc/security/limits.d/ 84-329054891521899837259776.conf 84-421511901293871789768704.conf 84-5214248f246e42093400000a.conf 84-760522986791039401984000.conf 84-f58521f80a0811e3ba6612313b0a852c.conf 90-nproc.conf 84-384484385965908019904512.conf 84-52141f57246e420934000001.conf 84-572490319380036452352000.conf 84-e3ee8cac0a0511e3af8912313b0a852c.conf 90-nofile.conf [root@ip-10-204-134-218 pkg]# /usr/bin/oo-pam-disable -c 250 ERROR: Unable to find specified container (250) [root@ip-10-204-134-218 pkg]# ls /etc/security/limits.d/ 84-329054891521899837259776.conf 84-421511901293871789768704.conf 84-5214248f246e42093400000a.conf 84-760522986791039401984000.conf 84-f58521f80a0811e3ba6612313b0a852c.conf 90-nproc.conf 84-384484385965908019904512.conf 84-52141f57246e420934000001.conf 84-572490319380036452352000.conf 84-e3ee8cac0a0511e3af8912313b0a852c.conf 90-nofile.conf [root@ip-10-204-134-218 pkg]# Mark it as verified.