f/antelope: Containerized clients missing --location parameter for volume backup creation

Bug #2036986 reported by Luan Nunes Utimura
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
High
Luan Nunes Utimura

Bug Description

Brief Description
-----------------
It has been observed that the containerized clients -- namely `python-cinderclient` and `python-openstackclient` -- are missing the `--location` parameter for volume backup creation.

Severity
--------
Critical.

Can't use the `--location` parameter, even if it's implemented in Cinder's backend.

Steps to Reproduce
------------------
1. Source /var/opt/openstack/admin-openrc
2. Verify parameters available in:
   * openstack volume backup create -h
   * cinder help backup-create

Expected Behavior
------------------
The `--location` parameter is displayed in the help message.

Actual Behavior
----------------
The `--location` parameter isn't displayed in the help message.

Reproducibility
---------------
Reproducible.

System Configuration
--------------------
Reproducible in all system configurations.

Branch/Pull Time/Commit
-----------------------
StarlingX (master)
StarlingX OpenStack (master)

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

Timestamp/Logs
--------------
* openstack volume backup create -h
```
[...]
  --container <container>
                        Optional backup container name
  --snapshot <snapshot>
                        Snapshot to backup (name or ID)
  --force Allow to back up an in-use volume
  --incremental Perform an incremental backup
  --no-incremental Do not perform an incremental backup
[...]
```

* cinder help backup-create
```
[...]
  --incremental Incremental backup. Default=False.
  --force Allows or disallows backup of a volume when the volume is attached to an instance. If set to True, backs up the volume whether its status is "available" or "in-use". The backup of an "in-use" volume means your data is crash consistent.
                        Default=False.
  --snapshot-id <snapshot-id>
                        ID of snapshot to backup. Default=None.
  --metadata [<key=value> ...]
                        Metadata key and value pairs. Default=None. (Supported by API version 3.43 and later)
  --availability-zone AVAILABILITY_ZONE
[...]
```

Test Activity
-------------
Developer Testing.

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

Changed in starlingx:
assignee: nobody → Luan Nunes Utimura (lutimura)
tags: added: stx.9.0 stx.distro.openstack
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-armada-app (f/antelope)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-armada-app (f/antelope)

Reviewed: https://review.opendev.org/c/starlingx/openstack-armada-app/+/896129
Committed: https://opendev.org/starlingx/openstack-armada-app/commit/e25852370e71cb5ab2b4df637ff6825c589de923
Submitter: "Zuul (22348)"
Branch: f/antelope

commit e25852370e71cb5ab2b4df637ff6825c589de923
Author: Luan Nunes Utimura <email address hidden>
Date: Thu Sep 21 11:06:10 2023 -0300

    stx-openstackclients: Move patched clients to DIST

    Ever since we migrated to containerized clients, it has been observed
    that two clients -- `cinderclient` and `openstackclient` -- have lost an
    additional parameter that was added by patches [1] and [2]:
    `--location`.

    Apparently, this is happening because the build of this container image
    is prioritizing the download of indexed packages rather than the use of
    the packages we deliver within the wheels tarball (which are patched
    with modifications specific to StarlingX).

    According to [3], when we specify an extra source of wheels for `pip`
    with `--find-links` -- which is what `openstack/loci` does [4] -- it
    does not mean that `pip` will necessarily prioritize this source over
    others, such as PyPi.

    Therefore, to ensure that our patched clients are used in the container
    image, we moved them from `PIP_PACKAGES` to `DIST_PACKAGES` in this
    change.

    Note: The other clients can continue to be installed from indexed
          packages. For this reason, they remain in `PIP_PACKAGES`.

    [1] https://opendev.org/starlingx/openstack-armada-app/src/branch/master/upstream/openstack/python-cinderclient/debian/patches/0001-Add-location-parameter-for-volume-backup-creation.patch
    [2] https://opendev.org/starlingx/openstack-armada-app/src/branch/master/upstream/openstack/python-openstackclient/debian/patches/0002-Add-location-parameter-for-volume-backup-creation.patch
    [3] https://github.com/pypa/pip/issues/9959
    [4] https://opendev.org/openstack/loci/src/commit/efccd0a853879ac6af6066eda09792d0d3afe9c0/scripts/pip_install.sh#L7

    Test Plan:
    PASS - Build `stx-openstackclients` container image
    PASS - Run image and confirm that both clients have the --location
           parameter:

           1. docker run -it <user>/stx-openstackclients:<tag> bash
           2. openstack volume backup create -h
           3. cinder help backup-create

    Closes-Bug: 2036986

    Co-Authored-By: Lucas de Ataides <email address hidden>
    Co-Authored-By: Romulo Leite <email address hidden>
    Change-Id: I4eeece7fc4a98b5254ca9367ca85c14ef5df7f3c
    Signed-off-by: Luan Nunes Utimura <email address hidden>

tags: added: in-f-antelope
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-armada-app (master)
Changed in starlingx:
status: New → In Progress
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/+/897945
Committed: https://opendev.org/starlingx/openstack-armada-app/commit/e7abc4762e77ec826c92fef0ebc4ec133e0de2f5
Submitter: "Zuul (22348)"
Branch: master

commit e7abc4762e77ec826c92fef0ebc4ec133e0de2f5
Author: Luan Nunes Utimura <email address hidden>
Date: Thu Sep 21 11:06:10 2023 -0300

    stx-openstackclients: Move patched clients to DIST

    Ever since we migrated to containerized clients, it has been observed
    that two clients -- `cinderclient` and `openstackclient` -- have lost an
    additional parameter that was added by patches [1] and [2]:
    `--location`.

    Apparently, this is happening because the build of this container image
    is prioritizing the download of indexed packages rather than the use of
    the packages we deliver within the wheels tarball (which are patched
    with modifications specific to StarlingX).

    According to [3], when we specify an extra source of wheels for `pip`
    with `--find-links` -- which is what `openstack/loci` does [4] -- it
    does not mean that `pip` will necessarily prioritize this source over
    others, such as PyPi.

    Therefore, to ensure that our patched clients are used in the container
    image, we moved them from `PIP_PACKAGES` to `DIST_PACKAGES` in this
    change.

    Note: The other clients can continue to be installed from indexed
          packages. For this reason, they remain in `PIP_PACKAGES`.

    [1] https://opendev.org/starlingx/openstack-armada-app/src/branch/master/upstream/openstack/python-cinderclient/debian/patches/0001-Add-location-parameter-for-volume-backup-creation.patch
    [2] https://opendev.org/starlingx/openstack-armada-app/src/branch/master/upstream/openstack/python-openstackclient/debian/patches/0002-Add-location-parameter-for-volume-backup-creation.patch
    [3] https://github.com/pypa/pip/issues/9959
    [4] https://opendev.org/openstack/loci/src/commit/efccd0a853879ac6af6066eda09792d0d3afe9c0/scripts/pip_install.sh#L7

    Test Plan:
    PASS - Build `stx-openstackclients` container image
    PASS - Run image and confirm that both clients have the --location
           parameter:

           1. docker run -it <user>/stx-openstackclients:<tag> bash
           2. openstack volume backup create -h
           3. cinder help backup-create

    Closes-Bug: 2036986

    Co-Authored-By: Lucas de Ataides <email address hidden>
    Co-Authored-By: Romulo Leite <email address hidden>
    Change-Id: I4eeece7fc4a98b5254ca9367ca85c14ef5df7f3c
    Signed-off-by: Luan Nunes Utimura <email address hidden>
    (cherry picked from commit e25852370e71cb5ab2b4df637ff6825c589de923)

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → High
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.