Bug 1028963

Summary: Improper errors message when deleting domains which contains applications via rhc.
Product: OpenShift Online Reporter: Liang Xia <lxia>
Component: ocAssignee: Jordan Liggitt <jliggitt>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.xCC: jliggitt
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-24 03:29:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Liang Xia 2013-11-11 11:10:43 UTC
Description of problem:
When deleting domains which contains applications via rhc, it will show:
Domain contains applications. Delete applications first or set force to true.
Actually, we can not 'set force' via rhc. 

Version-Release number of selected component (if applicable):
devenv_4016
rhc 1.17.2

How reproducible:
always

Steps to Reproduce:
1.Create a domain.
2.Create an app.
3.Delete the domain via rhc.

Actual results:
# rhc domain delete lxia
Deleting domain 'lxia' ... Domain contains applications. Delete applications first or set force to true.

Expected results:
1. Domain contains applications. Delete applications first or delete domain via restapi by setting force to true.
or
2. Provides the options --force

Additional info:
# rhc domain delete --help
Usage: rhc domain-delete <namespace>
Delete a domain
Options
  -n, --namespace NAME      Name of a domain
Global Options
  -l, --rhlogin LOGIN       OpenShift login
  -p, --password PASSWORD   OpenShift password
  --token TOKEN             An authorization token for accessing your account.
  --server NAME             An OpenShift server hostname (default: openshift.redhat.com)
  --timeout SECONDS         The timeout for operations
  See 'rhc help options' for a full list of global options.

Comment 1 Jordan Liggitt 2013-11-11 15:54:35 UTC
Added --force option. Will merge in https://github.com/openshift/rhc/pull/504

Comment 2 openshift-github-bot 2013-11-11 17:50:37 UTC
Commit pushed to master at https://github.com/openshift/rhc

https://github.com/openshift/rhc/commit/bbcb511e56131008c9c6379e5861f679b6ffd77c
Bug 1028963: Add --force option to delete-domain

Comment 3 Liang Xia 2013-11-12 02:32:51 UTC
Verified on devenv_4018.

# rhc domain delete ccc
Deleting domain 'ccc' ... Domain contains applications. Delete applications first or set force to true.
# rhc domain delete ccc --force
Deleting domain 'ccc' ... deleted

# rhc domain-delete --help
Usage: rhc domain-delete <namespace>
Delete a domain
Options
  -f, --force               Force the action
  -n, --namespace NAME      Name of a domain
Global Options
  -l, --rhlogin LOGIN       OpenShift login
  -p, --password PASSWORD   OpenShift password
  --token TOKEN             An authorization token for accessing your account.
  --server NAME             An OpenShift server hostname (default: openshift.redhat.com)
  --timeout SECONDS         The timeout for operations
  See 'rhc help options' for a full list of global options.