[libvirt PATCH 2/7] ci: integration: Add an extra level of quoting for augeas set options

Erik Skultety eskultet at redhat.com
Fri Oct 14 11:28:40 UTC 2022


Both log filters and log outputs expect string values, however, augeas
apparently requires an extra level of quotes apart from the ones we
pass via shell (see comment [1]) to work properly, otherwise augeas
ignores the value and returns 0.
Without this fix we don't set libvirt's log level to debug, we don't
set logging to a file and hence we don't include the logs in CI
artifacts in case the test suite fails.

[1] https://github.com/hercules-team/augeas/issues/301#issuecomment-143699880

Signed-off-by: Erik Skultety <eskultet at redhat.com>
---
 ci/integration-template.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ci/integration-template.yml b/ci/integration-template.yml
index 4ca8a0bb24..bb8969da19 100644
--- a/ci/integration-template.yml
+++ b/ci/integration-template.yml
@@ -47,8 +47,8 @@
     do
       LOG_OUTPUTS="1:file:/var/log/libvirt/${daemon}.log";
       LOG_FILTERS="3:remote 4:event 3:util.json 3:util.object 3:util.dbus 3:util.netlink 3:node_device 3:rpc 3:access 1:*";
-      sudo augtool set /files/etc/libvirt/${daemon}.conf/log_filters "$LOG_FILTERS" &>/dev/null;
-      sudo augtool set /files/etc/libvirt/${daemon}.conf/log_outputs "$LOG_OUTPUTS" &>/dev/null;
+      sudo augtool set /files/etc/libvirt/${daemon}.conf/log_filters "'$LOG_FILTERS'" &>/dev/null;
+      sudo augtool set /files/etc/libvirt/${daemon}.conf/log_outputs "'$LOG_OUTPUTS'" &>/dev/null;
       sudo systemctl --quiet stop ${daemon}.service;
       sudo systemctl restart ${daemon}.socket;
     done
-- 
2.37.3



More information about the libvir-list mailing list