Add configuration parameters cinder_store_user_name,
cinder_store_password, cinder_store_project_name and
cinder_store_auth_address to cinder volume type backend configuration.
This avoids a glance_store bug that prevents glance-api from starting.
Closes-Bug: #2052726
Change-Id: I4b6ca32ed426f77a326711c2457046dbda594e77
For cinder volume backend sections, ensure that enabling internal
endpoint usage for service access does not completely clear the
existing content of the section.
Change-Id: I383a0794e924db3c7f4ce47d1e3b88355c2475e4
Closes-Bug: 2052726
re-installation does not restore them.
Implemented a unit test function for the above
scenario.
Call apt_update from upgrade_charm().
Closes-Bug: #2042792
Change-Id: I57c5fa293b421483b0879f24ddac260e47c7cbef
Added configuration for injecting default image properties using the
interoperable image import process. This change adds 1 configuration
option to the charm:
- 'custom-import-properties' to specify the desired custom properties
Note: current glance docs example shows incorrect quoting, the
implemented format in this change (no quotes) is correct. Docs fix
in: https://review.opendev.org/c/openstack/glance/+/890423
Release note: https://review.opendev.org/c/openstack/charm-guide/+/891010
Closes-Bug: 1994053
Related-Bug: 2028895
Change-Id: I9548c90e663285c6e7a70eebc8c135a5568974bc
Glance Registry has been deprecated in Stein release.
Leftover configuration files can still be read and
configure wrong settings, breaking deployment.
Closes-Bug: 1979090
Change-Id: I54b72aef0fd49b036cf1783ef9887fa9243c93f8
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)
Closes-Bug: #1880610
Change-Id: I81d7fd67029dd5025f95b41d788b03ce4b6038bb
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: Ic1cf491e1121f4fee3e57862fd1cc0315d3953da
Create new glance_api.conf template from Ussuri release to
use default_backend and enabled_backends configuration
parameters instead of deprecated stores, default_store
parameters.
Add new config option cinder-volume-types to specify the
volume types in cinder that can be used to store glance
images.
Add logic to update cinder in glance-api configurations
if cinder-volume-service relation is joined.
Also add two flags, cinder_http_retries and
cinder_state_transition_timeout
Closes-Bug: #1905042
Change-Id: Ife649defc9b765b433d7973ab31778f9cb1efdd9
This is a follow-up change on Id2e9d4351513341b5ee41fa8a8d677aca6580fca
Instead of relying users to set expose-image-locations=false which is
error prone, disable expose_image_locations from the charm side whenever
S3 backend is enabled not to expose credentials.
Closes-Bug: 1935743
Change-Id: Iac0f27418eec6c818df8cc3fa1c133db38d26069
S3 backend has been available (again) since Ussuri in the upstream
Glance. We will enable the backend with config options for an external
S3 storage information.
Co-authored-by: Connor Chamberlain <connor.chamberlain@canonical.com>
Co-authored-by: Vladimir Grevtsev <vladimir.grevtsev@canonical.com>
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/574
Closes-Bug: #1919338
Change-Id: Id76a74cc6041b9c3364399254681138475f19935
image-convertion config enables image convertion to raw format
this optimizes back-end capabilities while not putting the burden
of converting images to their end users
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/582
Closes-Bug: 1899767
Change-Id: Id3791721f9e38899c87b88591cdc42e46ffea5c1
The `CONFIGS.write(GLANCE_SWIFT_CONF)` is missing in the object-store
hook. This config file is used when the `swift` backend is enabled.
This bug is only encountered on some deployments, because there are multiple
places where `CONFIGS.write_all()` is called.
If the `object-store` relation is established, and another hook calls
`CONFIGS.write_all()`, this problem wouldn't reproduce. However, if
`object-store` relation is executed last, this issue will pop up.
Closes-Bug: #1915300
Change-Id: Ie52b18fc4dc637dbeec5ecfb8d5930a24c5f72cf
When assessing the charms status check that the current
ceph broker request has been complete. If it has not
put the charm in a 'waiting' state and update the status
message.
Change-Id: I779b6933242ce88cb1577ae11ca258b96ec46b38
Closes-Bug: #1899918
Adds multi-backend support to Glance. Currently supported backends
are local, Swift and RBD. The order of preference for default backend
is RBD --> Swift --> Local. Backend can be selected explicitly by the
operator when creating an image.
Change-Id: I78ecad0e8e12fc1ff7d716b7e43d84ca4d5b0ee1
Add standard configuration options for erasure coded pool
creation and profile configuration.
Update ceph relation joined handled to support erasure
coded pools - a replicated pool is created at 1% of the
total data weight alongside the erasure coding profile and
supporting erasure coded data pool.
Update ceph context to use the metadata pool name in the
glance configuration files when erasure-coded pool-type
is configured.
Resync charmhelpers to update Ceph Broker request support
for erasure coding.
Change-Id: If4a31a2adf8080af66885adb970fbb3cdd82f573
Depends-On: Iec4de19f7b39f0b08158d96c5cc1561b40aefa10
Ensure that services are restarted when the relation is
removed from a model.
Add -departed hook to ensure that ceph.conf is consistent
with monitors in the ceph cluster during scaleback operations.
Change-Id: I2159dd32a49e4591494881bab8469f087a539d5a
Closes-Bug: 1888768
Allow the rbd pool name to be set via config. This brings glance
inline with other openstack ceph clients such as cinder.
Change-Id: I93b28c1b1276cca73348fd421024ef3ce0241258
Stop running register_configs so it is not run unnecessarily.
As part of this make sure that CONFIGS is refreshed after an
upgrade as config files and contexts may have changed.
Closes-Bug: #1879537
Change-Id: Ib5e713194aac7275751329d0bd2dec13ececdf60
Glance (in ussuri) uses policy-in-code, and so that policy.json file
doesn't ship with the package. This means that the charm can't rely on
the file existing ussuri onwards. This patchset changes the way the
charm uses policy.json by switching it to a charm determined policy.yaml
file (preferred format) with the only 3 options that the charm
determines to enforce.
Also add yaml vars to focal-ussuri bundle
This brings it into line with the other charms that are part of the the
enable-focal topic. This makes it easier to add a new bundle just by
changing a couple of variables.
Closes-Bug: #1872996
Change-Id: I47f19272a4e0af3781843608b76304ce8ba1e2b8
As of OpenStack Ussuri, Glance has removed policy.json in favor
of using default policy in code. In order to continue supporting
the restrict-image-location-operations config option, a minimal
policy.json template is rendered for Ussuri and above. This allows
update_image_location_policy() to continue making modifications
to get_image_location, set_image_location, and delete_image_location
policy.
Change-Id: I7e3693ffda01d6a6269e771ecfd232ad2c87ce74
If the database is in maintenace mode do not attempt to access
it.
Depends-On: I5d8ed7d3935db5568c50f8d585e37a4d0cc6914f
Change-Id: I9550452e78608589592265fca9549a51c88d65bc
Currently, Apache ports.conf file is not being configured by this
charm. This patch changes the ports.conf default file with another one
that does not open port 80 on SSL environments.
Change-Id: I3f8eb69813058a9291540634ad262bfdaa7b8731
Closes-bug: #1845665
When resuming services exclude those managed by hacluster, in
this case haproxy. If pacemaker lacks quorum it may shut haproxy
down which will cause this charm to error.
Charmhelper sync included to bring in required
get_managed_services_and_ports method.
Change-Id: I9ede7d45e1d4da457d2228caf0367bf374bd51ea
This change follows the existing pattern that the keystone charm uses to only
run db migration once. To ensure it only runs once a flag is placed in the
leader db once it has run.
Change-Id: Iaba10cc70f60faa33e00cc5d33e03626f54374f9
This patch removes the deprecated glance-registry service from nrpe
checks after an openstack upgrade to an openstack version greater than
Rocky
Closes-Bug: #1849896
Depends-On: https://github.com/juju/charm-helpers/pull/409
Change-Id: I274441966f15f66341adf30c07c625cc76b2ecb6
Signed-off-by: Alexandros Soumplis <soumplis@admin.grnet.gr>
This patch removes glance-registry service when upgrading to
OpenStack Stein and later releases.
Second part of:
Change-Id: Ie6d618582cd5063738a965d36e7d766633e1a607
Change-Id: I5e644ed8dba809fd1ad5d628f32ea64d31799e52
Signed-off-by: Stamatis Katsaounis <skatsaounis@admin.grnet.gr>
Openstack services don't use the default ports (80 and 443), so
change Apache to not open them.
Change-Id: I543e3309c5522d7bc865133f8ec5ecc79542112c
Closes-bug: #1845665
This patchset implements policy overrides for glance. It uses the
code in charmhelpers.
Change-Id: I0586326ff87fdf03f2c88e4c459627f4085c3367
Closed-Bug: #1741723
If the certificates that Apache is using change then services needs
to be restarted. This change adds the SSL directory to the restart
map to ensure any certificate changes trigger a restart.
Change-Id: Idbdceb5acd80c06a2bde02f9df88a9d9fd2404fb
Closes-Bug: 1828530
This change implements a new option in config.yaml that can be used
to change the location of the images store on the filesystem.
Change-Id: I0d8e7409b8eb4e5e403455db03d73020f741afc4
Closes-Bug: #1657165
The pre-install operations may fail, yet that failure is not
elevated to the user. This masks the failure and makes early
package install issues difficult to troubleshoot.
If the basic pre-install script fails, the charm should not
proceed to later hooks as the requirements may not be met.
Hashbangs for bash should specify -e (errexit) on all of the
pre-install bash scripts.
Change-Id: Iac27d10d928bd0cca60a52564fab4d8082ca1edb
Closes-bug: #1815243
Partial-bug: #1815231
The glance-registry daemon was deprecated at Queens, but was still
installed for the Queens charm release; ensure that any re-install
of paste.ini files accomodates this as part of the charm upgrade
process, resolving issues with glance-registry not running due to
missing paste configuration files.
Change-Id: Iaaea4907ce4ef9d1e17b8ef9719e8bb0e0001946
Closes-Bug: 1812972
Glance supports image_size_cap setting. This setting controls maximum
size of image a user can upload. An image upload greater than the size
mentioned here would result in an image creation failure.
This commit adds support for setting image_size_cap parameter in charm
config. It can be manipulated during the runtime with `juju config'
command.
Change-Id: I0af1c6a503a87941b7c8ee34255583652e54f0cc
Closes-Bug: #1720040
Use the generate_ha_relation_data helper from charmhelpers to
generate the data to send down the relation to the hacluster
charm.
This results in a few changes in behaviour:
1) The charm will no longer specify a nic name to bind the vip. This
is because Pacemaker VIP resources are able to automatically
detect and configure correct iface and netmask parameters based
on local configuration of the unit.
2) The original iface named VIP resource will be stopped and deleted
prior to the creation of the new short hash named VIP resource.
Change-Id: I0ab095fdcb42dbfd2c64595e7390130500600190
The swift-temp-url-key key on the image-service relation seems never to
be consumed (see the ImageService context(s)). It appears to be
vestigial and causes problems like Bug#1804023.
As it is never consumed, this change removes it.
Closes-Bug: #1804023
Change-Id: I2cc19c550ebb1de09e66de8685d507f7db9e0f24
On charm upgrade the charm may switch to py3 packages. If so, ensure
the old py2 packages are purged. If the purge occurs then restore
the glance-api-paste.ini from packages and restart services.
Closes-Bug: 1803451
Change-Id: Ib258873fb2be95821e8f8c22fd1f3d19666b3181
python-six is also used by crmsh in HA deployment so don't purge it
on OpenStack upgrade or we lose the ability to manage the corosync/
pacemaker cluster.
Also ensure non-empty package list is returned for rocky+ in
determine_purge_packages.
Change-Id: Ia614ec0f9dce907952cab32db2725abe47ef404e