Add workaround for container build

Latest buildah.x86_64 1.16.7-4 is throwing below warning:-
~~~
[root@node-0000915416 ~]# buildah images
WARN[0000] Found deprecated file /usr/share/containers/libpod.conf,
please remove. Use /etc/containers/containers.conf to override defaults.
REPOSITORY TAG IMAGE ID CREATED SIZE
~~~

The above buildah deprecations warning is getting added as a
first item in the list instead of container name, details in bug[1]

With this patch, we are moving /usr/share/containers/libpod.conf to
/usr/share/containers/libpod.conf_backup to avoid the warning as a
workaround.

[1] https://bugs.launchpad.net/tripleo/+bug/1916742
Closes-Bug: #1916742

Change-Id: Ia4a892007b33ed991c6fefc19cbd3683086d5148
This commit is contained in:
Sandeep Yadav 2021-02-24 18:14:28 +05:30
parent 7390d5c54a
commit ebe88b8190
1 changed files with 11 additions and 0 deletions

View File

@ -238,6 +238,17 @@
- ansible_distribution|lower == "redhat"
become: true
# Workaround for https://bugs.launchpad.net/tripleo/+bug/1916742 as buildah is throwing warnings
- name: Check if "/usr/share/containers/libpod.conf" exists.
become: true
stat: path=/usr/share/containers/libpod.conf
register: libpod_conf_file_stat
- name: "Move /usr/share/containers/libpod.conf to /usr/share/containers/libpod.conf_backup"
become: true
command: mv /usr/share/containers/libpod.conf /usr/share/containers/libpod.conf_backup
when: libpod_conf_file_stat.stat.exists
- name: Retrieve built images # noqa risky-shell-pipe
shell: "{{ container_cli }} images | grep {{ container_name_prefix }} | awk '{ print $1 }'"
register: built_images