Bug 847719 - Do not have '--force' option when using 'rhc domain delete'
Do not have '--force' option when using 'rhc domain delete'
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: John (J5) Palmieri
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-13 06:57 EDT by Wei Sun
Modified: 2015-05-14 22:02 EDT (History)
4 users (show)

See Also:
Fixed In Version: rhc-0.97.7-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-17 17:29:13 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 Wei Sun 2012-08-13 06:57:40 EDT
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:
Comment 1 Clayton Coleman 2012-08-13 17:37:29 EDT
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.
Comment 2 John (J5) Palmieri 2012-08-14 17:46:49 EDT
Catch error and reword for now.
Comment 3 joycezhang 2012-08-15 04:14:43 EDT
This bug will be verified with the build with fix is available.
Comment 4 Wei Sun 2012-08-15 21:59:27 EDT
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.

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