Verification done for focal-proposed and
(via upgrade to) focal-victoria/proposed,
later upgraded to focal-wallaby/proposed
(to confirm no changes are needed there).
focal-proposed:
--------------
First, (juju) deployed openstack on focal, and verified with steps in comment #15.
I didn't find an option to "upgrade" to focal-proposed
(just to later openstack releases/cloud archive), thus
I manually run the `apt install` command as the charm.
The config change isn't an issue with the nova-compute
charm due to dpkg options `--force-conf{new,def}`:
confnew: If a conffile has been modified and the version in the package did change,
always install the new version without prompting, unless the --force-confdef is also specified,
in which case the default action is preferred.
And the charm does rewrite the configs anyway (`configs.write_all()`),
so I installed and triggered the config change/rewrite w/ our option.
$ juju ssh nova-compute/0 'sudo apt install --yes --option=Dpkg::Options::=--force-confnew --option=Dpkg::Options::=--force-confdef nova-compute'
...
Configuration file '/etc/nova/nova.conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
==> Keeping old config file as default.
...
$ openstack server stop test
$ openstack server start test
$ openstack server show test | grep -e instance_name -e task_state -e vm_state -e status
| OS-EXT-SRV-ATTR:instance_name | instance-00000002 |
| OS-EXT-STS:task_state | None |
| OS-EXT-STS:vm_state | active |
| status | ACTIVE |
$ cmadison nova | grep victoria
nova | 2:22.4.0-0ubuntu1~cloud4 | victoria | focal-updates | source
nova | 2:22.4.0-0ubuntu1~cloud5 | victoria-proposed | focal-proposed | source
The fix continues to work in victoria-proposed:
$ openstack server stop test
$ openstack server start test
Verification done for focal-proposed and proposed, proposed
(via upgrade to) focal-victoria/
later upgraded to focal-wallaby/
(to confirm no changes are needed there).
focal-proposed:
--------------
First, (juju) deployed openstack on focal, and verified with steps in comment #15.
With focal-updates, an uefi server does NOT boot:
$ juju ssh nova-compute/0 'dpkg -s nova-compute | grep ^Version:' 2>/dev/null
Version: 2:21.2.4-0ubuntu2.5
$ openstack image set jammy --property hw_firmware_ type=uefi
$ openstack server create --image jammy --flavor m1.small --network private test
$ juju ssh nova-compute/0 sudo virsh dumpxml instance-00000002 2>&1 | sed -n '/<os>/,/<\/os>/p' >/usr/share/ OVMF/OVMF_ CODE.secboot. fd</loader>
...
<loader readonly='yes' type='pflash'
...
$ openstack console log show test
$
With focal-proposed, the server does boot successfully:
$ juju ssh nova-compute/0 'sudo add-apt-repository --yes "deb http:// archive. ubuntu. com/ubuntu focal-proposed main"'
I didn't find an option to "upgrade" to focal-proposed
(just to later openstack releases/cloud archive), thus
I manually run the `apt install` command as the charm.
The config change isn't an issue with the nova-compute conf{new, def}`:
charm due to dpkg options `--force-
@ charm-nova- compute/ hooks/nova_ compute_ utils.py
769 dpkg_opts = [ Options: :=--force- confnew' , Options: :=--force- confdef' ,
770 '--option', 'Dpkg::
771 '--option', 'Dpkg::
772 ]
@ dpkg(1):
confnew: If a conffile has been modified and the version in the package did change,
always install the new version without prompting, unless the --force-confdef is also specified,
in which case the default action is preferred.
And the charm does rewrite the configs anyway (`configs. write_all( )`),
so I installed and triggered the config change/rewrite w/ our option.
$ juju ssh nova-compute/0 'sudo apt install --yes --option= Dpkg::Options: :=--force- confnew --option= Dpkg::Options: :=--force- confdef nova-compute' nova.conf'
...
Configuration file '/etc/nova/
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
==> Keeping old config file as default.
...
$ juju ssh nova-compute/0 'dpkg -s nova-compute | grep ^Version:' 2>/dev/null
Version: 2:21.2.4-0ubuntu2.6
$ juju config nova-compute config- flags=' ubuntu_ libvirt_ uefi_loader_ path=True'
$ juju ssh nova-compute/0 sudo grep ubuntu_ libvirt_ uefi_loader_ path /etc/nova/nova.conf libvirt_ uefi_loader_ path = True
ubuntu_
And the server boot correctly:
$ openstack server stop test
$ openstack server start test
$ openstack server show test | grep -e instance_name -e task_state -e vm_state -e status SRV-ATTR: instance_ name | instance-00000002 | STS:task_ state | None |
| OS-EXT-
| OS-EXT-
| OS-EXT-STS:vm_state | active |
| status | ACTIVE |
$ juju ssh nova-compute/0 sudo virsh dumpxml instance-00000002 2>&1 | sed -n '/<os>/,/<\/os>/p' >/usr/share/ OVMF/OVMF_ CODE.fd< /loader>
...
<loader readonly='yes' type='pflash'
...
$ openstack console log show test | grep -o 'test login:'
test login:
focal-victoria/ proposed: ------- ------- --
-------
Then, upgraded to (cloud-archive) focal-victoria, as in comment #17.
Except for the last step, which used -proposed, of course:
$ juju config nova-compute openstack- origin= cloud:focal- victoria/ proposed
$ juju ssh nova-compute/0 'dpkg -s nova-compute | grep ^Version:' 2>/dev/null 0-0ubuntu1~ cloud5
Version: 2:22.4.
$ cmadison nova | grep victoria 0-0ubuntu1~ cloud4 | victoria | focal-updates | source 0-0ubuntu1~ cloud5 | victoria-proposed | focal-proposed | source
nova | 2:22.4.
nova | 2:22.4.
The fix continues to work in victoria-proposed:
$ openstack server stop test
$ openstack server start test
$ juju ssh nova-compute/0 sudo virsh dumpxml instance-00000002 2>&1 | sed -n '/<os>/,/<\/os>/p' >/usr/share/ OVMF/OVMF_ CODE.fd< /loader>
...
<loader readonly='yes' type='pflash'
...
focal-wallaby:
-------------
Finally, upgraded to focal-wallaby (which does not need the fix at all), focal-wallaby' . Versions (#17 plus one):
as in comment #17, using 'cloud:
$ for app in rabbitmq-server keystone cinder glance neutron-api neutron-gateway placement nova-cloud- controller nova-compute; do juju status | awk '/'$app' / { print $1, $2; quit }'; done controller 23.2.2
rabbitmq-server 3.8.2
keystone 19.0.1
cinder 18.2.1
glance 22.1.1
neutron-api 18.6.0
neutron-gateway 18.6.0
placement 5.0.1
nova-cloud-
nova-compute 23.2.2
Verified the patched code is not there anymore:
$ juju ssh nova-compute/0 'grep -r ubuntu_ libvirt_ uefi_loader_ path /usr/lib/ python3/ dist-packages/ nova/'
$
And the VM still boots successfully after stop/start:
$ openstack console log show test | grep -o 'test login:'
test login:
The new guest XML is refactored/ different from Ussuri/Victoria,
as expected, due to qemu firmware metadata files in Wallaby:
$ juju ssh nova-compute/0 sudo virsh dumpxml instance-00000002 2>&1 | sed -n '/<os>/,/<\/os>/p' 'pc-i440fx- 4.2'>hvm< /type> >/usr/share/ OVMF/OVMF_ CODE_4M. fd</loader> '/usr/share/ OVMF/OVMF_ VARS_4M. fd'>/var/ lib/libvirt/ qemu/nvram/ instance- 00000002_ VARS.fd< /nvram>
<os>
<type arch='x86_64' machine=
<loader readonly='yes' secure='no' type='pflash'
<nvram template=
<boot dev='hd'/>
<smbios mode='sysinfo'/>
</os>