Actions
Bug #10365
closedMigration to delete duplicate tokens doesn't work when there are no managed hosts
Difficulty:
Triaged:
Description
The migration to fix: http://projects.theforeman.org/issues/9597
finds all the tokens that don't belong to a managed host.
When there are no managed hosts
Host::Managed.all.map(&:token).compact
is empty and so this line:
https://github.com/theforeman/foreman_discovery/commit/bc01733928b6babaf0feefbbce326169ae588b08#diff-791d17258792727551dfb2f3bb0e43b1R3
doesn't delete anything.
To fix this if there are no manged hosts all of the tokens should be deleted.
Updated by The Foreman Bot over 9 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman_discovery/pull/179 added
- Pull request deleted (
)
Updated by Ori Rabin over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset foreman_discovery|52cd340ad7cf31fc54948bfca844b162430c7f40.
Updated by Ori Rabin over 9 years ago
- Related to Bug #9597: FK violation when trying to delete a discovered host after provision added
Updated by Dominic Cleal over 9 years ago
Actions