DNM, debug for container-modify
Change-Id: Ie3132176b2cebc4c1f173b2cdd3e736d503bba5e
This commit is contained in:
parent
b304c8979c
commit
985daeaf97
|
@ -6,9 +6,10 @@
|
||||||
- import_tasks: get_original_user.yml
|
- import_tasks: get_original_user.yml
|
||||||
|
|
||||||
- name: Create image build context directory
|
- name: Create image build context directory
|
||||||
tempfile:
|
file:
|
||||||
state: directory
|
state: directory
|
||||||
prefix: tripleo-modify-image
|
path: /home/zuul/tripleo-modify-image
|
||||||
|
mode: 0755
|
||||||
register: context_dir
|
register: context_dir
|
||||||
|
|
||||||
- name: Set modify_dir_path
|
- name: Set modify_dir_path
|
||||||
|
|
|
@ -106,7 +106,7 @@
|
||||||
- name: Run yum_update.sh
|
- name: Run yum_update.sh
|
||||||
command: >
|
command: >
|
||||||
buildah run
|
buildah run
|
||||||
--volume {{ yum_update.path }}:/tmp/yum_update.sh
|
--volume {{ yum_update.path }}:/tmp
|
||||||
--volume {{ yum_repos_dir_path }}:/etc/yum.repos.d
|
--volume {{ yum_repos_dir_path }}:/etc/yum.repos.d
|
||||||
{% if pkg_mgr_vars_stat.stat.exists %}
|
{% if pkg_mgr_vars_stat.stat.exists %}
|
||||||
--volume /etc/{{ pkg_mgr_suffix }}/vars:/etc/{{ pkg_mgr_suffix }}/vars
|
--volume /etc/{{ pkg_mgr_suffix }}/vars:/etc/{{ pkg_mgr_suffix }}/vars
|
||||||
|
@ -123,14 +123,14 @@
|
||||||
--user root
|
--user root
|
||||||
--net host
|
--net host
|
||||||
{{ from_image }}
|
{{ from_image }}
|
||||||
/tmp/yum_update.sh "{{ update_repo }}"
|
/tmp/yum_update.sh "{{ update_repo }}" &> /tmp/yum_update.log
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: Run yum_update.sh (retry without yum cache)
|
- name: Run yum_update.sh (retry without yum cache)
|
||||||
command: >
|
command: >
|
||||||
buildah --debug run
|
buildah --debug run
|
||||||
--volume {{ yum_update.path }}:/tmp/yum_update.sh
|
--volume {{ yum_update.path }}:/tmp
|
||||||
--volume {{ yum_repos_dir_path }}:/etc/yum.repos.d
|
--volume {{ yum_repos_dir_path }}:/etc/yum.repos.d
|
||||||
{% if pkg_mgr_vars_stat.stat.exists %}
|
{% if pkg_mgr_vars_stat.stat.exists %}
|
||||||
--volume /etc/{{ pkg_mgr_suffix }}/vars:/etc/{{ pkg_mgr_suffix }}/vars
|
--volume /etc/{{ pkg_mgr_suffix }}/vars:/etc/{{ pkg_mgr_suffix }}/vars
|
||||||
|
@ -144,12 +144,30 @@
|
||||||
--user root
|
--user root
|
||||||
--net host
|
--net host
|
||||||
{{ from_image }}
|
{{ from_image }}
|
||||||
bash -x /tmp/yum_update.sh "{{ update_repo }}"
|
bash -x /tmp/yum_update.sh "{{ update_repo }}" &> /tmp/yum_update.log
|
||||||
retries: 2
|
retries: 2
|
||||||
delay: 3
|
delay: 3
|
||||||
register: result
|
register: result
|
||||||
until: result.rc == 0
|
until: result.rc == 0
|
||||||
|
|
||||||
|
- name: deliniate log with container name
|
||||||
|
become: true
|
||||||
|
command: >
|
||||||
|
/usr/bin/touch /var/log/container_yum_update.log
|
||||||
|
'/usr/bin/echo "** {{ source_image }} **" >> /var/log/container_yum_update.log'
|
||||||
|
/usr/bin/cat /tmp/yum_update.log >> /var/log/container_yum_update.log
|
||||||
|
|
||||||
|
#- name: log container yum transaction
|
||||||
|
# command: >
|
||||||
|
# buildah --debug run
|
||||||
|
# --user root
|
||||||
|
# --net host
|
||||||
|
# {{ from_image }}
|
||||||
|
# /usr/bin/cat /tmp/yum_update.log &>> /var/log/container_yum_update.log
|
||||||
|
# retries: 2
|
||||||
|
# delay: 3
|
||||||
|
# ignore_errors: true
|
||||||
|
|
||||||
- name: Remove temporary yum_update.sh script
|
- name: Remove temporary yum_update.sh script
|
||||||
file:
|
file:
|
||||||
path: "{{ yum_update.path }}"
|
path: "{{ yum_update.path }}"
|
||||||
|
|
Loading…
Reference in New Issue