Bug 990382 - No error message is given if wrong gear_uuid is used for "oo-pam-enable / oo-pam-disable"
No error message is given if wrong gear_uuid is used for "oo-pam-enable / oo...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Michal Fojtik
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-31 01:59 EDT by Qiushui Zhang
Modified: 2015-05-14 19:25 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:48:55 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 Qiushui Zhang 2013-07-31 01:59:10 EDT
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 09:46:06 EDT
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 05:37:01 EDT
(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-15 23:39:21 EDT
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-18 22:02:02 EDT
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-20 23:38:42 EDT
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.