-
Notifications
You must be signed in to change notification settings - Fork 73
Install ovmf on Ubuntu when EFI VM is requested #99
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
Conversation
31b5909
to
d0c1b90
Compare
vars: | ||
is_efi: >- | ||
(libvirt_vms | selectattr('state', 'defined') | ||
| selectattr('state', 'equalto', 'absent') | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be rejectattr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just copy pasted the from L14, but you're right - we don't need to install ovmf if we only want to remove VMs (I would assume it's already installed then).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit tricky also because the default for state
is present
, but the first selectattr only looks for VMs with a state defined. I think you'd need to concatenate lists of state undefined and state = present. Or you could ignore this micro optimisation for the state.
is_efi: >- | ||
(libvirt_vms | selectattr('state', 'defined') | ||
| selectattr('state', 'equalto', 'absent') | | ||
| selectattr('boot_firmware', 'equalto', 'efi')) | bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this fail if boot_firmware is not defined for a VM? Based on L58 it should be optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It hasn't failed in Gerrit change - https://review.opendev.org/c/openstack/kayobe/+/921660
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's because that change sets boot_firmware :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, a lot of | default(something) ;-)
No description provided.