Bug 1191238 - oo-admin-ctl-app does not accept a 'namespace' option
Summary: oo-admin-ctl-app does not accept a 'namespace' option
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 2.2.0
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: ---
: ---
Assignee: Timothy Williams
QA Contact: libra bugs
URL:
Whiteboard:
: 1134581 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-10 19:36 UTC by Timothy Williams
Modified: 2019-03-22 07:37 UTC (History)
8 users (show)

Fixed In Version: openshift-origin-broker-util-1.34.1.2-1.el6op
Doc Type: Bug Fix
Doc Text:
The oo-admin-ctl-app command did not allow specifying a namespace when performing actions on applications. If two applications owned by the same user under two different domains had the same name, it was impossible to perform actions on one of the applications using oo-admin-ctl-app. This bug fix updates oo-admin-ctl-app to allow the namespace of an application to be specified for actions. As a result, any application can be manipulated using oo-admin-ctl-app, even if another application exists under a different domain for the same user.
Clone Of:
Environment:
Last Closed: 2015-07-21 19:12:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1463 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.6 bug fix and enhancement update 2015-07-21 23:11:33 UTC

Description Timothy Williams 2015-02-10 19:36:28 UTC
Description of problem:
The `oo-admin-ctl-app` command does not allow an administrator to specify a namespace when performing an action on an application. 

If two applications belong to a user, both with the same names but in different domains, an administrator may be unable to make changes to one of the applications.

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

How reproducible:
Always

Steps to Reproduce:
1. Create a user and configure two domains
2. Create an application under each domain, each with the same name.
3. Attempt to run an `oo-admin-ctl-app` action on both applications

Actual results:
All changes are made to a single application

Expected results:
Changes can be made to any application owned by a user.

Additional info:
Example:

Two applications:
  hatest-admin.example.com
  hatest-other.example.com

Was able to set multipler for hatest-admin:

# oo-admin-ctl-app -l admin -a hatest -c set-multiplier --cartridge haproxy-1.4 --multiplier 10
Success

=> #<Application _id: 54d1246daf1c09e54f000037, created_at: 2015-02-03 19:41:33 UTC, updated_at: 2015-02-03 20:49:22 UTC, name: "hatest", canonical_name: "hatest", group_overrides: [{"components"=>[{"comp"=>"web_proxy", "cart"=>"haproxy-1.4", "cart_id"=>"54d0f62baf1c097dc600000d", "min_gears"=>2, "max_gears"=>-1, "multiplier"=>10}, {"comp"=>"ruby-1.9", "cart"=>"ruby-1.9", "cart_id"=>"54d0f62baf1c097dc6000011"}], "min_gears"=>2}], domain_id: "54d121feaf1c09e54f000008", domain_namespace: "admin", owner_id: "54d121faaf1c09e54f000001", builder_id: nil, downloaded_cart_map: nil, default_gear_size: "small", scalable: true, ha: true, init_git_url: nil, analytics: {"user_agent"=>"rhc/1.33.4.1 (ruby 1.8.7; x86_64-linux) (API 1.11.21.31.41.51.61.7) (2.4.0, ruby 1.8.7 (2013-06-27))"}, secret_token: "xxYbKJZoaCi7ZE6zQXKek2OFGseua7Y7QfUDIW3PI2ky1kyyGBcdZb2X-mo4gYH9EB5HwpFXW6vnVidiGlkRhH4yngp3EDF1HWv1WnKi10s8hcNdPSMdAc1En6Fz_to_", config: {"auto_deploy"=>true, "deployment_branch"=>"master", "keep_deployments"=>1, "deployment_type"=>"git"}, meta: nil, _type: "Application

Could not set multiplier for hatest-other:

# oo-admin-ctl-app -l admin -a hatest -c set-multiplier --cartridge haproxy-1.4 --multiplier 10
Success

# oo-admin-ctl-app -l admin -a hatest -c set-multiplier --cartridge haproxy-1.4 --multiplier 10 --gear_uuid 54da5865af1c0907090000a9
Success

=> #<Application _id: 54da5865af1c0907090000a9, created_at: 2015-02-10 19:13:41 UTC, updated_at: 2015-02-10 19:14:16 UTC, name: "hatest", canonical_name: "hatest", group_overrides: [], domain_id: "54da5854af1c0907090000a8", domain_namespace: "other", owner_id: "54d121faaf1c09e54f000001", builder_id: nil, downloaded_cart_map: nil, default_gear_size: "small", scalable: true, ha: false, init_git_url: nil, analytics: {"user_agent"=>"rhc/1.33.4.1 (ruby 1.8.7; x86_64-linux) (API 1.11.21.31.41.51.61.7) (2.4.0, ruby 1.8.7 (2013-06-27))"}, secret_token: "QkTwsCU94EO_-oddDqnxnbBNQXewdgIp5Wpkmd8nA5uKL0LWBkheowdUIVhFIG7k5bdBLq9ApkEXo5NKAoDXs4nUV2S37Zqs2KHHJbXygCqzU1KLRyWmikDNaniyYtNy", config: {"auto_deploy"=>true, "deployment_branch"=>"master", "keep_deployments"=>1, "deployment_type"=>"git"}, meta: nil, _type: "Application">

Could not set multiplier in group_overrides for 'hatest-other'

Comment 2 Timothy Williams 2015-02-10 20:48:43 UTC
https://github.com/openshift/origin-server/pull/6069

Comment 4 openshift-github-bot 2015-05-06 21:09:23 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/4beed00635b2efc2cb23eab924b0930c8673046a
Bug 1191238
Bugzilla Link https://bugzilla.redhat.com/show_bug.cgi?id=1191238
Allow domain to be specified in oo-admin-ctl-app

Comment 7 Ma xiaoqiang 2015-05-08 04:26:14 UTC
Check on puddle [2.2.6/2015-05.07.1]

1. create two apps in the different domain with the same name
#rhc domain create xiaom -l xiaom
#rhc domain create xiama -l xiaom
#rhc app create xiaom1 php-5.4 -s -n xiaom
#rhc app create xiaom1 php-5.4 -n xiama

2. stop the app
# oo-admin-ctl-app -l xiaom -c stop -a xiaom1

3. show the status of apps
# rhc app show --state -a xiaom1
Cartridge haproxy-1.4, php-5.4 is stopped
# rhc app show --state -a xiaom1 -n xiama
Cartridge php-5.4 is started

4, stop the app with -n parameter
# oo-admin-ctl-app -l xiaom -c start -a xiaom1 -n xiaom   
# oo-admin-ctl-app -l xiaom -c stop -a xiaom1 -n xiama

5. show the status of app
# rhc app show --state -a xiaom1 -n xiama 
Cartridge php-5.4 is stopped
# rhc app show --state -a xiaom1 -n xiaom
Cartridge haproxy-1.4, php-5.4 is started

Comment 9 errata-xmlrpc 2015-07-21 19:12:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1463.html

Comment 10 Miciah Dashiel Butler Masters 2015-09-23 17:36:25 UTC
*** Bug 1134581 has been marked as a duplicate of this bug. ***


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