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

tests: lxd_vm early boot status test ordered After=systemd-remount-fs #4936

Conversation

blackboxsw
Copy link
Collaborator

Proposed Commit Message

tests: lxd_vm early boot status test ordered After=systemd-remount-fs

Fix errors seen on lxd_vm where test service
before-cloud-init-local.service gets run before the filesytem is mounted read-write.

Test failures exhibit the following failure:
 systemctl status before-cloud-init-local.service:

/waitoncloudinit.sh: 7: cannot create /before-local: Read-only file system

Additional Context

Failing Jenkins tests show no test artifact files emitted by the example before-cloud-init-local.service which is setup by the test.
The issue is that the service is executing on the system while the filesystem is still read-only and before systemd-remount-fs.service has run. This leaves the early boot test service with the following types of script permission errors as seen from systemctl status

# systemctl status before-cloud-init-local.service
Warning: The unit file, source configuration file or drop-ins of before-cloud-init-local.service changed on disk. Run 'systemctl daemon-reload' to reload units.
● before-cloud-init-local.service - BEFORE cloud-init local
     Loaded: loaded (/lib/systemd/system/before-cloud-init-local.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2024-02-22 01:27:42 UTC; 16min ago
   Main PID: 100 (code=exited, status=2)

Feb 22 01:27:42 cloudinit-0222-01263934jph42x waitoncloudinit.sh[100]: /waitoncloudinit.sh: 7: cannot create /before-local: Read-only file system
Feb 22 01:27:42 cloudinit-0222-01263934jph42x waitoncloudinit.sh[100]: /waitoncloudinit.sh: 8: cannot create //before-local.start-nostatusjson: Read-only file system
Warning: journal has been rotated since unit was started, output may be incomplete.

Test Steps

$ CLOUD_INIT_KEEP_INSTANCE=1 CLOUD_INIT_PLATFORM=lxd_vm CLOUD_INIT_CLOUD_INIT_SOURCE=ppa:cloud-init-dev/daily CLOUD_INIT_OS_IMAGE=focal tox -e integration-tests -- tests/integration_tests/cmd/test_status.py::test_status_block_through_all_boot_status

# Confirm that the sample before-cloud-init-local.service was healthy and didn't exit non-zero
$ lxc exec cloudinit..... -- systemctl status before-cloud-init-local.service

Checklist

Merge type

  • Squash merge using "Proposed Commit Message"
  • Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)

Fix errors seen on lxd_vm where test service
before-cloud-init-local.service gets run before the filesytem
is mounted read-write.

Test failures exhibit the following failure:
 systemctl status before-cloud-init-local.service:

/waitoncloudinit.sh: 7: cannot create /before-local: Read-only file system
Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for digging into this one!

@TheRealFalcon TheRealFalcon merged commit e5249ab into canonical:main Feb 22, 2024
29 checks passed
blackboxsw added a commit that referenced this pull request Feb 27, 2024
…#4936)

Fix errors seen on lxd_vm where test service
before-cloud-init-local.service gets run before the filesytem
is mounted read-write.

Test failures exhibit the following failure:
 systemctl status before-cloud-init-local.service:

/waitoncloudinit.sh: 7: cannot create /before-local: Read-only file system
blackboxsw added a commit that referenced this pull request Feb 27, 2024
…#4936)

Fix errors seen on lxd_vm where test service
before-cloud-init-local.service gets run before the filesytem
is mounted read-write.

Test failures exhibit the following failure:
 systemctl status before-cloud-init-local.service:

/waitoncloudinit.sh: 7: cannot create /before-local: Read-only file system
blackboxsw added a commit that referenced this pull request Feb 27, 2024
…#4936)

Fix errors seen on lxd_vm where test service
before-cloud-init-local.service gets run before the filesytem
is mounted read-write.

Test failures exhibit the following failure:
 systemctl status before-cloud-init-local.service:

/waitoncloudinit.sh: 7: cannot create /before-local: Read-only file system
holmanb pushed a commit to holmanb/cloud-init that referenced this pull request Mar 5, 2024
…canonical#4936)

Fix errors seen on lxd_vm where test service
before-cloud-init-local.service gets run before the filesytem
is mounted read-write.

Test failures exhibit the following failure:
 systemctl status before-cloud-init-local.service:

/waitoncloudinit.sh: 7: cannot create /before-local: Read-only file system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants