Skip to content
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

Wait for epiphany-lvm-merge.service to finish #2096

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -781,5 +781,5 @@ write_files: # frequency: once-per-instance
main

runcmd: # frequency: once-per-instance
- systemctl enable epiphany-lvm-merge
- systemctl enable epiphany-lvm-merge # auto-start after unexpected reboot if uncompleted
- systemctl start --no-block epiphany-lvm-merge
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,18 @@
- import_role:
name: preflight_facts
tasks_from: assert

- name: Wait for epiphany-lvm-merge.service to finish # to avoid 'Read-only file system' error
when: ansible_os_family == "RedHat"
block:
- name: Check if epiphany-lvm-merge.service exists # exists only on Azure
service_facts: null

- name: Wait for epiphany-lvm-merge.service to finish
when:
- ansible_facts.services['epiphany-lvm-merge.service'] is defined
- ansible_facts.services['epiphany-lvm-merge.service'].status != "disabled"
wait_for: # at the end service disables itself so symlink is removed
path: /etc/systemd/system/default.target.wants/epiphany-lvm-merge.service
state: absent
timeout: 300