Joanne Hugé (01305f64) at 27 Mar 09:49
playbook/ors: add init-mme script
Joanne Hugé (fc6fcf99) at 22 Mar 08:58
roles/upgrader: wait until machine has internet to execute playbook
/cc @tomo
Joanne Hugé (fc6fcf99) at 22 Mar 08:58
roles/upgrader: wait until machine has internet to execute playbook
... and 4 more commits
/cc @tomo
Joanne Hugé (21ba67a0) at 21 Mar 10:20
playbook/upgrader: log date and time when starting main tasks
... and 1 more commit
Joanne Hugé (21ba67a0) at 21 Mar 10:19
playbook/upgrader: log date and time when starting main tasks
... and 3 more commits
Thomas Gambier (b90ce61f) at 20 Mar 09:00
obs/slapos: use latest buildout (2.7.1+slapos020)
This should be ready to merge, I tested it on a local machine (by overriding slapcache-download)
Joanne Hugé (65dbb97c) at 18 Mar 11:05
playbook/upgrader: log date and time when starting main tasks
... and 1 more commit
Thomas Gambier (54baa8a8) at 15 Mar 12:43
obs/slapos: Update .gitignore after shorter name
I'm afraid calling a failover playbook would add to much complexity to cron command line or in sh scripts.
I think the easy way is, if upgrade is broken, call failover playbook (or failover script) that remove /opt/upgrader/* and start setup from scratch.
Joanne Hugé (4deddff5) at 14 Mar 13:31
playbook/upgrader: avoid playbook-tmp getting corrupted
Joanne Hugé (4100cb12) at 14 Mar 12:35
playbook/upgrader: avoid playbook-tmp getting corrupted
To be safe I think it is better to delete playbook.todelete also before step 4. , if we power off the ORS while we are removing playbook.todelete at step 5 then we will never be able to upgrade again as the move to playbook.todelete will fail.
I think with this new way, no matter where we fail, we can recover.
The playbook is launched by anacron, and if there is no internet it fails and waits the next day until getting executed again. We add a cron every 5mn to launch the playbook inside the playbook, but if there is no internet the playbook will fail before we get to that step (because we execute role package before we even start executing upgrader/task/main.yml) So currently most ORS barely ever get to run the playbook, because it doesn't get internet straight away and isn't powered for more than a day.
I don't understand why it is better than before ? With the previous solution we were already waiting that machine has internet (we launch the playbook each 5mn and if it doesn't have internet, we stop).
it seems a bit complex to do this. Can't you do something like :
And we change the command line in cron from
rm -rf /opt/upgrader/playbook && cp -R /opt/upgrader/playbook-tmp /opt/upgrader/playbook && cd /opt/upgrader/playbook && ansible...
to
[-d /opt/upgrader/playbook-tmp] && (rm -rf /opt/upgrader/playbook ; mv /opt/upgrader/playbook-tmp /opt/upgrader/) ; ansible...