Skip to content

Commit

Permalink
Merge branch 'yoga-fully-patched' into stackhpc/yoga
Browse files Browse the repository at this point in the history
Change-Id: I8eebc1d6019047b5ab6f60e1057c0dd81c31cb6f
  • Loading branch information
priteau committed Jan 20, 2025
2 parents 186a1f6 + 28cac20 commit 3361202
Show file tree
Hide file tree
Showing 8 changed files with 212 additions and 52 deletions.
46 changes: 19 additions & 27 deletions .zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@
The regular tempest-integrated-storage job but with glance metadata injection
post-run: playbooks/post-check-metadata-injection.yaml
vars:
configure_swap_size: 8192
tempest_concurrency: 3
zuul_copy_output:
/etc/glance-remote: logs
devstack_localrc:
Expand All @@ -236,6 +238,11 @@
"glance_devstack_test":"doyouseeme?"
image_conversion:
output_format: raw
test-config:
"$TEMPEST_CONFIG":
image:
image_caching_enabled: True
disk_formats: qcow2,ari,aki,vhd,vmdk,raw,ami,vdi,iso,vhdx

- job:
name: glance-multistore-cinder-import
Expand All @@ -249,27 +256,6 @@
CINDER_ENABLED_BACKENDS: lvm:lvmdriver-1,lvm:lvmdriver-2
GLANCE_CINDER_DEFAULT_BACKEND: lvmdriver-1

- job:
name: glance-multistore-cinder-import-fips
parent: tempest-integrated-storage-import
description: |
The regular import workflow job to test with multiple cinder stores with
fips enabled
nodeset: devstack-single-node-centos-8-stream
pre-run: playbooks/enable-fips.yaml
vars:
configure_swap_size: 4096
devstack_localrc:
USE_CINDER_FOR_GLANCE: True
GLANCE_ENABLE_MULTIPLE_STORES: True
CINDER_ENABLED_BACKENDS: lvm:lvmdriver-1,lvm:lvmdriver-2
GLANCE_CINDER_DEFAULT_BACKEND: lvmdriver-1
devstack_local_conf:
test-config:
"$TEMPEST_CONFIG":
validation:
ssh_key_type: 'ecdsa'

- job:
name: tempest-integrated-storage-import-standalone
parent: tempest-integrated-storage-import
Expand Down Expand Up @@ -306,7 +292,6 @@
- release-notes-jobs-python3
check:
jobs:
- openstack-tox-functional-py36-fips
- openstack-tox-functional-py39
- glance-tox-functional-py39-rbac-defaults
- glance-ceph-thin-provisioning:
Expand All @@ -331,16 +316,18 @@
irrelevant-files: *tempest-irrelevant-files
- glance-multistore-cinder-import:
irrelevant-files: *tempest-irrelevant-files
- glance-multistore-cinder-import-fips:
voting: false
irrelevant-files: *tempest-irrelevant-files
- grenade:
irrelevant-files: *tempest-irrelevant-files
- tempest-ipv6-only:
irrelevant-files: *tempest-irrelevant-files
- nova-ceph-multistore:
irrelevant-files: *tempest-irrelevant-files
- glance-secure-rbac-protection-functional
- glance-secure-rbac-protection-functional:
required-projects:
- name: openstack/glance
override-checkout: yoga-last
- name: openstack/glance-tempest-plugin
override-checkout: yoga-last

gate:
jobs:
Expand All @@ -358,7 +345,12 @@
irrelevant-files: *tempest-irrelevant-files
- nova-ceph-multistore:
irrelevant-files: *tempest-irrelevant-files
- glance-secure-rbac-protection-functional
- glance-secure-rbac-protection-functional:
required-projects:
- name: openstack/glance
override-checkout: yoga-last
- name: openstack/glance-tempest-plugin
override-checkout: yoga-last
experimental:
jobs:
- glance-tox-py39-glance_store-tips
Expand Down
4 changes: 4 additions & 0 deletions glance/async_/flows/api_image_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ def image_locations(self):
# should have moderated access like all the other things here.
return copy.deepcopy(self._image.locations)

