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
Add alembic scripts for indices and composite keys. #76
Conversation
Here's a playbook to do the eventual upgrade (with |
👍 for me |
For ansible, is there a way to monitor its progress? I see the delegate_to that should fix the potential timeout question, but then we also do not know how far it is. |
Yes, I have an example handy in the rebuild-fedora-packages playbook that I can re-use for this. Will post it in a moment. |
This should do it: diff --git a/playbooks/manual/upgrade/datanommer.yml b/playbooks/manual/upgrade/datanommer.yml
index 0b1037a..56a8de6 100644
--- a/playbooks/manual/upgrade/datanommer.yml
+++ b/playbooks/manual/upgrade/datanommer.yml
@@ -110,6 +110,8 @@
command: /usr/bin/alembic upgrade head
args:
chdir: /usr/share/datanommer.models/
+ async: 7200
+ poll: 60
- name: And... start the backend again
service: name="fedmsg-hub" state=started
diff --git a/playbooks/manual/upgrade/fmn.yml b/playbooks/manual/upgrade/fmn.yml
index e07e9d0..5cc4feb 100644
--- a/playbooks/manual/upgrade/fmn.yml
+++ b/playbooks/manual/upgrade/fmn.yml
@@ -65,10 +65,14 @@
tasks:
- name: Stop the notification backend
service: name="fedmsg-hub" state=stopped
+
- name: Upgrade the database
command: /usr/bin/alembic upgrade head
args:
chdir: /usr/share/fmn.lib/
+ async: 7200
+ poll: 60
+
- name: And... start the backend again
service: name="fedmsg-hub" state=started |
🎆 |
Correction: we won't actually get the stdout report of how its progressing until its done: See ansible/ansible#3887. |
Logs from the dev server on how long it takes to run:
|
Add alembic scripts for indices and composite keys.
No description provided.