-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fix service startup and deployment #5
base: master
Are you sure you want to change the base?
Conversation
Firstly with mysql-server, it was being restarted with phab config delayed, which during initial run (or during kitchen test run), meant that phd service was being created before mysql had been restarted. Thus when mysql was restarted it was restarting phd, causing the behaviour noticed previously in a comment. Secondly, with the `run_storage_upgrade` task, switched to using a guard `not_if` rather than the preivous mechanism, as this should be more robust and is cleaner. Lastly with the phd upstart script, configured it to not depend on mysql starting when mysql server is not local.
Thanks for the patch. I haven't converged yet, but when reading the code I noticed that there is no trigger for the Phabricator storage upgrade. It must be performed after pulling the updated Git repositories. Am I missing something? |
Sure, I removed the trigger, as I didn't see it as necessary? I might be missing something but: Without the notifies on first deploy it will run the storage upgrade as I removed the
I tried re-adding the notifies, and looking at logs pretty much the same happens as above:
In the case of an upgrade… then obviously the |
The key point is that the storage upgrade must run every time Phabricator is upgraded. Today's mechanism works, in the way that The |
Gotcha. I think I know what I'll do now… (The reason I started looking at this was that I noticed before was So if storage_upgrade_done gets set to the git tag of that version at the end of a run, instead of true, and we do a comparison on that, that way it will trigger a database if there's a change, but otherwise it won't. Feels like that would be quite clean. What do you think? |
Why compare on git tag when we can trigger it with a notification? IIRC, the workaround was added because the daemon and mysql database have to be stopped beforehand, and started at a later point. But those servers will need to run directly after the storage upgrade, in order to configure Phabricator settings. |
so the reason for that, would be that the notify would be triggered on any of the git repositories changing. |
could still trigger via a notifies of course, just thinking that having a guard to only run that block when necessary would be useful… |
As the storage upgrade overhead in restarting the services only takes a few seconds, I'd say that the cost of restarting outweighs the additional complexity added by having to make a special case for it in the source code. What would be the purpose of a guard when the default action is |
Firstly with mysql-server, it was being restarted with phab config
delayed, which during initial run (or during kitchen test run), meant
that phd service was being created before mysql had been restarted.
Thus when mysql was restarted it was restarting phd, causing the
behaviour noticed previously in a comment.
Secondly, with the
run_storage_upgrade
task, switched to using a guardnot_if
rather than the preivous mechanism, as this should be more robustand is cleaner.
Lastly with the phd upstart script, configured it to not depend on mysql starting
when mysql server is not local.