Description of problem: When creating an image for a volume and specifying the protected flag (--protected) or the the private flag (--private) The resulting image created does not have the protected flag or the visibility set to private ####################################### (overcloud) [stack@undercloud-0 ~]$ openstack image create --disk-format raw --protected --private --volume test-vol test-vol-image +---------------------+--------------------------------------+ | Field | Value | +---------------------+--------------------------------------+ | container_format | bare | | disk_format | raw | | display_description | None | | id | c6e2ed3b-cdaa-4438-ab06-4146fe28706d | | image_id | 19c369a7-649d-464a-bf07-3eebd0eca9eb | | image_name | test-vol-image | | protected | False | | size | 4 | | status | uploading | | updated_at | 2020-02-25T04:44:11.000000 | | visibility | shared | | volume_type | tripleo | +---------------------+--------------------------------------+ (overcloud) [stack@undercloud-0 ~]$ openstack image show test-vol-image +------------------+------------------------------------------------------------------------------+ | Field | Value | +------------------+------------------------------------------------------------------------------+ | checksum | 5f13a2485c669bdfc5a0e061b6cb29e7 | | container_format | bare | | created_at | 2020-02-25T04:44:25Z | | disk_format | raw | | file | /v2/images/19c369a7-649d-464a-bf07-3eebd0eca9eb/file | | id | 19c369a7-649d-464a-bf07-3eebd0eca9eb | | min_disk | 0 | | min_ram | 0 | | name | test-vol-image | | owner | eb7c6ce254f44553b950c375fbd9d81a | | properties | direct_url='swift+config://ref1/glance/19c369a7-649d-464a-bf07-3eebd0eca9eb' | | protected | False | | schema | /v2/schemas/image | | size | 4294967296 | | status | active | | tags | | | updated_at | 2020-02-25T04:44:54Z | | virtual_size | None | | visibility | shared | +------------------+------------------------------------------------------------------------------+ ####################################### Version-Release number of selected component (if applicable): How reproducible: Everytime Steps to Reproduce: 1. Create volume 2. Create image from volume with protected or private flag Actual results: Image created from volume is neither protected or private Expected results: Image created from volume is protected and private Additional info: These can be set after the fact ################################### (overcloud) [stack@undercloud-0 ~]$ openstack image set --protected --private test-vol-image (overcloud) [stack@undercloud-0 ~]$ openstack image show test-vol-image +------------------+------------------------------------------------------------------------------+ | Field | Value | +------------------+------------------------------------------------------------------------------+ | checksum | 5f13a2485c669bdfc5a0e061b6cb29e7 | | container_format | bare | | created_at | 2020-02-25T04:44:25Z | | disk_format | raw | | file | /v2/images/19c369a7-649d-464a-bf07-3eebd0eca9eb/file | | id | 19c369a7-649d-464a-bf07-3eebd0eca9eb | | min_disk | 0 | | min_ram | 0 | | name | test-vol-image | | owner | eb7c6ce254f44553b950c375fbd9d81a | | properties | direct_url='swift+config://ref1/glance/19c369a7-649d-464a-bf07-3eebd0eca9eb' | | protected | True | | schema | /v2/schemas/image | | size | 4294967296 | | status | active | | tags | | | updated_at | 2020-02-25T04:46:31Z | | virtual_size | None | | visibility | private | +------------------+------------------------------------------------------------------------------+ ###################################
Hello David, I think you might be on to something :) Can you try to use the glanceclient and see whether it works as expected? I think this might be a python-openstackclient issue that should be reported upstream, I'll take a closer look ASAP.
Hi Cyril I there does not seem to be an option to create image from volume for the "glance" cli command.
There is an upstream patch with a +2 and a story. I'm moving this to python-openstackclient.
Downstream, we also want https://review.opendev.org/c/openstack/python-openstackclient/+/844268 to prevent introducing a new bug.
Both patches have been merged upstream in stable/wallaby, but too late for 17.0ga. Pushing this to 17.1.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Release of components for Red Hat OpenStack Platform 17.1 (Wallaby)), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2023:4577