commit b439b862bb374677729e3e8320499d8aa45dc93c Author: Dan Voiculeasa Date: Tue Sep 22 16:37:39 2020 +0300 Change restore procedure Do not force platform-integ-apps to uploaded state. The implication of this change is that if the backup was taken when platform-integ-apps was not in applied state, then at the end of the restore procedure a manual apply of platform-integ-apps is needed. Otherwise the restore procedure takes care of it. As one of the final steps of the restore playbook place the system in the restore state. This commit is the last one in a series of fixes for the automatic applies of apps and restore procedure. This commit keeps track of the other commits. CLI commands to control the restore state were provided. Changes to the periodic thread to support the new restore procedure were done. Depends-On: I7b7fab99d457056032dbbd612363cd5036736cda Depends-On: I44fc4aaa528e372a84115714f271b4f5e063f86e Depends-On: I64307f75d3e693dfdb0f15828743d196aaa7ae04 Depends-On: I4d5b552c4e73f0918bbd46206dd2f8deb5d6039a Closes-Bug: 1887648 Change-Id: I8b978a341a388ffcdd154d39dc52b93e09658ef0 Signed-off-by: Dan Voiculeasa diff --git a/playbookconfig/src/playbooks/roles/restore-platform/restore-more-data/tasks/main.yml b/playbookconfig/src/playbooks/roles/restore-platform/restore-more-data/tasks/main.yml index 38e6ac9..2221f0e 100644 --- a/playbookconfig/src/playbooks/roles/restore-platform/restore-more-data/tasks/main.yml +++ b/playbookconfig/src/playbooks/roles/restore-platform/restore-more-data/tasks/main.yml @@ -426,14 +426,6 @@ become_user: postgres when: not wipe_ceph_osds|bool and ceph_backend.rc == 0 - # Set platform-integ-apps to "uploaded" state, so that once ceph is up after - # controller-0 is unlocked for the first time, the manifest will be applied. - # Set only for the active app. - - name: Set platform-integ-apps to "uploaded" state - shell: psql -c "update kube_app set status='uploaded' where name='platform-integ-apps' and status!='inactive'" sysinv - become_user: postgres - when: migrate_platform_data is not defined or not migrate_platform_data - # Container images will not be present after restore. Inform sysinv so it # can download the images. Kubernetes will then start the apps. - name: Set applied apps to "restore-requested" state @@ -607,6 +599,9 @@ when: check_online.stdout == "online" and ceph_backend.rc == 0 + - name: Set restore in progress for sysinv + shell: "source /etc/platform/openrc; system restore-start" + - name: Inform user that restore_platform is run successfully debug: msg: >-