New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes #15014 - restore pulp db init flag #145
Conversation
ACK. I recall there was an issue where someone was complaining the module wasn't idempotent because mongodb was restarted on every run. I can't find it now, but it looks like this should fix it. |
Hm, not sure if this will fix that, this will cause a migrate whenever the service was down and puppet started it. Since the yum upgrade could happen out of band, this is the only way I could think of to ensure the database schema is up-to-date when we run it. |
On the surface, this seems like a strange paradigm, every time the database is started migrate it. Does the foreman module for example follow this paradigm? |
It is a very strange to do, yes. Do note, it's not every time the database is started, only when puppet does it. The problem with Do you think there's some other thing we could subscribe to that indicates the DB needs migrating? Maybe re-introduce |
(init.flag and the reset stuff was removed in #65) |
I got bit by this bug yesterday, 👍 from me for this patch. Running |
If @cristifalcas can tell us why he removed it (whether by accident or with an intent) we could maybe bring back the init file otherwise the only thing I could think of would be tying the migrate to the creation of the dbpath so that it migrates whenever that is refreshed/recreated. Failing any of that I'll be OK with this change. |
Hi, from what I remember, I did it because I didn't see any purpose for it. Also it was stopping future migrations if nobody removed the file. It may be useful for tests, but in production not so much. |
It's used in production by Katello, the
This will never happen now anyway, a change on a |
@@ -23,7 +23,7 @@ | |||
logoutput => 'on_failure', | |||
user => 'apache', | |||
refreshonly => true, | |||
require => File['/etc/pulp/server.conf'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is still need it because the migration should run after all needed information is populated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose, is there a reason this is an include, and not between config + service?
https://github.com/Katello/puppet-pulp/blob/master/manifests/init.pp#L377
If there's no better suggestions, I think I'll go with just putting the init flag back. |
This brings back the init flag so that the puppet installer only runs the migration once or when the user has run --reset (which deletes the init.flag file).
Ready for another look |
ACK, tested and worked for me. |
Thanks! |
This brings back the init flag so that the puppet installer only runs the migration once or when the user has run --reset (which deletes the init.flag file).
This brings back the init flag so that the puppet installer only
runs the migration once or when the user has run --reset (which
deletes the init.flag file)