system registry-image-delete gives unclear responses

Bug #2037552 reported by Karla Felix
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Karla Felix

Bug Description

Brief Description

A couple responses given by system registry-image-delete makes it unclear if the image is properly being deleted:

    Delete all tags for an image listed in "system registry-image-list". The image will still show up in the list. "system registry-image-tags <image>" returns no tags for it.
    "system registry-image-delete" will ALWAYS return that "the image was deleted" even when given as parameter an image that isn't in the registry

Severity

<Minor: System/Feature is usable with minor issue>

Steps to Reproduce

Listed in the description

Expected Behavior

Images shouldn't show in the image list after all tags are deleted.

image-delete should only respond positively AFTER confirming the image was in fact deleted.

Actual Behavior

image name shows up in image list after being deleted. checking for tags returns a blank.

Reproducibility

<Reproducible>

System Configuration

Any

Deleted image remains on image list
[sysadmin@controller-0 ~(keystone_admin)]$ system registry-image-list | grep hello
docker.io/library/hello-world

[sysadmin@controller-0 ~(keystone_admin)]$ system registry-image-tags docker.io/library/hello-world
-----------
Image Tag

-----------
latest

-----------
[sysadmin@controller-0 ~(keystone_admin)]$ system registry-image-delete docker.io/library/hello-world:latest
Image docker.io/library/hello-world:latest deleted, please run garbage collect to free disk space.
[sysadmin@controller-0 ~(keystone_admin)]$ system registry-garbage-collect
Running docker registry garbage collect
[sysadmin@controller-0 ~(keystone_admin)]$ system registry-image-list | grep hello
docker.io/library/hello-world

[sysadmin@controller-0 ~(keystone_admin)]$ system registry-image-tags docker.io/library/hello-world

[sysadmin@controller-0 ~(keystone_admin)]$

system registry-image-delete always responds that it deleted the target

[sysadmin@controller-0 ~(keystone_admin)]$ system registry-image-delete some-random-filler:dskfhasfasdf
Image some-random-filler:dskfhasfasdf deleted, please run garbage collect to free disk space.

Alarms

NA

Test Activity

Normal use

Workaround

NA

Karla Felix (kkarolin)
Changed in starlingx:
assignee: nobody → Karla Felix (kkarolin)
Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

Reviewed: https://review.opendev.org/c/starlingx/config/+/895218
Committed: https://opendev.org/starlingx/config/commit/91f523f06a5ad0ca50704a527d097eb877915c72
Submitter: "Zuul (22348)"
Branch: master

commit 91f523f06a5ad0ca50704a527d097eb877915c72
Author: Karla Felix <email address hidden>
Date: Thu Sep 14 19:08:04 2023 -0300

    Add error message to system registry-image-delete

    Add an error message to registry-image-delete, currently when users
    attempt to delete a non-existent image, the command fails silently.
    This review is adding an error message to this operation, now when
    the user tries to delete an image that doesn't exist it will be displayed
    this message: "No tag found for image: <image_name>"

    Also improving 'system registry-image-list' by adding an optional
    argument "--filter-out-untagged" to filter and display only images
    that have associated tags in the system registry.

    Test Plan:
    PASS: Run 'system registry-image-list' without '--filter-out-untagged'.
    PASS: Run 'system registry-image-list' with '--filter-out-untagged' and
          verify if the untagged images are out of the list.
    PASS: Delete an image that doesn't exist and verify if it will return
          the error message.
    PASS: Delete an existing image and verify if it was successfully
          deleted.

    Closes-Bug:2037552

    Signed-off-by: Karla Felix <email address hidden>
    Change-Id: Ibbc25dff5f4c1b22d6bf923235e6d0cd821b4953

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.9.0 stx.containers
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.