RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1717357 - buildah images -f "dangling=true" is not working as expect
Summary: buildah images -f "dangling=true" is not working as expect
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: buildah
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Jindrich Novy
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-05 10:31 UTC by Joy Pu
Modified: 2023-04-11 15:26 UTC (History)
3 users (show)

Fixed In Version: buildah-1.11.5-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 15:47:16 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-37693 0 None None None 2023-04-11 15:26:27 UTC
Red Hat Product Errata RHSA-2020:1650 0 None None None 2020-04-28 15:47:33 UTC

Description Joy Pu 2019-06-05 10:31:57 UTC
Description of problem:
The images filter "dangling=true" will not filter any images when you try it without other flags but will gives you all images if you using it with "-q" or "--json". This is a very old issue in upstream and it is already fixed. We may need update buildah to fix it.


Version-Release number of selected component (if applicable):
buildah-1.5-3.gite94b4f9

How reproducible:


Steps to Reproduce:
1. Build an image with and without -t to generate two images with and without names
# buildah bud -t test .
# buildah bud .
2. Use buildah image --filter "dangling=true" to try to filter images. But you will get nothing in the output
# buildah images -f "dangling=true"
IMAGE NAME                                               IMAGE TAG            IMAGE ID             CREATED AT             SIZE
3. Use buildah image --filter "dangling=true"  --json to try to filter images. It will return all images you have, including the one which have name.
# buildah images -f "dangling=true" --json
{
    "id": "4b48aee6ca529aa992ce8232cb02bffcd5bd437ce2e679fcdf7e581f074e62db",
    "names": [
        "localhost/test:latest"
    ]
}
{
    "id": "e46d3d364dd878e8e678b6d1e59080c20fbf8b4d3f988945be5bb334792d064f",
    "names": null
}



Actual results:
The image without name can not be filter as expect.


Expected results:
We can get the image without names from the output


Additional info:
Upstream related issue: https://github.com/containers/buildah/issues/1199

Comment 1 Daniel Walsh 2019-09-01 11:02:00 UTC
Fixed in buildah 1.6,  Since we will be shipping a much newer version of buildah in RHEL8.1 we should be all set.

Tom can you confirm the version of buildah we will be shipping in RHEL8.1?

Comment 6 Alex Jia 2020-03-16 03:47:27 UTC
Verified in both buildah-1.11.5-1.module+el8.2.0+4897+4dbe4c2c.x86_64
and buildah-1.11.6-7.module+el8.2.0+5856+b8046c6d.x86_64.

[root@hpe-dl380pgen8-02-vm-1 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.2 Beta (Ootpa)

1. buildah-1.11.5-1.module+el8.2.0+4897+4dbe4c2c.x86_64

[root@hpe-dl380pgen8-02-vm-1 test1]# buildah images
REPOSITORY       TAG      IMAGE ID       CREATED          SIZE
<none>           <none>   6c5860e40999   45 seconds ago   105 MB
localhost/test   latest   04b09ce6ec16   57 seconds ago   105 MB

[root@hpe-dl380pgen8-02-vm-1 test1]# buildah images -f "dangling=true"
REPOSITORY   TAG      IMAGE ID       CREATED          SIZE
<none>       <none>   6c5860e40999   53 seconds ago   105 MB

[root@hpe-dl380pgen8-02-vm-1 test1]# buildah images -f "dangling=true" --json
[
    {
        "id": "6c5860e409996e72ae9d5eccdd5bd6270a93fc8c6922a4903dc11f8c8abeb2e5",
        "names": null,
        "digest": "sha256:7bfdaeb60b1485aa9fec25f712a659a2df41372c20bef6e05dab089d8ad2d323",
        "createdat": "59 seconds ago",
        "size": "105 MB",
        "createdatraw": "2020-03-15T23:43:48.473233333-04:00",
        "readonly": false
    }
]


2. buildah-1.11.6-7.module+el8.2.0+5856+b8046c6d.x86_64

[root@hpe-dl380pgen8-02-vm-1 test1]# buildah images
REPOSITORY       TAG      IMAGE ID       CREATED          SIZE
<none>           <none>   56e1107171af   15 seconds ago   105 MB
localhost/test   latest   24ccb5e30d6f   40 seconds ago   105 MB

[root@hpe-dl380pgen8-02-vm-1 test1]# buildah images -f "dangling=true"
REPOSITORY   TAG      IMAGE ID       CREATED          SIZE
<none>       <none>   56e1107171af   23 seconds ago   105 MB

[root@hpe-dl380pgen8-02-vm-1 test1]# buildah images -f "dangling=true" --json
[
    {
        "id": "56e1107171af350244221269ea0b850644b3abcbb18e086ccbe25be10c4c05a0",
        "names": null,
        "digest": "sha256:70d3713328e303198b7dee25f897bb0ebae66d22bb1156a3008805a06e9c1d57",
        "createdat": "39 seconds ago",
        "size": "105 MB",
        "createdatraw": "2020-03-15T23:38:52.065229401-04:00",
        "readonly": false
    }
]

Comment 8 errata-xmlrpc 2020-04-28 15:47:16 UTC
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, 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/RHSA-2020:1650


Note You need to log in before you can comment on or make changes to this bug.