@property
def image_disk_format(self):
return self._image.disk_format

@property
def image_status(self):
return self._image.status
Expand Down
5 changes: 1 addition & 4 deletions glance/async_/flows/plugins/image_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@ def _execute(self, action, file_path, **kwargs):
'target': target_format}
self.dest_path = dest_path

# Backport fixup due to lack of
# Ic51c5fd87caf04d38aeaf758ad2d0e2f28098e4d in Yoga:
#source_format = action.image_disk_format
source_format = action._image.disk_format
source_format = action.image_disk_format
inspector_cls = format_inspector.get_inspector(source_format)
if not inspector_cls:
# We cannot convert from disk_format types that qemu-img doesn't
Expand Down
19 changes: 15 additions & 4 deletions glance/common/format_inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ class VHDXInspector(FileInspector):
"""
METAREGION = '8B7CA206-4790-4B9A-B8FE-575F050F886E'
VIRTUAL_DISK_SIZE = '2FA54224-CD1B-4876-B211-5DBED83BF4B8'
VHDX_METADATA_TABLE_MAX_SIZE = 32 * 2048 # From qemu

def __init__(self, *a, **k):
super(VHDXInspector, self).__init__(*a, **k)
Expand Down Expand Up @@ -602,6 +603,8 @@ def _find_meta_entry(self, desired_guid):
item_offset, item_length, _reserved = struct.unpack(
'<III',
meta_buffer[entry_offset + 16:entry_offset + 28])
item_length = min(item_length,
self.VHDX_METADATA_TABLE_MAX_SIZE)
self.region('metadata').length = len(meta_buffer)
self._log.debug('Found entry at offset %x', item_offset)
# Metadata item offset is from the beginning of the metadata
Expand Down Expand Up @@ -652,7 +655,7 @@ def __str__(self):
#
# https://www.vmware.com/app/vmdk/?src=vmdk
class VMDKInspector(FileInspector):
"""vmware VMDK format (monolithicSparse variant only)
"""vmware VMDK format (monolithicSparse and streamOptimized variants only)
This needs to store the 512 byte header and the descriptor region
which should be just after that. The descriptor region is some
Expand Down Expand Up @@ -683,7 +686,6 @@ def post_process(self):

if sig != b'KDMV':
raise ImageFormatError('Signature KDMV not found: %r' % sig)
return

if ver not in (1, 2, 3):
raise ImageFormatError('Unsupported format version %i' % ver)
Expand All @@ -693,9 +695,18 @@ def post_process(self):
# header, which we cannot support since we stream.
raise ImageFormatError('Unsupported VMDK footer')

# Since we parse both desc_sec and desc_num (the location of the
# VMDK's descriptor, expressed in 512 bytes sectors) we enforce a
# check on the bounds to create a reasonable CaptureRegion. This
# is similar to how it's done in qemu.
desc_offset = desc_sec * 512
desc_size = min(desc_num * 512, self.DESC_MAX_SIZE)
if desc_offset != self.DESC_OFFSET:
raise ImageFormatError("Wrong descriptor location")

if not self.has_region('descriptor'):
self.new_region('descriptor', CaptureRegion(
desc_sec * 512, desc_num * 512))
desc_offset, desc_size))

@property
def format_match(self):
Expand All @@ -721,7 +732,7 @@ def virtual_size(self):
vmdktype = descriptor[type_idx:type_end]
else:
vmdktype = b'formatnotfound'
if vmdktype != b'monolithicSparse':
if vmdktype not in (b'monolithicSparse', b'streamOptimized'):
LOG.warning('Unsupported VMDK format %s', vmdktype)
return 0

Expand Down
Loading

0 comments on commit 3361202

Please sign in to comment.