Sysctl rules fined in charm config fails to be
applied in ovn enviroments because the rules are
applied before nf_conntrack is loaded.
By adding nf_conntrack to the /etc/modules file
it guarantees that it will be loaded before the
rules are applied.
Closes-Bug: #1922778
Change-Id: I51dae65cdc06e35230160bcaedda99710a72617d
Since OpenStack Train release the 'cpu_models' config option
has superseded the 'cpu_model' config option in the nova.conf.
This patch adds support for the new 'cpu_models' allowing a user
to provide a comma separated list of supported, named CPU models.
This patch also includes a unit test for the cpu_mode='custom'.
Closes-bug: #2025914
Change-Id: I30328abc07d3304f1bfb67c81360fb5229214c97
Implement initial support for container-scoped storage-backend
relation to integrate nova-compute with storage providers.
Transition to blocked state if multiple storage backend
relations are connected
Change-Id: I03e67731df0263887d2d0f671750f420d6e62c1c
These updates, on the master branch, are to support testing the caracal
packages and support of the charms for caracal. They do NOT lock the charms
down, and don't change the testing branches to stable branches.
Change-Id: Ib7947ab8dfd4c4b18c482f4df1a7c6f5b5e3756f
This change reworks previous changes [1] and [2] that had
been respectively reverted and abandoned.
When using the config libvirt-image-backend=rbd, VMs
created from image have their disk data stored in ceph
instead of the compute node itself.
When performing live-migrations, both nodes need to
access the same ceph credentials to access the VM's
disk in ceph, but this is currently not possible
if the nodes involved pertain to different
nova-compute charm apps.
This patch changes app name sent to ceph to
'nova-compute-ceph-auth-c91ce26f', a unique name common to
all nova-compute apps, allowing all nova-compute apps to
use the same ceph auth.
This change also ensures newly deployed nodes install
the old credentials first on ceph-joined hook,
and then supercedes it with the new credentials
on ceph-changed hook, therefore also retaining
the old credentials.
This patch also includes the charmhelpers sync
from PR: #840
[1] https://review.opendev.org/889642
[2] https://review.opendev.org/896155
Closes-bug: #2028559
Related-bug: #2037003
Func-Test-Pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1149
Change-Id: I1ae12d787a1f8e7761ca06b5a80049c1c62e9e90
When using NVMeoF feature with nova-compute apparmor in enforce
mode, nova-compute is denied from running /usr/sbin/nvme and
/usr/sbin/blkid, and reading /etc/nvme/hostnqn.
Change-Id: Ia23fbf341d5b7ad469337d8a0c65c18ec519a891
Closes-Bug: #2039161
Nova-compute uses ssh and scp commands extensively and this
patch allows the process to read the configuration too in
/etc/ssh/ssh_config.d/ directory.
Closes-Bug: #2044983
Change-Id: I336ce64d493c549096d0b8706996e0f17a2728fb
Patch out charmhelpers.osplatform.get_platform() and
charmhelpers.core.host.lsb_release() globally in the unit tests to
insulate the unit tests from the platform that the unit tests are being
run on.
Change-Id: I33d473d83a7c8f4f23840b6b6bcf153ed423ccdc
This reverts commit c3c2cf0349.
Reason for revert: This introduces an undesired behavior when scaling-out that needs to be addressed in a complementary patch.
Change-Id: I21c127aa565e489ba4d93a1efc8ddba63ef32e87
When using the config libvirt-image-backend=rbd, VMs
created from image have their disk data stored in ceph
instead of the compute node itself.
When performing live-migrations, both nodes need to
access the same ceph credentials to access the VM's
disk in ceph, but this is currently not possible
if the nodes involved pertain to different
nova-compute charm apps.
This patch changes app name sent to ceph to 'nova-compute',
allowing all nova-compute apps to use the same ceph auth.
This patch also includes the charmhelpers sync
from PR: #840
Closes-bug: #2028559
Change-Id: I7222661017655fd7225db0c677f1a8f5ebb7984d
The template previously could use v2.0 depending on the value of
api_version. This was causing issues in newer releases of OpenStack
where the value of api_version was reporting as something other than
"3", and the generated Ironic config tried to use the v2.0 Keystone API.
This patch removes the optional logic in the template for v2.0 and rely
on the global default just like templates/parts/section-placement does.
Closes-Bug: #1995778
Change-Id: I8e0270b933f9c8fb5d6a65f9ebb930a0b21fead8
Add the 'docs' key and point it at a Discourse topic
previously populated with the charm's README contents.
When the new charm revision is released to the Charmhub,
this Discourse-based content will be displayed there. In
the absense of the this new key, the Charmhub's default
behaviour is to display the value of the charm's
'description' key.
Change-Id: I73c3ffa7632bbb2903b9c81d94af7dabae0b19da
Sync from charm-helpers to update [service_user] config to use the
service domain.
The keystone charm currently creates two service users, one for the
service domain (for v3 authentication), and the other for the default
domain (for v2 authentication). The [service_user] config needs to
use the service domain.
Closes-Bug: #2026202
Change-Id: Ia1329a6c53cc4b532436751f0396149139a88172
After evacuations and revert resizes when using rbd storage backend,
the instance folder is usually left behind and causes issues when
migrating the instance back to the host.
With the config option set, the nova-compute service will cleanup
those folders as part of the periodic checks that run for instances
that have been evacuated/migrated.
Closes-bug: #2019141
Change-Id: I846ccb0a95d04139b41fdad6cbf465d303d6cc09
This patch configures Nova to send a service token along with the
received user token on requests to other services. This can allow those
other services to accept the request even if the user token has been
invalidated since received by Nova. Also with this patch Nova will
accept request from other services with invalid user tokens but valid
service tokens. Service tokens exist since Openstack Queens.
Closes-Bug: #1992840
Change-Id: I78b43ef77dc1d7b5976ec81ecddf63c9e6c8b6c1
* Voting was turned on for jammy-antelope in the
project-template for charm-functional-jobs in zosci-config
* Voting for jammy-antelope bundles with non-standard names
is turned on in individual charms
* Kinetic-zed bundles/tests are removed
Change-Id: Ic290801451f6537e25dfb0330a81598bbafa7135
The subordinate charms should manage the services that
they deploys and configure, not the principle they are related to.
This change switches the approach for restarting services
from having the nova-compute charm doing it directly to having
nova-compute triggering the restart by request a restart down
the existing relations.
Closes-Bug: #1947585
Change-Id: I7419e39d68c70d21a11d03deeff9699421b0571e
This is needed as all mkfs.* variants end up calling mke2fs.
Closes-bug: #2008391
Related-Bug: #1960231
Change-Id: I940bf0ca9cd330ae0b45b53d0d19844806a4bbbb
OVS introduced a new service called ovs-record-hostname.service which
records the hostname on the first start in the ovs database to identify
the ovn chassis, this is how it achieved a stable hostname and be
resilient to the changes in the FQDN when the DNS gets available.
This change introduces the same approach for nova-compute charm. In the
first run of the NovaComputeHostInfoContext the value passed in the
context as host_fqdn is stored in the unit's kv db, and re-used on every
subsequent call.
This change affects only new installs since the hint to store (or not)
the host fqdn is set in the install hook.
Change-Id: I2aa74442ec25b21201a47070077df27899465814
Closes-Bug: #1896630
It was found that the modules test_actions_openstack_upgrade and
test_actions_package_upgrade were mocking different classes and
functions right before importing the modules under test
(openstack_upgrade and package_upgrade respectively), although these
mocks weren't being reset making tests executions coming after them to
get benefitted (or impacted) by the mocks in memory.
This patch takes advantage of mock.patch() decorator at the class level
and importlib.reload() to make sure the mocks don't outsurvive the
module.
When the teardown was in place it was found a different set of functions
that were relying on that mocking, so they were patched to allow the
tests run in the expected (mock'ed) environment.
Summary of changes:
- Move get_availability_zone() to contexts module, nova_compute_utils
depends on nova_compute_context, the latter shouldn't be importing
code from the former since it breaks the layering, even when the
import is being done within a function's body.
- Mock env variable JUJU_UNIT_NAME per test case, the tests defined
in the test_nova_compute_utils and test_nova_compute_contexts were
relying on the leakage of mocks set by other test modules, this
makes them run in an isolated fashion.
- Move update_nrpe_config testing to its own class, the main class
NovaComputeRelationsTests mocks the function update_nrpe_config()
making it difficult to test it in a test method, hence making the
test part of its own class it's posible to not mock the function
and correctly runs its implementation.
- Teardown mocks made at import level.
Func-Test-Pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/997
Change-Id: I4468ef1a0619befc75c6af2bad8df316125a7cf5
vnc_enabled, novnc_enabled are depreacted but should
be in DEFAULT section. Commit [1] moved the deprecated
options under vnc group so they dont have any effect.
This leads to vnc as True which is default option
in nova.
Change the template to use enabled option instead of
deprecated ones
[1] 73edc4f817
Closes-Bug: #1998300
Change-Id: I4193c042f6b3a55dfb1dc57f0f4d3bc71e19006f
Unpin the versions of tox, setuptools, etc. This removes the issue
with tox 4.x breaking the virtualenv dependencies.
Change-Id: I103e16c70aee394331b37ec0cf323e014011d3ae
The default_ephemeral_format line in nova.conf was not in the [DEFAULT]
section in the templates and has therefore been ignored ny nova-compute.
This change moves it to the correct section for all releases.
Closes-Bug: #1992386
Change-Id: Idc0602f95e5378be1243926aa88dc7b5282ee844
On s390x environments there is no usb controller, hence the default
pointer model (usbtable) produces failures when launching new instances
with the following error:
unsupported configuration: USB is disabled for this domain,
but USB devices are present in the domain XML
Change-Id: I58f7f1148096d703384e089292959718fd413157
Closes-Bug: #1962381
- Drop extra-repositories from jammy-zed bundle. The repository
ppa:openstack-charmers/swtpm is only needed when running on Focal,
the Ubuntu Archive >= Jammy contains the needed packages.
- Drop 'source' config key from rabbitmq-server and
mysql-innodb-cluster. The infrastructure support charm are sourced
from 'distro' and they don't need to configure an UCA source.
Change-Id: Ia60e46b8b2d35034767a2932176ec799c2e086bf
Closes-Bug: #1994055
* sync charm-helpers to classic charms
* change openstack-origin/source default to zed
* align testing with zed
* add new zed bundles
* add zed bundles to tests.yaml
* add zed tests to osci.yaml and .zuul.yaml
* update build-on and run-on bases
* add bindep.txt for py310
* sync tox.ini and requirements.txt for ruamel
* use charmcraft_channel 2.0/stable
* drop reactive plugin overrides
* move interface/layer env vars to charmcraft.yaml
Change-Id: I506c53b4956024066bc769665525cb022438a0ae
This merge request focuses on fixing the VNC config for OpenStack Yoga
on the Focal and Jammy series. Originally, the Yoga version of this
charm was using a template nova.conf file from Train which did not use
the new [vnc] required for Yoga. Train had the VNC config in the
[DEFAULT] section, which is depreciated in Yoga.
Itemized changes to charm below:
* Create templates/yoga
* Move VNC config to [vnc] section in nova.conf
* Rename VNC config keys to follow the Yoga specification.
Closes-Bug: #1974082
Closes-Bug: #1734683
Change-Id: Ic100528f9f38bbc0c83e4f563166113024e3db59
In iSCSI usecases including cinder-lvm, os-brick requires lock files
such as:
- /run/lock/nova/os-brick-connect_volume
- /run/lock/nova/os-brick-connect_to_iscsi_portal-192.168.0.1
and lsscsi requires following access to compose a rescan command such as
"/sys/bus/scsi/drivers/sd/2:0:0:0/rescan":
- /dev/
- /sys/bus/scsi/devices/
Closes-Bug: #1979812
Related-Bug: #1939390
Change-Id: Id2db3a70b8d1287bda006f1bbc5442038f7070f1
Commit abe5a289 fixed the rendering of the ironic driver in the
nova-compute.conf file for OpenStack versions >= Wallaby. However, it
always renders the nova-compute.conf file for train and above, which is
hard-coded to the Ironic libvirt driver.
This adds additional templating logic to the nova-compute.conf driver in
order to render the correct driver to use.
Related-Bug: #1968547
Change-Id: I12cd4bf5953170d227d52793764c49f3871e25f9