* Update charm-cinder from branch 'master'
to 6697f415ea01429058d1f1aacde899292bae6881
- Merge "Updates for caracal tox.ini"
- Updates for caracal tox.ini
Update the tox.ini file(s) to use the constraints file from
zaza-openstack-tests.
Change-Id: I4d743c10474904e379234357103bd96eecc7b59a
* Update charm-cinder from branch 'master'
to 26cc4b30b58abe3a8f53616745e3154993ef3b2b
- Merge "Use ids for cinder internal tenant and user"
- Use ids for cinder internal tenant and user
admin_tenant_id and admin_user_id are more explicit than
admin_tenant_name and admin_user as names could duplicate
and cause issues.
Includes sync from Charm-helpers PR #874 below
Charm-helpers-pr: https://github.com/juju/charm-helpers/pull/874
Closes-Bug: #2030755
Change-Id: Idbc2f3d12dcf325b4a53a3dda1ecfa75a199295a
* Update charm-cinder from branch 'master'
to ba3ac4a1dc051263bbe1f1e87ac924d5487d6a5b
- 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: I5d15739f7f0804323ec61629fea53fc13f638f34
* Update charm-cinder from branch 'master'
to 39462317b65c780a2e236a8efc5c2266ed41f095
- 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: I6807128492cb184de3ef5f454d0ea745246b242e
* Update charm-cinder from branch 'master'
to 8b366fbf6b56373958b9579faf98bff898e62378
- 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: Ieca45a470e7f827194780b2fee9f8c6049b94da3
* Update charm-cinder from branch 'master'
to 2e2fff42531cf3c16b9c2e2be4b71f68e5ca03dd
- 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: I1fe688bf595520f876d0c15c591ee8cac34d00f2
* Update charm-cinder from branch 'master'
to 32ceddef866d041e0235007af9e59d83a89dbc48
- Fix typo in actions.yaml
There was a typo in actions.yaml for the resume action that was breaking
builds. This change fixes that typo. The charm will build.
Closes-Bug: 2030677
Change-Id: Iebded9db63ace1d70a21c1b2e72f88f57044047f
* Update charm-cinder from branch 'master'
to d06c3a5e9fee05a284637878b3970267dec4a3b9
- 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: Ied0a22bcd255d9dd2d253db2a64e549963ce942d
* Update charm-cinder from branch 'master'
to 6f00af3e777ff53cfbe287536977f7ff3eb7f0c3
- 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: Ia8830828f363af91b0765ff4f761faefb5f00212
* Update charm-cinder from branch 'master'
to 43ff5e66e7ebe90f7d5834bf5b86336dcef58eae
- 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: Ice5953fb7e926fd8dcf48c895a1dc36210da1dfc
* Update charm-cinder from branch 'master'
to ebbedcbf58660ce13823152d6943fee036af7e11
- Render [service_user] only for identity-service relation
The service token section [service_user] is not required when
cinder-volume is deployed as a separate service. In other words
it is not required for the identity-credentials relation.
The [service_user] section is nearly the same as the
[keystone_authtoken] section, and the keystone_authtoken data
is only produced for the IdentityServiceContext, therefore this
change will not render [service_user] for the
IdentityCredentialsContext.
Closes-Bug: #2024676
Change-Id: Iaecae3c22db1f4f2309f73f8c6836e6c072b848b
* Update charm-cinder from branch 'master'
to 81c330b5d87a64a7a9ec601f4dd263b836ee9c01
- Add support for using service tokens
This patch configures Cinder 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 Cinder. Also with this patch Cinder 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: I6cb9b1cb257db0b57bd7984c795b8caa1e3b74d9
* Update charm-cinder from branch 'master'
to 739aed0a14ed842bd8d83f3aaa8654ceeedcc780
- Sync with charm-helpers
This sync includes this patch to charm helpers:
https://github.com/juju/charm-helpers/pull/757
which is an extension of this one:
https://github.com/juju/charm-helpers/pull/740
and both are meant to include templates to configure service tokens
in juju charms as shown in this lp bug:
Related-Bug: #1992840
Change-Id: Ib273f50d620160f62cbb3d6f5789bf334a7d6333
* Update charm-cinder from branch 'master'
to 05a28c19c710061fff20376f0972ae995c9834f0
- 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: Ieacd818299773e3ffee55ab3f7f052e2f57dd74a
* Update charm-cinder from branch 'master'
to c0f8e970d28fadfae383f2d3d7b7d35966b403e2
- 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 (which continue to be the default). It also enables /healthcheck
endpoint for cinder-api on openstack releases >= ocata.
Closes-Bug: #1880610
Change-Id: I9d118f70fc1390be7b800ad20ae20e77818adac7
* Update charm-cinder from branch 'master'
to 70deb577f9c51d41a8f1327adcc7c3edbe1959e4
- Merge "Add nova section for Ussuri"
- Add nova section for Ussuri
Commit 024de37 added the nova section on cinder.conf, but placed it
on the Victoria folder. This issue is also observed on Ussuri, so
this patch moves this from Victoria to Ussuri.
Closes-Bug: #1939389
Change-Id: Ia39177d6f47ddda0b1acb27cde02ae5e74a01032
* Update charm-cinder from branch 'master'
to ceafd9f67f3a5f404091d1f2fff7d2dcc9c71f47
- Fix missing assert_ prefix on called_with
test_clean_storage_unmount incorrectly used 'called_with' instead of
'assert_called_with' which just made a mock function call and didn't
check or assert that the function was actually called.
As a result this function didn't actually test anything, the expected
parameters were not correct so they have been updated.
An error to catch this accidental mistake was added in the recently
released mock 5.0.1 (https://github.com/python/cpython/issues/100690)
AttributeError: 'called_with' is not a valid assertion.
Use a spec for the mock if 'called_with' is meant to be an attribute.
The mock library ships in python as unittest.mock but also publishes the
latest code as the 'mock' python package so that older python versions
can get the latest code. The stable branches currently install mock
but the master branch does not, so this error does not actually appear
on master but only the <=yoga stable branches currently. The test is
however wrong either way.
Change-Id: I3076778e8fc62c086651d29abb2c5a3d9921be97
* Update charm-cinder from branch 'master'
to ba8d8fc3e10f3ad0cbde08faa52db0f3234b139f
- Add identity-credentials relation support
Implement support for the identity-credentials relation as an
alternative way to get keystone credentials when we are not registering
a service endpoint via the identity-service relation.
This solves an issue where the image volume cache does not work when the
cinder volume service is deployed as a second cinder application
('cinder-volume') having enabled-services=volume set.
Previously the following items were missing from cinder.conf:
cinder_internal_tenant_project_id
cinder_internal_tenant_user_id
Resulting in the image cache not functioning with the following warnings:
Unable to get internal tenant context: Missing required config
parameters.
Unable to get Cinder internal context, will not use image-volume cache.
As there are now two possible interfaces to keystone ('identity-service'
and 'identity-credentials') any existing bundles that don't specify the
interface 'identity-service' when relating to keystone will fail to
deploy and will need to be updated.
Closes-Bug: #1978452
Change-Id: Ieef500c9c55eb3968b3e2e231a8ff6e2a5ec148d
* Update charm-cinder from branch 'master'
to df94221404efcf3a1d58a36913e9f44a0c908444
- Merge "Retry online_data_migrations until exit code 0 or 2."
- Retry online_data_migrations until exit code 0 or 2.
The command 'cinder-manage db online_data_migrations' has three possible
exit codes:
- 0: The migrations have been completed successfully.
- 1: Some migrations have been completed, but more objects need to be
migrated.
- 2: Some migrations are generating errors and manual intervention is
needed.
This change will run in a loop the command online_data_migrations in
batches of 5000 objects, when the exit code is 1 runs again, when the
exit code is 0 the loop is stopped, when the exit code is 2 a
CalledProcessError exception is raised.
Change-Id: Iee99e9ab9777392f05c1a0db55951d97773bb0ba
* Update charm-cinder from branch 'master'
to 6ae6c1beef57e7dc27ba82722a09b3576f50df29
- Merge "Review README"
- Review README
Fix up organisation of storage backends in particular.
Make a corresponding minor change to config.yaml.
Apply README template.
Change-Id: Ic01bac2758f6659cd6cd821cb9672dd58804fdcc
* Update charm-cinder from branch 'master'
to d33a2d056729d007b6bbd91896ac3798a8b4d658
- Check for online_data_migrations when syncing db
Due to bug #1908037, the database sync can fail if the volume types
have not been migrated to the __DEFAULT__ volume type. When this fails,
a message will be sent telling the user to run online_data_migrations.
Check for this error, and when it occurs, run the online_data_migrations
and then retry the db sync.
Closes-Bug: #1908037
Change-Id: I0cd9a9db256b0adffbb244222a66c85d055840c4
* Update charm-cinder from branch 'master'
to 0fa3fdadd03eb5ee7178e88f3ad99777d41a3439
- 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: Ifc35474c98b1ffa1d7d81ac42deb897ace7db885
* Update charm-cinder from branch 'master'
to ba21da64f6a547bd44956d71933030d529956bcd
- Re-enable AppArmor enforcement
Ensure tests are run with aa-profile-mode=enforce. So we should be able
to notice any future behavioral changes in the upstream or additional
rules required for nova-compute AppArmor profile in the functional
tests.
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/870
Depends-Onː Id2db3a70b8d1287bda006f1bbc5442038f7070f1
Related-Bug: #1979812
Related-Bug: #1939389
Change-Id: If658d9e8ee11248ef09e774f3e21fe0f801dc066
* Update charm-cinder from branch 'master'
to 8656303f2973bcce4eca0ba95ceb6aa8f84b48f8
- 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: Ifded78d4a56769f5a298deb64360c3e6dd9afb9b
* Update charm-cinder from branch 'master'
to cdc2fc738f2ac521c3952a48bf44f0da6d839130
- 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: Ie133bc41bf789e07d4d777e128617b21d822de30
* Update charm-cinder from branch 'master'
to 024de3783fc459fc25596ec6084dd065e945df76
- Add nova section
Cinder sometimes needs to communicate with nova,
for example to notify VMs when live-resizing a disk.
Under certain circumstances,
the autodetected authentication details don't work,
so we must add a dedicated section in the config
for the nova client with proper credentials.
This issue has been observed on victoria and newer,
hence the addition of cinder.conf for victoria.
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/776
Closes-Bug: #1939389
Co-authored-by: Samuel Walladge <samuel.walladge@canonical.com>
Change-Id: I6d44223b7c2863c6d9c62b46a41275fd360f92d1
* Update charm-cinder from branch 'master'
to a50281db835fc139912f09fedb6e00dba9f333a5
- Stop endless cycles on openstack upgrade
If an HA cinder deployment is upgraded twice and the leadership has
changed, there is a potential race that can be triggered where because
the CINDER_DB_INIT_RKEY is different on the units that have been the
leader. This race is that when the unit tries to decide whether it has
reflected the 'new' RKEY it sees a different one from each unit. By
clearing the rkey, it ensures that only the relation changed event from
the leader actually causes a restart.
Change-Id: I712502a666f23421cc58925f10b7643e3482d861
Closes-Bug: #1928383
* Update charm-cinder from branch 'master'
to 1f45d8c5ae029e46877b8734b8bd9138bc388cf3
- Merge "Sync charmhelpers to get fixes"
- Sync charmhelpers to get fixes
Change-Id: Id4ea5c5258d467b4eae1345721f1750ebfca2483
Related-Bug: #1965967
* Update charm-cinder from branch 'master'
to bc3b511544995ef22bcac335e9edc45428b67a37
- Merge "Check if the newhost exists instead of currenthost"
- Check if the newhost exists instead of currenthost
Closes-Bug: #1956470
Signed-off-by: Dongdong Tao <dongdong.tao@canonical.com>
Change-Id: I2b9eec030a5b0f6d9a405cecea29bef04eb72f5d
* Update charm-cinder from branch 'master'
to f5ec72dac8a0e1e997d5da0224b8e1f8e63dcc13
- 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
- sync charmhelpers
Change-Id: I359df29fb7c86caf0c29c7f35c3e4b68392ba5ad
* Update charm-cinder from branch 'master'
to a0f44d0f90074495427880e7d03d0c324639a8c4
- Install ssl_ca for volume service only scenarios
The CA information is necessary to talk to Keystone or Glance from the
Cinder volume service. This is a follow-up of the following change where
the Vault certificate relations is assumed but ssl_ca wasn't addressed
at that point.
I69f15c3fd164f7114f5498d100b2832caf93fb00
Closes-Bug: #1967302
Change-Id: I4d7b3721fe7dfd6f7cdfd364d8c5bc340d38c00f
* Update charm-cinder from branch 'master'
to 8903fdca5e38c7f090f2e428e66b63148f13e592
- 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: Ic7cf54d7669219f4a42e08c8a1e2adb786a16af6
* Update charm-cinder from branch 'master'
to 7f97a6d30efa27f0738b10f411114e1f85919363
- Add support to configure scheduler_default_filters
Add new config option: `scheduler-default-filters`.
This is unset by default, so cinder retains the default value for
scheduler_default_filters.
Closes-Bug: #1956727
Change-Id: I9777bf8fe5ddbb69689db60c2790e8a4be57e1ab
* Update charm-cinder from branch 'master'
to 77fdcf3e2743528633bf5fd8802715aa46b8e736
- 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: I538b5c2a9df4de66c9874e65247496e54c0522e8
* Update charm-cinder from branch 'master'
to bde329d973f2d66f800a15d0f4721fc949a609b1
- Make sure iscsid has a unique InitiatorName
os_brick may require InitiatorName in /etc/iscsi/initiatorname.iscsi
before iscsid is invoked via iscsid.socket with iscsiadm. Cloud images
including MAAS ones have "GenerateName=yes" instead of "InitiatorName="
on purpose not to clone the initiator name. Let's initialize it so
Cinder units can be fully ready to accept iSCSI based subordinate and
storage backend charms.
Closes-Bug: 1825809
Change-Id: I413bbb29dd609e0c86ac3691556f37a9fcc13439
* Update charm-cinder from branch 'master'
to bc48c60f1cd0bf7ceb8813dced504f5e0d37d829
- Drop creation of v2 endpoint from OpenStack Xena+
In this patch we drop creation of the v2 volume endpoint for
OpenStack Xena onward. Upstream cinder removed the block storage
v2 API in commit e05b261a "Remove Block Storage API v2".
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/670
Depends-On: https://review.opendev.org/c/openstack/charm-cinder/+/816007
Closes-Bug: #1947387
Change-Id: Ie553a53f794f2cdd262bf77364e6374244844b92
* Update charm-cinder from branch 'master'
to dcbce12befbc6440d1d1d233aec6523bb732a059
- Add yoga bundles and release-tool syncs
* charm-helpers sync for classic charms
* sync from release-tools
* switch to release-specific zosci functional tests
* run focal-ussuri as smoke tests
* remove trusty, xenial, and groovy metadata/tests
* drop py35 and add py39
Change-Id: If7019d54b67c10407c0db5fac098aa9cee993f1c
* Update charm-cinder from branch 'master'
to c5896a884a54d0171415d79a82a284e2ff6b2ca9
- Revert "Group cinder-volume services using cluster config"
This reverts commit 2603a774b112dc6e25f9e7b2071124ea3d3d0012, which
converted cinder to use cluster configuration for stateless services.
While well-intentioned, this causes problems due to the lack of a
proper migration for those backends which are not able to support
ACTIVE-ACTIVE configuration.
Configurations that do not support ACTIVE_ACTIVE driver will have the
volume service fail to start, which will cause a service outage.
Change-Id: I7bf4baaf80e5bb58b5c1cf55a2065f3bc50dbced
Related-Bug: #1945239
* Update charm-cinder from branch 'master'
to 86a2708260c71fec36ad7ca24c1dd3a960d407e0
- Merge "Deprecate LVM support and add NetApp support"
- Deprecate LVM support and add NetApp support
Deprecate LVM support in the README and point to the
cinder-lvm charm instead. Edit config.yaml accordingly.
The CDG will soon be updated by having a page in the
'Special charm procedures' section included.
Include a section on NetApp support in the cinder-netapp
charm.
Links to the two cinder-* charms are momentarily broken.
And that's ok.
Edits according to the latest charm README template.
Change-Id: Ie4a0f337277ed14388f1b5c189efbbab568a29b7
* Update charm-cinder from branch 'master'
to 6bc43bd7569dac7b24c20b8ee77eb490c1b5e5ce
- Merge "Group cinder-volume services using cluster config"
- Group cinder-volume services using cluster config
Usage of "host" config for grouping cinder-volume
services for the purpose of stateless config and/or
active-active HA is not recommended.
The usage of "cluster" config is recommended for
achieving that behavior. This change replaces the
usage of "host" with "cluster".
Change-Id: I249ce179cfdaf2394ee4e8481a8c9644d667ea99
Closes-bug: #1945239
* Update charm-cinder from branch 'master'
to f32f3b735cdeaf02fe2d586d42b1e6cfb876efa3
- Merge "Process subordinate releases packages map"
- Process subordinate releases packages map
For principal - subordinate plugin type relations where the
principal Python payload imports code from packages managed by a
subordinate, upgrades can be problematic.
This change will allow a subordinate charm that have opted into the
feature to inform its principal about all implemented release -
packages combinations ahead of time. With this information in place
the principal can do the upgrade in one operation without risk of
charm relation RPC type processing at a critical moment.
Related-Bug: #1806111
Change-Id: Ic8ea4fe6109081814045adea7ce6688b3564c9e5
Co-authored-by: Aurelien Lourot <aurelien.lourot@canonical.com>
* Update charm-cinder from branch 'master'
to dd5137c2e77da52a27f7aceb47370f0b371029b3
- Add support for configuring image volume cache
Support new configuration to turn on image volume cache in Cinder
service. User can control the maximum size and count from
configuration too.
Closes-Bug: #1869903
Change-Id: If96dbb9c0974bfa1f6d67405bb430a7cd251f821