Bug 1717357
| Summary: | buildah images -f "dangling=true" is not working as expect | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Joy Pu <ypu> |
| Component: | buildah | Assignee: | Jindrich Novy <jnovy> |
| Status: | CLOSED ERRATA | QA Contact: | atomic-bugs <atomic-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.0 | CC: | ajia, dwalsh, jnovy |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | 8.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | buildah-1.11.5-1.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-04-28 15:47:16 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
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? 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
}
]
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 |
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