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: I6f8bd495a2078b5683a05a63124d7902d0a86f74
The cloud-compute relation uses the private-address setting to
reflect the hostname/address to be used for vm migrations. This
can be the default management network or an alternate one. When
this charm populates ssh known_hosts entries for compute hosts
it needs to ensure hostname, address and fqdn for the mgmt network
is included so that Nova resize operations can work if they use
the hostname from the db (which will always be from the mgmt
network).
Change-Id: Ic9e4657453d8f53d1ecbee23475c7b11549ebc14
Closes-Bug: #1969971
This patch checks if HTTPS configuration is enabled in Apache to
determine if the websocket protocol should switch from 'ws' to 'wss' or
not.
Change-Id: I738652373604966b6df079e45a0ad26c83e21688
Closes-Bug: #2039490
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: I25df688c9ec07168b825815b1e1c27ecf2673d2b
The was removed from upstream nova in the 2023.2 cycle
via commit 5edd805fe2395f35ecdfe5b589a51dc00565852f.
The nova release note states:
The ``AvailabilityZoneFilter`` was deprecated for removal
in 24.0.0 (Xena) and has now been removed.
The functionality of the``AvailabilityZoneFilter`` has been
replaced by the``map_az_to_placement_aggregate`` pre-filter.
The pre-filter was introduced in 18.0.0 (Rocky) and enabled
by default in 24.0.0 (Xena). This pre-filter is now always
enabled and the ``[scheduler] query_placement_for_availability_zone``
config option has been removed.
This change also syncs the charm-helpers change from:
https://github.com/juju/charm-helpers/pull/850
Closes-Bug: #2037751
Closes-Bug: #2036766
Change-Id: I315900a7e32ec66b27fa69961e9b7dcb9fa1f949
This new interface consumes information exposed by openstack-dashboard
to correctly configure nova-serialproxy and allow requests coming from
the web browser that tries to load the serial console.
Change-Id: I2d82abffb9649f16a792f180806cea36cc5e25df
Closes-Bug: #2030094
This change moves the default return value for the Keystone api_version
to 3.0 instead of 2.0. By this point in time, all supported OpenStack
releases use Keystone API version 3.0 instead of 2.0.
This was previously causing Nova templates to render with 2.0 in the
Keystone auth URL instead of 3.0, which caused auth failures.
Closes-Bug: 1995778
Change-Id: I6463a24fe4aaa654a58cff56720a55f0950db717
Bug LP 1863232 introduced a new Apache configuration option called
WSGISocketRotation which allows users to disable wsgi socket
rotation. This patch makes this configurable with a new
wsgi-socket-rotation config option that defaults to the Apache
default and can optionally be set to False.
Closes-Bug: #2021550
Change-Id: I85d48b646b3d0778aae3a7dd3942ad45b4af002d
This is a rebuild/make sync for charms to pickup the fix in charmhelpers to fix
any inadvertant accesses of ['ca'] in the relation data before it is available
from vault in the certificates relation. Fix in charmhelpers is in [1].
[1] https://github.com/juju/charm-helpers/pull/824
Closes-Bug: #2028683
Change-Id: Ifb8dd875065af94e6aa1b2433638ea52b410b72f
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: I76332eb6f80b494015d461cf968604fe795b16f1
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: I3a5f61c39ce1d3f663f5f5c9d9f4ac19d1fc6886
This patch configures nova-cloud-controller to send a service token
along with the received user token on requests sent to other services.
This allows those other services to accept the request even if the user
token has been invalidated since received by the nova services running
in nova-cloud-controller units, the same applies for incoming requests
from other services. Service tokens exist since Openstack Queens.
Change-Id: I95021600da8af12cb75ef5681fb5af8780ade4f8
Closes-Bug: #1992840
When taking the nova-cloud-controller from single unit to full HA by
increasing the number of units from 1 to 3 and relating it to hacluster,
the data set on the cloud-compute relation is not updated, because the
update_nova_relation() function is only called on
cloud-compute-relation-joined and config-changed, none of these hooks
are executed when scaling out the application.
This patch introduces a call to update_nova_relation() on
ha-relation-changed.
Test case on an environment deployed with a single unit of
nova-cloud-controller:
export NOVA_CC_VIP=10.0.0.11
juju config nova-cloud-controller vip=$NOVA_CC_VIP
juju deploy --series jammy --channel 2.4/stable hacluster \
nova-cloud-controller-hacluster
juju add-unit -n 2 nova-cloud-controller
juju deploy --series jammy memcached
juju add-relation memcached nova-cloud-controller
juju add-relation nova-cloud-controller nova-cloud-controller-hacluster
Change-Id: Ib08bf9b6e1ce2b69be4d99ffe0726b59d81f4bc9
Closes-Bug: #2002154
* 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: I367b12d6919747d987f30020575a467f1c473fef
This change add several configuration options to enable HTTP checks
to the HAProxy configuration, instead of the default TCP connection
checks.
Closes-Bug: #1880610
Change-Id: I4a947c5b52eb3283c08a0d39cc9bf14695a63eab
- Replace ".has_calls(...)" with ".assert_has_calls(...)"
- Use "self.Client()" instead of "self.Client", because otherwise the
wrong mock object is tested.
Related-Bug: #2012108
Change-Id: I8649ba727a75c8dcb86404ed4c3def12e0fdda01
The IdentityServiceContext was recently updated to add the application
data bag. Unfortunately, they keystone charm uses both the regular
relation data primarily, but the updates for endpoints are on both the
application database and the regular relation data. The
IdentityServiceContext used the app data bag exclusively if there were
any keys available, which leads to it ignoring the existing relation
data entirely; this results in 'identity relation not ready' with
missing data items.
charm-helpers is patched at [1] to solve the issue and this is a
charm-helpers sync that includes that patch. This changes the
functionality of the IdentityServiceContext so that it preferentially
selects keys from the application data bag unless they are None, in
which case it tries for those keys on the existing relation data. e.g.
it will stitch the two relations together with the app data bag taking
priority. This allows the nova-cloud-controller charm to correctly
access the identity relation data and form a complete context.
[1] https://github.com/juju/charm-helpers/pull/746
Change-Id: Ic868213c6bb42bc2a28ad25a2f7344a28ab9f04d
The method was refactored (in part) to use sets to enforce uniqueness of
the hosts. Unfortunately, a list method (.append()) slipped through
that should have been converted to .add(). This fixes that error.
Change-Id: I248430cd1a9156efab745fe110a39441b503b3a5
Closes-Bug: #1992789
The linked bug shows the install of the charm with openstack-origin set
to zed. This happens because configure_installation_source() causes the
openstack-release package to be installed *before* the zed cloud archive
sources are configured into /etc/apt and an apt update done. This means
that the openstack-release package says "yoga" despite the zed packages
actually being installed.
Then, on the config-changed hook, it sees that the installed version is
showing as yoga and tries to do an upgrade. This fails, as the charm
hasn't yet bootstrapped, and the charm tries to bootstrap after
upgrading the packages.
There's a few bugs here which are exposed, but the tactical fix is to
force the openstack-release to match the installed packages.
Closes-Bug: #1989538
Change-Id: Icdef04e25e74c0a18fd49997c5f5b0540d583f40
This patch adds kinetic to the metadata.yaml and ensures
that a run-on base for 22.10 is added in the
charmcraft.yaml
Change-Id: I64af53fe6a37d1dcc8e7f9fcbc887367b9c21eea
* 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: I8f2c34f3a4a0601ee19aa694b323cc0f9ee65616
This sync is needed to bring in 2 fixes:
- python 3.10 (collections.abc.Iterable).
- Handle NoNameservers exception in ns_query().
Change-Id: I0b965b47b814e99d484682d7c90dcd60dd810ae7
The charm looks for endpoint changes and restarts the nova-scheduler
when the endpoint changes. However, the nova-conductor also needs to be
restarted in order to pick up new endpoints.
Closes-Bug: 1968708
Change-Id: I18dee4eb46bd836805e60427c0afc508e2489111
- Add 22.04 to charmcraft.yaml
- Update metadata to include jammy
- Remove impish from metadata
- Update osci.yaml to include py3.10 default job
- Modify tox.ini to remove py35,py36,py37 tox target and add py310
target.
- ensure that the openstack-origin is yoga
Change-Id: Ia0cdf927a4d4d2339ca1739066bf9a965c97d190
The original code was appending a str to a list rather than either
appending it or adding it as a list of one element. The code avoids
append to avoid unintentional side-effects.
Change-Id: I1466981f1d68f8dea3bbe32fdde6c4825056c0d0
Closes-Bug: #1927698
Using affinity/anti-affinity policies sometimes we get into a race
condition on the resources that are available on the hypervisors.
This flag allows to increase the number of retries and hence hosts
to schedule on and therefore allowing the successful scheduling
of instances.
This option was taken from the following URL, while future work
with placement is done to help with scheduling with affinity
https://docs.openstack.org/nova/latest/admin/troubleshooting/affinity-policy-violated.html
Signed-off-by: Arif Ali <arif.ali@canonical.com>
Change-Id: I353dbaa38eb0526014888ede27702b428eb66afd
It's useful to force instance creations to fail if ephemeral drives are
requested when cloud admins want users to use persistent volumes always.
Closes-Bug: #1953561
Change-Id: I1c958b4bcf79512c06de6d81fe55c681bb5f38a7
This update is to ensure that the Zuul Canonical CI builds the charm
before functional tests and ensure that that artifact is used for the
functional tests. This is to try to ensure that the charm that gets
landed to the charmhub is the same charm that was tested with.
Change-Id: I7c695c77c67f43f02c72c3b50d949c451be53bc3
By default resizing an instance to the same host as the source is
not enabled. This change adds new charm config option that maps
directly to the nova.conf setting which effectively gives a user
possibility to enable/disable this functionality.
Closes-Bug: #1946620
Change-Id: I13d0c332cd0b110344b7a1645e3e4fd250fce33a
nova-consoleauth was removed for OpenStack >= Train, this change will
remove the nrpe check associated with it when is_consoleauth_enabled()
returns False.
Change-Id: I891634fc8001597089312801b29a80336543f5f0
Closes-Bug: #1904650
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.
Note that https://github.com/openstack/charms.openstack is used during tests
and he need `mock`, unfortunatelly it doesn't declare `mock` in its
requirements so it retrieve mock from other charm project (cross dependency).
So we depend on charms.openstack first and when
Ib1ed5b598a52375e29e247db9ab4786df5b6d142 will be merged then CI
will pass without errors.
Depends-On: Ib1ed5b598a52375e29e247db9ab4786df5b6d142
Change-Id: Id925078c5c04c2f89a570bdf7171c666839f9e40