Project

General

Profile

Actions

Bug #22393

closed

Foreman 1.12 to 1.13 - duplicate Operating Systems

Added by Jeff Sparrow almost 7 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

After upgrading from Foreman 1.12 to 1.13 I came back in to the UI to find numerous Windows OS's. This is messing up many things in our instance that rely on the OS.
Including provisioning.

How do I fix this? I cant even move hosts because it thinks the OS is "in use on hosts..." even though its the exact same OS.
Just that one of them shows -
eg;
https://i.imgur.com/8f12wXU.png

Anything that says DO NOT USE - are OS's I have had to rename and give some odd string to so they wont keep being reproduced.

This is a big hot mess, how can I fix it?

Actions #1

Updated by Jason Lang almost 7 years ago

I remember this issue from when we did our upgrade.

It comes down to the Major/Minor "version" syntax changing a bit between 1.12 and 1.13. Just compare the entries side by side for a single OS and you will see it pretty quick. I was able to fix it not with any code changes - but with brute force like you are doing.

1. Rename all the "old" ones to DO NOT USE (you already did this)
2. Rename all the NEW ones properly, including the descriptive names so they show properly
3. Open old and new side by side for each one and configure as needed (templates, orgs, etc) to match old one 100% (probably need to dive into templates/snippets/partition tables as well
4. Wait until all foreman hosts check in via puppet (will immediately update to the "new" os name via foreman)
5. Either fix your stale hosts, or manually move them with brute force UI or API calls to the "new" OS names so that the "do not use" OS'es have zero entries
6. Delete the "do not use" OS'es from foreman

I can say that im up through 1.15.6 and it doesn't appear this happens again, so I think its good past that......

Actions #2

Updated by Jeff Sparrow almost 7 years ago

Jason Lang wrote:

I remember this issue from when we did our upgrade.

It comes down to the Major/Minor "version" syntax changing a bit between 1.12 and 1.13. Just compare the entries side by side for a single OS and you will see it pretty quick. I was able to fix it not with any code changes - but with brute force like you are doing.

1. Rename all the "old" ones to DO NOT USE (you already did this)
2. Rename all the NEW ones properly, including the descriptive names so they show properly
3. Open old and new side by side for each one and configure as needed (templates, orgs, etc) to match old one 100% (probably need to dive into templates/snippets/partition tables as well
4. Wait until all foreman hosts check in via puppet (will immediately update to the "new" os name via foreman)
5. Either fix your stale hosts, or manually move them with brute force UI or API calls to the "new" OS names so that the "do not use" OS'es have zero entries
6. Delete the "do not use" OS'es from foreman

I can say that im up through 1.15.6 and it doesn't appear this happens again, so I think its good past that......

Thanks! You are certainly right, it is fixing itself after renaming certain ones. The last part involved either forcing a puppet run on stale hosts, or removing them. Looks like things are normalizing. Quite confusing though, wow.

Actions #3

Updated by Jeff Sparrow almost 7 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF