Bug 1305747 - Cannot dis-associate a Subnet from a Domain using Hammer
Cannot dis-associate a Subnet from a Domain using Hammer
Status: NEW
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer (Show other bugs)
6.1.6
All Linux
high Severity medium (vote)
: GA
: --
Assigned To: satellite6-bugs
Katello QA List
http://projects.theforeman.org/issues...
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-09 01:10 EST by anerurka
Modified: 2017-02-13 02:21 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 13994 None None None 2016-04-26 12:59 EDT

  None (edit)
Description anerurka 2016-02-09 01:10:32 EST
Description of problem:

Cannot dis-associate a Subnet from a Domain using Hammer.

- Due to which can not delete a Subnet using hammer command

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

Satellite Server v.6.1.6

How reproducible:

Steps to Reproduce:

1. Create a Domain and Subnet using hammer command:

# hammer domain create --name "test-domain"
Domain [test-domain] created

# hammer subnet create --name "test" --network "x.x.x.x" --mask "255.255.255.0" --domains "test-domain"
Subnet created

2. Try deleting the subnet and it will fail with the below error :

# hammer subnet delete --name "test"
Could not delete the subnet:
  test (x.x.x.x/24) is used by test-domain

# hammer domain delete --name "test-domain"
Could not delete the domain:
  test-domain is used by test (x.x.x.x/24)


Actual results:

Could not delete the subnet:
  test (x.x.x.x/24) is used by test-domain

Expected results:

Subnet Deleted successfully

Additional info:

It is due to the association created between the Subnet and the Domain.

If a Subnet is created without the Domain association, then it is deleted successfully.

Currently we can remove the association manually over the Satellite Server Web UI

--> log in to Satellite --> Infrastructure --> Subnet --> Select the Subnet "test" --> Domains --> Remove the check mark from "test-domain" --> Submit

# hammer subnet delete --name "test"

- Below Hammer command does not remove the association using hammer command:

# hammer subnet update --domains "" --name "test"  ---> Rather it associates the Subnet with all the Domain's.
Comment 2 Brad Buckingham 2016-03-01 15:16:11 EST
Created redmine issue http://projects.theforeman.org/issues/13994 from this bug
Comment 3 Bryan Kearney 2016-03-01 16:07:00 EST
Upstream bug component is Provisioning
Comment 4 Bryan Kearney 2016-03-02 04:06:56 EST
Upstream bug component is Hammer
Comment 5 Brad Buckingham 2016-03-02 06:04:12 EST
Upstream redmine comment:

hammer subnet update --domain-ids '' works fine.

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