STX-Openstack: Failed to create volume with --image flag

Bug #2012392 reported by Lucas de Ataides Barreto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Rafael Falcão

Bug Description

Brief Description
-----------------
Volumes are failing to be created with the --image flag. If this flag is not set, the volume is able to be created.

Severity
--------
Minor: System/Feature is usable with minor issue

Steps to Reproduce
------------------
Create a volume by setting the --image flag with any image

Expected Behavior
------------------
Volume is created

Actual Behavior
----------------
Volume fails to be created

Reproducibility
---------------
Seen once

System Configuration
--------------------
Bare metal AIO-DX

Branch/Pull Time/Commit
-----------------------
https://mirror.starlingx.cengn.ca/mirror/starlingx/master/debian/monolithic/20230319T060000Z/

Last Pass
---------
N/A

Timestamp/Logs
--------------
openstack --os-username 'tenant1' --os-password 'Li69nux*' --os-project-name tenant1 --os-auth-url http://keystone.openstack.svc.cluster.local/v3 --os-user-domain-name Default --os-project-domain-name Default --os-identity-api-version 3 --os-interface internal --os-region-name RegionOne volume create --size=8 --bootable --image=6fde193d-2023-4986-a30f-99ec55ac0f1d vol_inst1-6
+------------------------------+--------------------------------------+
| Field | Value |
+------------------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | true |
| consistencygroup_id | None |
| created_at | 2023-03-21T07:52:56.000000 |
| description | None |
| encrypted | False |
| id | a0eae798-eb43-421e-911b-8b2da48ffef9 |
| multiattach | False |
| name | vol_inst1-6 |
| os-vol-tenant-attr:tenant_id | 4a5485e632da44dea38bfbaac660ac66 |
| properties | |
| replication_status | None |
| size | 8 |
| snapshot_id | None |
| source_volid | None |
| status | error |
| type | ceph-store |
| updated_at | 2023-03-21T07:53:06.000000 |
| user_id | c61a798d61784091bb9c3c6486b82812 |
+------------------------------+--------------------------------------+

Test Activity
-------------
Regression Testing

Workaround
----------
N/A

summary: - STX-Openstack: Failed to create volume with --bootable flag
+ STX-Openstack: Failed to create volume with --image flag
Changed in starlingx:
assignee: nobody → Rafael Falcão (rafaelvfalc)
Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to upstream (master)

Reviewed: https://review.opendev.org/c/starlingx/upstream/+/880772
Committed: https://opendev.org/starlingx/upstream/commit/7f23ac77b6641734b8e0819351d3642da9e3deb7
Submitter: "Zuul (22348)"
Branch: master

commit 7f23ac77b6641734b8e0819351d3642da9e3deb7
Author: Rafael Falcao <email address hidden>
Date: Tue Apr 18 15:09:54 2023 -0300

    Add PROJECT_UID and PROJECT_GID specification to stx-cinder

    This review intends to solve a id conflict between the
    cinder user and the keystone user (added on [1]). The
    keystone user is attached with the id 42424, same as
    the cinder user. This conflict is making volume related
    commands to fail due permissions of the user (because it
    is trying to execute the commands as keystone user, not
    cinder).

    [1] https://review.opendev.org/c/starlingx/integ/+/854246

    Test plan:
    PASS - Check the /etc/passwd file to see that the user
           'cinder' in the cinder container changed its id
           from 42424 to 42425.

    Partial-Bug: 2012392

    Signed-off-by: Rafael Falcao <email address hidden>
    Change-Id: I29bba77beb0e63dfd03fcc681aba8a13b4c3445f

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-armada-app (master)

Reviewed: https://review.opendev.org/c/starlingx/openstack-armada-app/+/880682
Committed: https://opendev.org/starlingx/openstack-armada-app/commit/c66f115730a0cb8d708a022ba98671fad522c6fc
Submitter: "Zuul (22348)"
Branch: master

commit c66f115730a0cb8d708a022ba98671fad522c6fc
Author: Rafael Falcao <email address hidden>
Date: Mon Apr 17 16:42:05 2023 -0300

    Update user to execute commands in cinder related pods

    The cinder-volume container needs to be able to run qemu-img
    commands. The current user used to execute those commands
    (keystone) does not have the permissions to do that.
    We are updating the runAsUser parameter to execute all
    cinder related containers as cinder user. Doing that the
    user of the container will have the correct permissions
    to perform its operations.

    Depends-on: https://review.opendev.org/c/starlingx/upstream/+/880772

    Test plan:
    PASS - Build openstack-helm package
    PASS - Build stx-openstack-helm-fluxcd package
    PASS - Build stx-openstack helm charts
    PASS - Update/apply stx-openstack
    PASS - kubectl exec in the cinder-volume pod and check that the
           default user is now 'cinder' instead of 'keystone'
    PASS - Remove/delete stx-openstack

    Closes-Bug: 2012392

    Signed-off-by: Rafael Falcao <email address hidden>
    Change-Id: Id4584bc11e73a8a667258e7fb7a8e6ba66c7b7e8

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
tags: added: stx.9.0
Changed in starlingx:
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.