Bug #15340

Org destroy not unassociating host groups

Added by Partha Aji about 2 years ago. Updated 9 days ago.

Status:Closed
Priority:Normal
Assignee:Partha Aji
Category:-
Target version:Katello 3.3.1
Difficulty: Team Backlog:
Triaged: Fixed in Releases:
Bugzilla link:1343795 Found in Releases:
Pull request:https://github.com/Katello/katello/pull/6108

Description

Create the following
1) New Org
2) Lifecycle Environment in the new org
3) CV promoted to that environment
4) Hostgroup with that environment and content view
5) Destroy the org

Error -

[foreman-tasks/action] [E] Cannot delete record because of dependent hostgroups (ActiveRecord::DeleteRestrictionError)

Expected
Clean deletion


Related issues

Duplicated by Katello - Bug #21140: If you are in org foo, you cannot delete org bar if bar h... Duplicate 09/27/2017

Associated revisions

Revision c6a4c5bf
Added by Partha Aji over 1 year ago

Fixes #15340 - Org destroy unassociates hostgroups

Org destroy was not properly unassociating environments and content
views from hosts + hostgroups.

Updated the plan to handle that

History

#1 Updated by Partha Aji about 2 years ago

Handy hammer script

suffix=$RANDOM
echo "$suffix" 
hammer organization create --name=$suffix
hammer lifecycle-environment create --name=dev --prior=Library --organization=$suffix
hammer hostgroup create --name=$suffix --lifecycle-environment=dev --organizations=$suffix
hammer organization delete --name=$suffix

#2 Updated by The Foreman Bot about 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6108 added

#3 Updated by Eric Helms about 2 years ago

  • Legacy Backlogs Release (now unused) changed from 86 to 144

#4 Updated by Justin Sherrill about 2 years ago

  • Bugzilla link set to 1343795

#5 Updated by Eric Helms about 2 years ago

  • Legacy Backlogs Release (now unused) changed from 144 to 168

#6 Updated by Eric Helms about 2 years ago

  • Legacy Backlogs Release (now unused) changed from 168 to 171

#7 Updated by Eric Helms about 2 years ago

  • Legacy Backlogs Release (now unused) deleted (171)

#8 Updated by Justin Sherrill almost 2 years ago

  • Legacy Backlogs Release (now unused) set to 114

#9 Updated by The Foreman Bot almost 2 years ago

  • Legacy Backlogs Release (now unused) deleted (114)

#10 Updated by Eric Helms almost 2 years ago

  • Legacy Backlogs Release (now unused) set to 188

#11 Updated by Thomas McKay over 1 year ago

  • Target version set to 154

#12 Updated by Justin Sherrill over 1 year ago

  • Legacy Backlogs Release (now unused) changed from 188 to 219

#13 Updated by Thomas McKay over 1 year ago

  • Target version changed from 154 to 163

#14 Updated by Thomas McKay over 1 year ago

  • Target version changed from 163 to 161

#15 Updated by Partha Aji over 1 year ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#16 Updated by Partha Aji 10 months ago

  • Duplicated by Bug #21140: If you are in org foo, you cannot delete org bar if bar has systems in it. added

Also available in: Atom PDF