From 8501bb8a56441358b0ed0b14d9c7e054e90b75a4 Mon Sep 17 00:00:00 2001 From: Jack Hodgkiss Date: Thu, 3 Oct 2024 10:31:40 +0100 Subject: [PATCH 1/3] fix!: store vaulted file hash in temporary variable Due to the use of `| .. >` it is possible for the command on the right to run before the left. This can cause situations whereby `md5sum` attempts to hash what is an empty file as `>` operator will clear the file before writing. --- scripts/config-diff.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/config-diff.sh b/scripts/config-diff.sh index 1d67c4f..04c2229 100755 --- a/scripts/config-diff.sh +++ b/scripts/config-diff.sh @@ -130,7 +130,8 @@ function redact_config_dir { for item in "${KAYOBE_CONFIG_VAULTED_FILES_PATHS[@]}"; do # skip if file doesn't exist if [ -f "$1/src/kayobe-config/$item" ]; then - md5sum "$1/src/kayobe-config/$item" | cut -d " " -f 1 >"$1/src/kayobe-config/$item" + item_hash=$(md5sum "$1/src/kayobe-config/$item") + echo $item_hash | awk '{ print $1;}' >"$1/src/kayobe-config/$item" fi done } From b9bf61e2af56bb63a108ae3973a5295b0fcdc817 Mon Sep 17 00:00:00 2001 From: Jack Hodgkiss Date: Thu, 21 Nov 2024 10:56:15 +0000 Subject: [PATCH 2/3] fix: install `python3-libselinux` to avoid exception ``` Exception: Failed to detect selinux python bindings at ``` --- docker/kayobe/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/kayobe/Dockerfile b/docker/kayobe/Dockerfile index 95593ce..3abca6a 100644 --- a/docker/kayobe/Dockerfile +++ b/docker/kayobe/Dockerfile @@ -33,7 +33,8 @@ RUN dnf install epel-release -y && \ dnf install -y gcc git vim python3-pyyaml findutils\ libffi-devel sudo which openssh-server e2fsprogs \ diffstat diffutils debootstrap procps-ng gdisk util-linux \ - dosfstools lvm2 kpartx systemd-udev bash-completion rsync && \ + dosfstools lvm2 kpartx systemd-udev bash-completion rsync \ + python3-libselinux && \ if [ "$(grep "^PRETTY_NAME=\"Rocky Linux 9" /etc/os-release)" ] ; then \ dnf install -y python3 python3-pip iproute ; else \ dnf install -y python3-virtualenv ; fi && \ From abc26f14b5b2e6a6f84ad9d819cedbbe2aebc834 Mon Sep 17 00:00:00 2001 From: Grzegorz Koper Date: Fri, 10 Jan 2025 12:05:16 +0100 Subject: [PATCH 3/3] (feat) Add proxy support to Tempest container Add support for HTTP, HTTPS, and NO_PROXY environment variables in the Tempest container. This allows the container to work properly in environments that require proxy configuration for network access. The following proxy-related environment variables are now supported: - TEMPEST_HTTP_PROXY - TEMPEST_HTTPS_PROXY - TEMPEST_NO_PROXY Variables are configurable in kayobe-config .automtion.conf/config.sh --- ansible/kayobe-automation-run-tempest.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ansible/kayobe-automation-run-tempest.yml b/ansible/kayobe-automation-run-tempest.yml index c7c5077..ca682b4 100644 --- a/ansible/kayobe-automation-run-tempest.yml +++ b/ansible/kayobe-automation-run-tempest.yml @@ -139,6 +139,15 @@ --env TEMPEST_CONF_OVERRIDES="$TEMPEST_CONF_OVERRIDES" --env TEMPEST_NO_PROXY_EXTRA --env RALLY_CONF_ENABLE_CREATE_TEMPEST_RESOURCES + {% if lookup('env', 'TEMPEST_HTTP_PROXY') %} + --env HTTP_PROXY="$TEMPEST_HTTP_PROXY" + {% endif %} + {% if lookup('env', 'TEMPEST_HTTPS_PROXY') %} + --env HTTPS_PROXY="$TEMPEST_HTTPS_PROXY" + {% endif %} + {% if lookup('env', 'TEMPEST_NO_PROXY') %} + --env NO_PROXY="$TEMPEST_NO_PROXY" + {% endif %} {% if tempest_load_list_path is defined -%} -v {{ load_list_path_remote }}:/home/rally/tempest-load-list:rw {% endif -%} @@ -162,6 +171,9 @@ TEMPEST_OPENRC: "{{ lookup('env', 'TEMPEST_OPENRC') }}" TEMPEST_CONF_OVERRIDES: "{{ lookup('env', 'TEMPEST_CONF_OVERRIDES') }}" TEMPEST_NO_PROXY_EXTRA: "{{ lookup('env', 'TEMPEST_NO_PROXY_EXTRA') }}" + TEMPEST_NO_PROXY: "{{ lookup('env', 'TEMPEST_NO_PROXY') }}" + TEMPEST_HTTP_PROXY: "{{ lookup('env', 'TEMPEST_HTTP_PROXY') }}" + TEMPEST_HTTPS_PROXY: "{{ lookup('env', 'TEMPEST_HTTPS_PROXY') }}" RALLY_CONF_ENABLE_CREATE_TEMPEST_RESOURCES: "{{ lookup('env', 'RALLY_CONF_ENABLE_CREATE_TEMPEST_RESOURCES') }}" no_log: "{{ rally_no_sensitive_log }}" register: docker_result