Bug 990382 - No error message is given if wrong gear_uuid is used for "oo-pam-enable / oo-pam-disable"
Summary: No error message is given if wrong gear_uuid is used for "oo-pam-enable / oo...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Michal Fojtik
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-31 05:59 UTC by Qiushui Zhang
Modified: 2015-05-14 23:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-29 12:48:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Qiushui Zhang 2013-07-31 05:59:10 UTC
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:

Comment 1 Michal Fojtik 2013-08-14 13:46:06 UTC
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 :)

Comment 2 Xiaoli Tian 2013-08-15 09:37:01 UTC
(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.

Comment 3 Liang Xia 2013-08-16 03:39:21 UTC
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

Comment 4 Qiushui Zhang 2013-08-19 02:02:02 UTC
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

Comment 5 Qiushui Zhang 2013-08-21 03:38:42 UTC
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.


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