Bug 901424 - Should return correct error message when running mco commands in user's shell
Summary: Should return correct error message when running mco commands in user's shell
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Rob Millner
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-18 07:26 UTC by Meng Bo
Modified: 2015-05-14 23:04 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-09 02:32:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
mco_devenv_log (14.14 KB, text/plain)
2013-01-18 07:27 UTC, Meng Bo
no flags Details

Description Meng Bo 2013-01-18 07:26:11 UTC
Description of problem:
When running mco commands from user's shell, it will return error message "Failed to generate application list: RuntimeError: Cannot find config file '/etc/mcollective/client.cfg'". Since user should not have permission to run the mco command, so it should return error messages like "Permission Denial" or "Command not found" instead.

Version-Release number of selected component (if applicable):
INT(devenv_2686) and STAGE(devenv-stage_272)

How reproducible:
always

Steps to Reproduce:
1.Create app on INT
2.SSH login to the app
3.Run mco commands
$mco ping
$mco 
  
Actual results:
[perl1-bmengc9int.int.rhcloud.com ~]\> mco ping
Failed to generate application list: RuntimeError: Cannot find config file '/etc/mcollective/client.cfg'


Expected results:
Error message like "Permission Denial" or "Command not found" should be shown.

Additional info:

Comment 1 Meng Bo 2013-01-18 07:27:11 UTC
Created attachment 682188 [details]
mco_devenv_log

The mco commands can be ran successfully on devenv with some error messages. Since it cannot be ran on STG and INT, so we don't report the devenv only issue.

If it is also should not be ran on devenv, I will raise separate bug to track.

Attach the devenv result log to compare.

Comment 2 openshift-github-bot 2013-02-28 04:05:01 UTC
Commit pushed to master at https://github.com/openshift/li

https://github.com/openshift/li/commit/6950555d511f8b28e2187596e6ad68b9988aae39
Bug 901424 - client.cfg should have same perms as on int/stg/prod.

Comment 3 openshift-github-bot 2013-02-28 04:05:06 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/2ba5129a9e07ae500bc28474b4d6a0a52a8d242c
Bug 901424 - Hide the mco command.

Comment 4 Rob Millner 2013-03-01 00:24:01 UTC
Preventing gear users from accessing the client and server configurations is the appropriate way to stop end-users from accessing our mcollective instance.  It doesn't matter if they can run the mco command.

The rhcsh returns permission denied for "mco".

Comment 5 Meng Bo 2013-03-01 02:07:57 UTC
Checked on devenv_2877, issue has been fixed.

[app1-bmeng1.dev.rhcloud.com ~]\> mco ping
mco: Permission denied
[app1-bmeng1.dev.rhcloud.com ~]\> mco
mco: Permission denied

Move bug to verified.


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