CI: Fix kayobe-seed-images-* jobs

Followup on I0d7ab0d8ff5b16ac5de8e50e63400bd455996555.
Fix issue with 'permission denied' while doing stat files.
Also we collect kolla-build configs for CI.

Change-Id: I209459ecf5b1a6e5f541cbc72d74aa7defb459d4
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
This commit is contained in:
Maksim Malchuk 2023-04-27 03:57:00 +03:00
parent fdc9415651
commit 7088ff2c2f
4 changed files with 15 additions and 9 deletions

View File

@ -4,7 +4,7 @@ kolla_build_config_path:
# Paths to extra kolla configuration files. # Paths to extra kolla configuration files.
kolla_build_config_paths_default: kolla_build_config_paths_default:
- "{{ role_path }}/templates/" - "{{ role_path }}/templates"
# Paths to extra kolla configuration files. # Paths to extra kolla configuration files.
kolla_build_config_paths_extra: [] kolla_build_config_paths_extra: []

View File

@ -5,11 +5,12 @@
repos_yaml_sources: "{{ kolla_build_config_paths | product(['/kolla/repos.yaml', '/kolla/repos.yml']) | map('join') | unique | list }}" repos_yaml_sources: "{{ kolla_build_config_paths | product(['/kolla/repos.yaml', '/kolla/repos.yml']) | map('join') | unique | list }}"
- name: Check for the presence of any custom repos.y[a]ml file - name: Check for the presence of any custom repos.y[a]ml file
delegate_to: localhost
stat: stat:
path: "{{ item }}" path: "{{ item }}"
get_md5: False get_md5: false
get_checksum: False get_checksum: false
mime: False mime: false
with_items: "{{ repos_yaml_sources }}" with_items: "{{ repos_yaml_sources }}"
register: repos_yaml_stat register: repos_yaml_stat
@ -22,17 +23,17 @@
merge_yaml: merge_yaml:
sources: "{{ repos_yaml_sources }}" sources: "{{ repos_yaml_sources }}"
dest: "{{ repos_yaml_dest }}" dest: "{{ repos_yaml_dest }}"
mode: 0644 mode: "0644"
when: kolla_build_repos_yaml_path is defined when: kolla_build_repos_yaml_path is defined
- name: Ensure the Kolla build configuration file exists - name: Ensure the Kolla build configuration file exists
merge_configs: merge_configs:
sources: "{{ kolla_build_config_paths | product(['/kolla/kolla-build.conf']) | map('join') | list }}" sources: "{{ kolla_build_config_paths | product(['/kolla/kolla-build.conf']) | map('join') | unique | list }}"
dest: "{{ kolla_build_config_path }}/kolla-build.conf" dest: "{{ kolla_build_config_path }}/kolla-build.conf"
mode: 0644 mode: "0644"
- name: Ensure the Kolla build template overrides file exists - name: Ensure the Kolla build template overrides file exists
template: template:
src: template-override.j2.j2 src: template-override.j2.j2
dest: "{{ kolla_build_config_path }}/template-override.j2" dest: "{{ kolla_build_config_path }}/template-override.j2"
mode: 0644 mode: "0644"

View File

@ -33,8 +33,12 @@ copy_logs() {
rm ${LOG_DIR}/previous_kayobe_configs/kolla/config/ironic/ironic-agent.{kernel,initramfs} rm ${LOG_DIR}/previous_kayobe_configs/kolla/config/ironic/ironic-agent.{kernel,initramfs}
rm ${LOG_DIR}/previous_kolla_configs/config/ironic/ironic-agent.{kernel,initramfs} rm ${LOG_DIR}/previous_kolla_configs/config/ironic/ironic-agent.{kernel,initramfs}
fi fi
cp -rvnL /var/log/* ${LOG_DIR}/system_logs/
if [[ -d /opt/kayobe/etc/kolla ]]; then
cp -rnL /opt/kayobe/etc/kolla/* ${LOG_DIR}/kolla_build_configs/
fi
cp -rvnL /var/log/* ${LOG_DIR}/system_logs/
if [[ -x "$(command -v journalctl)" ]]; then if [[ -x "$(command -v journalctl)" ]]; then
journalctl --no-pager > ${LOG_DIR}/system_logs/syslog.txt journalctl --no-pager > ${LOG_DIR}/system_logs/syslog.txt

View File

@ -14,6 +14,7 @@
- "kayobe_configs" - "kayobe_configs"
- "kolla_configs" - "kolla_configs"
- "kolla_node_configs" - "kolla_node_configs"
- "kolla_build_configs"
- "system_logs" - "system_logs"
- "kolla" - "kolla"
- "ansible" - "ansible"