Add file to the reno documentation build to show release notes for
stable/zed.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/zed.
Sem-Ver: feature
Change-Id: I9745880b98acf910c4f8cf74372a7fdc9ebac582
The *_domain_id parmaeters should not have any default. Otherwise
keystoneauth ignores the *_domain_name parameters and it requires
only *_domain_id parameters are used.
Closes-Bug: #1620999
Change-Id: I1f8c9184761313f9fc5fda2f257e52233e0196d1
As a new feature relevant for the Cinder store, os-brick now supports
setting the location of file locks in a different location from the
locks of the service.
The functionality is intended for HCI deployments and hosts that are
running Cinder and Glance using Cinder backend. In those scenarios the
service can use a service specific location for its file locks while
only sharing the location of os-brick with the other services.
To leverage this functionality the new os-brick code is needed and
method ``os_brick.setup`` needs to be called once the service
configuration options have been loaded.
The default value of the os-brick ``lock_path`` is the one set in
``oslo_concurrency``.
This patch adds support for this new feature in a backward compatible
way so code works even if using an os-brick version that doesn't have
this feature. That is the case for many CI jobs that install os-brick
from PyPi instead of the code present in master.
Change-Id: Ib11d63e3c388e12f145f40247d17030a566b8c5e
Python 2 has been deprecated for almost two years, and has not been
guaranteed to work with glance_store for a while. This patch removes all
traces of six, unicode strings and Python 2 tweaks.
Co-Authored-By: Cyril Roelandt <cyril@redhat.com>
Change-Id: Ifa78924d7ecf4f2d9a54c677888ab2926530c487
In Zed cycle, we have dropped the python 3.6/3.7[1] testing
and its support. Moving the py36 job to py3 based so that they run
on latest supported python 3. Updating the python classifier also to reflect the same.
[1] https://governance.openstack.org/tc/reference/runtimes/zed.html
Change-Id: Ida582daf7db6fb3cedb3c7e37fc512d094b37c6e
There is a syntax error in the exception logging when attaching a
volume fails in attachment state manager. This patch corrects it
and adds a test to guard against similar changes in future.
Closes-Bug: #1970698
Change-Id: I43c407046a49bb37631113e2ea65d05450f9365d
When we try to simultaneously attach same volume multiple times
(multiattach), there are multiple attachments created, suppose
attachA and attachB. If attachA marks the volume "reserved" then
attachB can't proceed until the volume is in "in-use" or "available"
state. We retry until we reach any of these states for which we use
the retrying library.
The retrying library defaults to 1 second retry[1] (5 times) which causes
the original failure as the volume takes time to transition between
"reserved" -> "in-use" state. This patch corrects it by adding an
exponential retry time and max exponential retry i.e.
1: 2 ** 1 = 2 seconds
2: 2 ** 2 = 4 seconds
3: 2 ** 3 = 8 seconds
4: 2 ** 4 = 16 seconds (but max wait time is 10 seconds)
5: 2 ** 5 = 32 seconds (but max wait time is 10 seconds)
[1] https://github.com/rholder/retrying/blob/master/retrying.py#L84
Closes-Bug: #1969373
Change-Id: I0094b044085d7f92b07ea86236de3b6efd7d67ea
Add file to the reno documentation build to show release notes for
stable/yoga.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/yoga.
Sem-Ver: feature
Change-Id: I99772281621ebce5a57ddd37cee879d7cc387c47
When we have an image with size > 1 GB, we follow the following steps
to accomodate the image:
1) Detach the volume
2) extend the volume
3) Attach the volume
4) Open the volume device as a file and resume writing the image
Sometimes due to several reasons (mostly network related), the
size of the device file could mismatch with the actual volume size
(or the backend LUN size). This can happen if the extend was performed
(i.e. the control path) but it takes the time to reflect that into
the mapped device (i.e. the data path). This mismatch can cause the
issue "IOError: [Errno 28] No space left on device".
To avoid this scenario, we check if the device size is less than the
volume size, we wait for the extended LUN to show up in mapped device
and then continue the image writing operation.
Closes-Bug: #1959913
Change-Id: I206580f6be615ebc5e15b546b9c23728d4116a5d
While fetching connector information the cinder driver of
glance-store is passing 'hostname' as IP address whereas it
actually needs IP address.
This path fetches the IPV4 or IPV6 address from the available
'hostname' and passes it to os-brick.
This worked for other cinder backends which don't rely specifically
on IP address for initializing connection like fibre channel, nfs etc
and even for some iscsi backends since, in some environments,
the hostname is same as the ip address. This is not the case always
and we should pass the correct IPv4/IPv6 address of the host to
avoid this issue.
Closes-Bug: #1955668
Change-Id: Ic79815972e654a8bfe2775f57c68cfa0bf115e2f
Recently cinder has utilized Ceph clone v2 support for its
RBD backend, since then if you attempt to delete an image from
glance that has a dependent volume, all future uses of that
image will fail in error state. Despite the fact that image
itself is still inside of Ceph/Glance. This issue is reproducible
if you are using ceph client version greater than 'luminous'
To resolve this issue glance RBD driver now checks whether snapshot
of original image has any external references before deleting/removing
it's snapshot and returns 409 Conflict response if it has any.
NOTE: To check this dependency glance osd needs 'read' access to
cinder and nova side RBD pool.
Closes-Bug: #1954883
Depends-on: https://review.opendev.org/c/openstack/devstack-plugin-ceph/+/819476
Change-Id: If30b7bd7acac148b6f89ce46abbe128c678c90e7
Add file to the reno documentation build to show release notes for
stable/xena.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/xena.
Sem-Ver: feature
Change-Id: I9bda41a2d9ab44b97a1095600629ae2c048aac04
We implemented cinder's new attachment API support with patch[1].
It was needed to add multiattach volume handling added with this
patch.
There is no special configuration change or user interference needed.
If a volume is of a multiattach type, then it will be handled as
a multiattach volume.
[1] https://review.opendev.org/c/openstack/glance_store/+/782200
Implements: blueprint attachment-api-and-multiattach-support
Closes-Bug: #1904546
Change-Id: Iffb825492a20fd877476acad05f817b399072f01
There's an issue when cinder nfs is configured as glance backend and
the image is > 1GB i.e. extend operation is performed on volume.
Currently glance writes the qcow2 header in the raw volume and
cinder nfs driver used to work on format autodetection which is
changed to manual detection here[1]
This fixes the extend volume problem for raw volumes, however, if
cinder nfs is configured to create qcow2 volumes then we will run into
the same problem.
This patch blocks creating images when the nfs volume is qcow2.
Refactoring work:
1) attachment_delete call is removed in nfs related code as it was
already done in the finally block
2) handle_exceptions decorator is removed from volume delete method
as it raises BackendException and incase when volume is not found
(possibly deleted manually), the image deletion fails so we don't
want to raise any error in this case
[1] https://review.opendev.org/c/openstack/cinder/+/761152
Closes-Bug: #1901138
Change-Id: I8ce6f36f1cb4b0ed6bcc5f3869fab3bb64fe3390
add two new config options for cinder store
- cinder_store_user_domain_name
- cinder_store_project_domain_name
that allow to set the internal user and project to Keystone domains
other that the 'Default' one.
Closes-Bug: #1930299
Change-Id: I1d6c07b6c0e7e6a4da9adabaa026f024b64bb029
Add file to the reno documentation build to show release notes for
stable/wallaby.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/wallaby.
Sem-Ver: feature
Change-Id: I642302a357abe16562a63cd233c1526211970279
Currently when configuring multiple cinder stores,
glance validates the volume types configured in glance-api.conf
during service startup.
This check however has a dependency on cinder API service to be
up and running.
During certain deployment scenarios, it is not always mandatory
that cinder is already running when we are starting glance hence
this check will fail the glance service hence the deployment
This patch removes the startup exceptions and instead logs a warning.
Also the check is done during volume create so handling for NotFound
exception from cinder is also handled.
Change-Id: I468523b947ad6fcff4b074d2ed1cb7a9e52b15ca
Closes-Bug: #1915163
v2 API of cinder is already deprecated, and the cinder community is now
planning to remove it.
This change makes cinder store use v3 API instead, which is the current
latest version actively maintainced.
Closes-Bug: #1915602
Change-Id: I8f374eb1b26ec408c52c6279da79cfe470d59a1c
Add file to the reno documentation build to show release notes for
stable/victoria.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/victoria.
Change-Id: I3468449a517edfac288de349a4079c666a263a05
Sem-Ver: feature
This patch adds support for configuring multiple cinder stores.
The following changes are part of this patch:
1) location URL format: previously cinder://<volume-id>, the format is
now changed to cinder://<store-name>/<volume-id>
2) Check for configured volume types: During initialization of service,
all volume types configured in the cinder store(s) will be checked if
they exist in deployment or not, the store with the wrong type will be
disabled. if cinder store is configured using traditional/old way
(i.e. using 'stores' config option) then this validation will not be performed.
3) Update legacy images: This change is partially depedent on the glance
changes[1] which trigger updating the URL for legacy images and the
cinder store checks the configured stores volume type against the existing
image-volume's type and update it respectively.
[1] https://review.opendev.org/#/c/742373/
Implements: blueprint multiple-cinder-backend-support
Change-Id: I0ba36d1095886fd1d96926af37a3a65a178c004f
Add new configuration option ``rbd_thin_provisioning`` and
``filesystem_thin_provisioning`` to rbd and filesystem
store to enable or not sparse upload.
A sparse file means that we do not actually write null byte
sequences but only the data itself at a given offset, the
"holes" which can appear will automatically be interpreted by
the storage backend as null bytes, and do not really consume
your storage.
Change-Id: I129e30f490e3920e9093c2b793f89b70ce310a50
Co-Authored-By: Grégoire Unbekandt <gregoire.unbekandt@gmail.com>
Partially Implements: blueprint handle-sparse-image
With change[1], we will enabled encrypted volume support for cinder
nfs driver.
Before enabling that, we require handling in cinder consuming projects
(like glance_store) to not have unexpected behavior.
This patch blocks image creation if the destination volume (in which
the image will be written) is an encrypted nfs volume.
[1] https://review.opendev.org/#/c/597148/
Closes-Bug: #1884482
Change-Id: I3b4c6782e561f22a7118624e26bf056cd6405a30
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems
Update Sphinx version as well.
Disable openstackdocs_auto_name to use 'project' variable as name.
Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.
Remove docs requirements from lower-constraints, they are not needed
during install or test but only for docs building.
openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.
See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html
Change-Id: Iee357adb23ff65e453ac627eaec0b9d7ac245ba6
Add file to the reno documentation build to show release notes for
stable/ussuri.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/ussuri.
Change-Id: I7218e0a5f04ca02f0111343f152da52f37d8ea3a
Sem-Ver: feature
Revive the S3 driver that was supported up to Mitaka and add multiple
store support to correspond with the features added to glance_store from
Newton to U cycle. In addition, the use of the S3 SDK used by the Mitaka
S3 driver has been deprecated, so this implementation will be changed
to use the new version.
Change-Id: I203134837319080ead96da69048baf90086d2117
Implements: blueprint re-support-s3-driver
pass configured cacert for Swift to the keystoneauth's Session
as well so that the swift endpoint can be resolved from the catalog
when a custom CA bundle is used.
Change-Id: I439f6b5af34c685f72c9b4933c7eb0c77cc92e14
Closes-Bug: #1820817
Add file to the reno documentation build to show release notes for
stable/train.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/train.
Change-Id: I604685b7eab4f6bca06317b56ee0f8e854d0466a
Sem-Ver: feature