* Update charm-nova-cloud-controller from branch 'master'
to 007f302ed6e8ac3750661fce615632e3b972f2a1
- Updates for caracal testing support
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
* Update charm-nova-cloud-controller from branch 'master'
to 05b081bf5ffa24045a1fef3b18d2e28fec52d604
- Ensure mgmt network hostname and fqdn in known_hosts
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
* Update charm-nova-cloud-controller from branch 'master'
to b915f8e6f81df6a776fc1ad6725207a199440a3b
- Use wss protocol when SSL enabled
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
* Update charm-nova-cloud-controller from branch 'master'
to 3d237a44ec054026deb7047b8ff5d8316e9d9b57
- Improve platform mocking
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
* Update charm-nova-cloud-controller from branch 'master'
to f022edc81f271020a4fcba722eeda13d794b0b72
- Merge "Drop AvailabilityZoneFilter inline with upstream removal"
- Drop AvailabilityZoneFilter inline with upstream removal
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
* Update charm-nova-cloud-controller from branch 'master'
to bab1e0e3c72af942feb3f8bcb46ca324450a901e
- Merge "Add new interface 'dashboard'"
- Add new interface 'dashboard'
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
* Update charm-nova-cloud-controller from branch 'master'
to 98581a04d5ec74a9257dbdad0cb41f594257700b
- Update default Keystone api_version
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
* Update charm-nova-cloud-controller from branch 'master'
to e0d3b6a36553f3627c86bdef420fd55e24e9a0b5
- Support disabling apache wsgi socket rotation
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
* Update charm-nova-cloud-controller from branch 'master'
to b58f88263fe399496ddf1d8631533dc0920a8c19
- Merge "Ensure get_requests_for_local_unit doesn't fail on incomplete relation"
- Ensure get_requests_for_local_unit doesn't fail on incomplete relation
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
* Update charm-nova-cloud-controller from branch 'master'
to 3ace19e60188b9b25485c8fe6e88607c7d3e3561
- Add 2023.2 Bobcat support
* sync charm-helpers to classic charms
* change openstack-origin/source default to bobcat
* add mantic to metadata series
* align testing with bobcat
* add new bobcat bundles
* add bobcat bundles to tests.yaml
* add bobcat tests to osci.yaml
* update build-on and run-on bases
* drop kinetic
* update charmcraft_channel to 2.x/stable
Change-Id: I6886c96797784c3b98b965ebe1b4a99de22d84a0
* Update charm-nova-cloud-controller from branch 'master'
to 636c9e35985f3a462adf5c797656118c895e065f
- Add docs key and point at Discourse
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
* Update charm-nova-cloud-controller from branch 'master'
to 1c1ab7658ee1b8c21e025bdc437844bc91976b3b
- Use service_domain in [service_user] section
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
* Update charm-nova-cloud-controller from branch 'master'
to fd810f9afd92904cd66544c00610f830fd337299
- Add support for using service tokens
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
* Update charm-nova-cloud-controller from branch 'master'
to 9adc198f74a7a5270acf0b295b16f004c41a2d59
- Sync with charm-helpers
This sync includes these patches to charm helpers:
https://github.com/juju/charm-helpers/pull/740https://github.com/juju/charm-helpers/pull/757
Both are meant to include templates to configure service tokens
in juju charms as shown in this lp bug:
Related-Bug: #1992840
Change-Id: I31e95e227f82a4049d5f639516ed4ef5ef52d354
* Update charm-nova-cloud-controller from branch 'master'
to 366df4c07e2cd6b36345051c90585d27916e81a6
- Update nova relations data on ha-relation-changed
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
* Update charm-nova-cloud-controller from branch 'master'
to 09928ae295ef5aecb52a3c82b48a157d4df60dea
- Merge "Enable jammy-antelope voting and drop kinetic-zed tests"
- Enable jammy-antelope voting and drop kinetic-zed tests
* 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
* Update charm-nova-cloud-controller from branch 'master'
to 00fad27866e4bca9962215bad7b2eb1df93a9c1c
- Merge "Update unittests"
- Update unittests
Drop the use of the pattern "self.assertTrue([...].called)" in favor
"[...].assert_called()"
Change-Id: I6546623d043c4bde14b8532fa9125f8a12db280d
* Update charm-nova-cloud-controller from branch 'master'
to fb0a570ad1caf9a422c34abbbc35508617671780
- Merge "Add support for HAProxy L7 checks"
- Add support for HAProxy L7 checks
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
* Update charm-nova-cloud-controller from branch 'master'
to d3f30c4d8f75de8a806fd7361cf8627b2b1e4a9f
- Fix unittest
- 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
* Update charm-nova-cloud-controller from branch 'master'
to 1d06b80c8dfb5ce4aa5fa74ac444d6af961053b0
- ch-sync: IndentityServiceContext app data fixes
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
* Update charm-nova-cloud-controller from branch 'master'
to 007f9e33b0f111bcd22aebfa785bb5066832e802
- In nova_cc_utils.py:resolve_hosts_for: .append -> .add
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
* Update charm-nova-cloud-controller from branch 'master'
to abb8ee551c0abc91c986f2a8482c7462cd7a8e39
- Ensure openstack-release package is correct after install hook
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
* Update charm-nova-cloud-controller from branch 'master'
to 82c441de07669d709abc14528d3b87cb5342178e
- Ensure that kinetic/22.10 is enabled
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
* Update charm-nova-cloud-controller from branch 'master'
to f9206facdeb0c0a2bb755da05536f13234a41483
- Add Kinetic and Zed support
* 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
* Update charm-nova-cloud-controller from branch 'master'
to 43848ce1fc2f178b0cf2d53229f19f4868ea2be5
- charm-helpers sync.
This sync is needed to bring in 2 fixes:
- python 3.10 (collections.abc.Iterable).
- Handle NoNameservers exception in ns_query().
Change-Id: I0b965b47b814e99d484682d7c90dcd60dd810ae7
* Update charm-nova-cloud-controller from branch 'master'
to b13eaf757fa25c797aa59e75811a3751f4856765
- Restart nova-conductor on endpoint changes
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
* Update charm-nova-cloud-controller from branch 'master'
to 97f0144739c0bb9f1a9c4e53161cd1ec91967ab3
- Updates to enable jammy and finalise charmcraft builds
- 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
* Update charm-nova-cloud-controller from branch 'master'
to f501a36bc90b01b5e061003d4be9bfe49e03cb37
- Sync charmhelpers to get fixes
Change-Id: I40d3827949caf36b9d019985802e97806d91c025
Related-Bug: #1965967
* Update charm-nova-cloud-controller from branch 'master'
to f55776445f76097bca3f455550070613992b70f5
- Merge "Expose max_local_block_devices as an explicit charm option"
- Expose max_local_block_devices as an explicit charm option
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
* Update charm-nova-cloud-controller from branch 'master'
to e63c68d505ee2eb88a0edef83c4a63a8d827f9f6
- Fix bug where str is added to cached_hostset list
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
* Update charm-nova-cloud-controller from branch 'master'
to 0369f55efa046e9ecfaee317700fc203bcb8f656
- Merge "Add scheduler-max-attempts flag"
- Add scheduler-max-attempts flag
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
* Update charm-nova-cloud-controller from branch 'master'
to 1c7f320cb675424e7bc695c2b1bff41000b047fe
- Update to classic charms to build using charmcraft in CI
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
* Update charm-nova-cloud-controller from branch 'master'
to 690d1d190ca35958abd8d2c280a954e884e2c2f2
- Allow resizing to the same host
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
* Update charm-nova-cloud-controller from branch 'master'
to 4f1665cbfa70fac68a119801400f35056cca6ff9
- Merge "Remove nrpe check of nova-consoleauth when not needed."
- Remove nrpe check of nova-consoleauth when not needed.
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
* Update charm-nova-cloud-controller from branch 'master'
to 68a124df5d7c9f69e97e5fba2e7558b56310d1aa
- Merge "Drop default cpu-allocation-ratio to 2:1."
- Drop default cpu-allocation-ratio to 2:1.
The old default of 16:1 was, IMO, really only suitable for test
clouds (or niche use cases where a high over subscription makes sense
with a production workload). Our defaults should make sense for
production and this change reflects that.
Closes-Bug: 1942921
Change-Id: I17b64cab01fb7abe97309f5dbdf0295d72369226
* Update charm-nova-cloud-controller from branch 'master'
to 71bc3193262cdaca59f4a8dfda92d3de76aef47e
- Use unittest.mock instead of mock
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
* Update charm-nova-cloud-controller from branch 'master'
to 1e69076af668ffd1f3f0349c12e2c8bdf10da8e0
- Merge "Remove sync AZ test from queens"
- Remove sync AZ test from queens
The sync_compute_availability_zones test was incorrectly enabled
for bionic queens in commit e0a38a63 . This looks to have been
a simple typo while working on thee tests.yaml. The
sync_compute_availability_zones action is only supported on
stein or greater.
Change-Id: I64df5b4e9742d2a8c17042a7909277c5e9aa46a4
* Update charm-nova-cloud-controller from branch 'master'
to 46ff297948d8e7b0b2d23ba18329a86245f021d9
- Merge "Sharing SSH pubkeys across nova-compute apps"
- Sharing SSH pubkeys across nova-compute apps
SSH keys from nova-compute are now shared across all
nova-compute charm apps.
Closes-Bug: #1468871
Change-Id: Ia142eceff56bb763fcca8ddf5b74b83f84bf3539
* Update charm-nova-cloud-controller from branch 'master'
to 36ef217bc620bebe4475dbb1453d3c82ac5b9d73
- Fix SQLite locking issue on unit tests
stestr runs tests in parallel and this can cause issues with locking
when SQLite is not mocked out properly and gets used in a test. This
patch just switches Storage to use :memory: so that locking does not
occur.
Closes-Bug: #1908282
Change-Id: Iaa1c7b78dee498e0cc6dc6fccf12e74f22225ecd
* Update charm-nova-cloud-controller from branch 'master'
to 1a63d9c0b690638e3eab4df8a7666f98d2b68b7a
- Fix ssh keys duplication
Upon running hooks that update ssh_keys, they
end up duplicated in the /etc/nova/compute_ssh/* files
and cloud-compute relations because the code that
checks whether the keys already exist are currently
not working.
This change fixes the deduplication code and improves
unit tests, while also handling a special case for
specific ubuntu-version scenarios.
Change-Id: I93f9418d5340e7cb599a42970d78557362c1542f
Closes-bug: #1943753
* Update charm-nova-cloud-controller from branch 'master'
to fc33f99c5f563984b54339e3fe97495b56c6ff9b
- Change xenial-mitaka CI job to non-voting
Related-bug: #1938793
Change-Id: If1413fe220f174d373c75a3de775187fa6757751
* Update charm-nova-cloud-controller from branch 'master'
to 7ac2d020604d65b5d3655e652b9e2aa16ab15c24
- Overhaul README
Overhaul the charm README.
The section on SSH host lookup caching in particular
received a lot of attention.
Apart from formatting, the Spaces section was deliberately
left untouched as improvements are part of a separate
documentation effort.
Improve the 'cache-known-hosts' option entry in config.yaml.
Change-Id: I14019ad38a9c4976026c607daca9d768c692535c