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'
https://github.com/openshift/origin-server/pull/6069
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
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
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
*** Bug 1134581 has been marked as a duplicate of this bug. ***