Bug 847719 - Do not have '--force' option when using 'rhc domain delete'
Summary: Do not have '--force' option when using 'rhc domain delete'
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: John (J5) Palmieri
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-13 10:57 UTC by Wei Sun
Modified: 2015-05-15 02:02 UTC (History)
4 users (show)

Fixed In Version: rhc-0.97.7-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-17 21:29:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Wei Sun 2012-08-13 10:57:40 UTC
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 21:37:29 UTC
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 21:46:49 UTC
Catch error and reword for now.

Comment 3 joycezhang 2012-08-15 08:14:43 UTC
This bug will be verified with the build with fix is available.

Comment 4 Wei Sun 2012-08-16 01:59:27 UTC
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.