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

libvirt: Fix config_libvirt to not exit #1826

Conversation

stevenhorsman
Copy link
Member

@stevenhorsman stevenhorsman commented Apr 29, 2024

#1822 broke the e2e libvirt tests jobs (https://github.com/confidential-containers/cloud-api-adaptor/actions/runs/8873277040/job/24359701508). We should have added the test_e2e_libvirt label, so sorry for missing that during the review.

config_libvirt.sh has set -o errexit, so we can't use a grep for rhel and test if it fails as this will exit the script. Instead use the ID field from /etc/os-release or /usr/lib/os-release

config_libvirt.sh has `set -o errexit`, so we can't use a grep for rhel
and test if it fails as this will exit the script. Instead use the ID
field from `/etc/os-release` or `/usr/lib/os-release`

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
@stevenhorsman stevenhorsman added the test_e2e_libvirt Run Libvirt e2e tests label Apr 29, 2024
@stevenhorsman stevenhorsman requested a review from huoqifeng April 29, 2024 08:46
@huoqifeng
Copy link

Tried it on ubuntu, looks good to me. Thanks @stevenhorsman figure out the problem!

# source /etc/os-release
# echo $ID
ubuntu

Copy link

@huoqifeng huoqifeng left a comment

Choose a reason for hiding this comment

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

LGTM

@stevenhorsman stevenhorsman requested a review from liudalibj April 29, 2024 09:34
@wainersm
Copy link
Member

/etc/os-release

And in fedora:

$ echo $(source /etc/os-release; echo $ID)
fedora

Many scripts in kata will look for two locations like source /etc/os-release || source /usr/lib/os-release. Apparently some distributions rely on /usr/lib/os-release only. Anyway, I don't think we should be paranoid here, saying just in case it rings any bell.

Copy link
Member

@wainersm wainersm left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @stevenhorsman !

@wainersm wainersm merged commit a0e0f80 into confidential-containers:main Apr 29, 2024
29 checks passed
@stevenhorsman stevenhorsman deleted the fix-config-libvirt-os-detection branch May 7, 2024 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test_e2e_libvirt Run Libvirt e2e tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants