rerunning puppet can't fix various cobbler distro/profile problems
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cisco Openstack |
New
|
Medium
|
Sushma Korati | ||
Folsom |
Triaged
|
Wishlist
|
Michael DeHaan |
Bug Description
Various operations in cobbler cannot be recovered by running Puppet again, due to the way the resources are coded up.
In particular:
1. delete a profile
2. run puppet again
3. profile precise-x86_64_auto will not come back
deleting the distro will also not make it come back. Nor deleting the ISO's directory.
Basically the whole system relies on running the Ubuntu-custom (non-upstream) import script that calls cobbler import, and we don't really need to do any of this since we are are not using local content.
Basically we just need to download the kernel and the initrd, and do "cobbler distro add", and then "cobbler profile add". At this point, we can also assign the preseed to the profile, instead of the system, as it should generally be intended to have one object to go to.
There are also some other minor issues with things, such as changing parameters on the profile or distro won't result in any edits to the object.
I think we were exploring various other courses of action including not having the distro creation be puppet driven, and instead having a very simple script to do it, pre-puppet setup, and then using something else as an external nodes resource.
This bug is basically just a record of "if you mess up your cobbler configuration, the way we have our Puppet coded, it can't put it back". Thus you have to know to 'not touch' these things. In general the Puppet content should converge you on desired state regardless of actual state, and it's not doing that here.
If we are going to continue to let Puppet drive Cobbler, we need a better solution that doesn't involve reinstalling the build node or fixing things manually. Though we should also consider not letting it drive and looking towards external nodes.
Changed in openstack-cisco: | |
importance: | Undecided → Medium |
Changed in openstack-cisco: | |
assignee: | nobody → Sushma Korati (sushma-korati) |
I am able to reproduce this issue with the above given steps.
But when I delete the distro and re-run puppet, both the profiles and distro are getting automatically created.
$cobbler list
distros:
precise-x86_64
profiles: x86_64- auto
precise-x86_64
precise-
------
Reason: ubuntu- import" command.
This is because internally puppet scripts use "cobbler-
Issue: ubuntu- import" command throws the below error: ubuntu- import precise-x86_64
If we re-run puppet apply without deleting the distro, "cobbler-
$cobbler-
skipping import, as distro name already exists: precise-x86_64
$ puppet apply -v /etc/puppet/ manifests/ site.pp
<Execute successfully without errors>
Solution:
By adding a "exec" resource,we can check if "*-auto" profile exists else re-create. But the default profile should exists for creating the "*-auto" profile.
Checking the puppet scripts.