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

add_cloud_init_test #3289

Merged
merged 27 commits into from
May 11, 2024
Merged

Conversation

rmhsawyer
Copy link
Contributor

Add test case for cloud-init to catch any "ERROR" or "WARNING" message in /var/log/cloud-init.log and also check if command "cloud-init status" return 0.

Limit the test only to CBLMariner.

@LiliDeng
Copy link
Collaborator

LiliDeng commented May 7, 2024

I ran the test against the ubuntu 2004, it failed.

If we see the warnings ['May 7 02:31:45 lisa--188-e0-n0 chronyd-starter.sh[732]: WARNING: libcap needs an update (cap=40 should have a name).\r', 'May 7 02:31:47 lisa--188-e0-n0 python3[957]: 2024-05-07T02:31:47.874209Z WARNING ExtHandler Dhcp client is not running.\r', what we should do next?

This one 'May 7 02:31:52 lisa--188-e0-n0 root: Added ephemeral disk warning to /mnt/DATALOSS_WARNING_README.txt\r'] is false alarm.

AzureImageStandard.verify_cloud_init_error_status: FAILED failed. AssertionError: [unexpected ERROR/WARNING shown up in cloud-init.log Ubuntu 20.4.0] Expected <['May 7 02:31:45 lisa--188-e0-n0 chronyd-starter.sh[732]: WARNING: libcap needs an update (cap=40 should have a name).\r', 'May 7 02:31:47 lisa--188-e0-n0 python3[957]: 2024-05-07T02:31:47.874209Z WARNING ExtHandler Dhcp client is not running.\r', 'May 7 02:31:52 lisa--188-e0-n0 root: Added ephemeral disk warning to /mnt/DATALOSS_WARNING_README.txt\r']> to be empty, but was not.

@rmhsawyer
Copy link
Contributor Author

I've limited the test to Mariner only as the purpose of this change is for Mariner only to catch early regression and I did not explore the possible failing cases for other distros.

@LiliDeng LiliDeng requested a review from squirrelsc May 8, 2024 00:06
@squirrelsc
Copy link
Member

@LiliDeng LGTM

@LiliDeng LiliDeng merged commit 08265a9 into microsoft:main May 11, 2024
23 checks passed
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.

3 participants