Project

General

Profile

Bug #15340

Org destroy not unassociating host groups

Added by Partha Aji over 5 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

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

Has duplicate Katello - Bug #21140: If you are in org foo, you cannot delete org bar if bar has systems in it.Duplicate2017-09-27

Associated revisions

Revision c6a4c5bf (diff)
Added by Partha Aji over 4 years 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 over 5 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 over 5 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 over 5 years ago

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

#4 Updated by Justin Sherrill over 5 years ago

  • Bugzilla link set to 1343795

#5 Updated by Eric Helms over 5 years ago

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

#6 Updated by Eric Helms about 5 years ago

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

#7 Updated by Eric Helms about 5 years ago

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

#8 Updated by Justin Sherrill about 5 years ago

  • Legacy Backlogs Release (now unused) set to 114

#9 Updated by The Foreman Bot about 5 years ago

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

#10 Updated by Eric Helms almost 5 years ago

  • Legacy Backlogs Release (now unused) set to 188

#11 Updated by Thomas McKay over 4 years ago

  • Target version set to 154

#12 Updated by Justin Sherrill over 4 years ago

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

#13 Updated by Thomas McKay over 4 years ago

  • Target version changed from 154 to 163

#14 Updated by Thomas McKay over 4 years ago

  • Target version changed from 163 to 161

#15 Updated by Partha Aji over 4 years ago

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

#16 Updated by Partha Aji almost 4 years ago

  • Has duplicate 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