Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: Haven't 'set force' option when using 'rhc domain delete' and haven't prompt when using 'rhc domain delete help',but delete a domain containing application,I can get prompt like : Domain contains applications. Delete applications first or set force to true.. Use --trace to view backtrace. Version-Release number of selected component (if applicable): rhc-0.97.5 How reproducible: always Steps to Reproduce: 1.delete a domain containing applications 2.rhc domain delete help 3. Actual results: [wsun@localhost automation]$ rhc domain delete -n wsundev813 Deleting domain 'wsundev813' RESULT: Password: Domain contains applications. Delete applications first or set force to true.. Use --trace to view backtrace. [wsun@localhost automation]$ rhc domain delete help Usage: rhc domain delete <namespace> [--timeout timeout] Destroys your domain and any application underneath it. Use with caution. Options for domain delete --timeout timeout Timeout, in seconds, for the session -n|--namespace namespace Namespace you wish to destroy Global Options --config FILE Path of a different config file --noprompt Bypass first run wizard -l|--rhlogin login Red Hat login (RedHat Network or OpenShift) -p|--password password Red Hat password -d|--debug Turn on debugging -h|--help Display help documentation -v|--version Display version information -t|--trace Display backtrace when an error occurs Expected results: Should have 'set force' option and have prompt in 'rhc domain delete help' Additional info:
We need to catch and handle this message and first display that the domain can't be deleted until the applications are removed. I'm not sure we need to add --force yet, it's too dangerous. They can delete individual apps for now.
Catch error and reword for now.
This bug will be verified with the build with fix is available.
verified on devenv_1995,rhc-0.97.7-1.el6_3.noarch Delete a domain with applications [wsun@localhost ~]$ rhc domain delete -n wsundev816 -d Deleting domain 'wsundev816' Password: D, [2012-08-16T09:55:47.165448 #4272] DEBUG -- : Connecting to https://ec2-174-129-130-66.compute-1.amazonaws.com/broker/rest/api D, [2012-08-16T09:55:49.703145 #4272] DEBUG -- : Finding domain wsundev816 D, [2012-08-16T09:55:49.703208 #4272] DEBUG -- : Getting all domains RESULT: Domain contains applications. Delete applications first.