]> xenbits.xensource.com Git - libvirt.git/commitdiff
ci: integration: Add an extra level of quoting for augeas set options
authorErik Skultety <eskultet@redhat.com>
Wed, 12 Oct 2022 15:33:27 +0000 (17:33 +0200)
committerErik Skultety <eskultet@redhat.com>
Tue, 25 Oct 2022 07:40:43 +0000 (09:40 +0200)
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@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
ci/integration-template.yml

index 4ca8a0bb242e1d391e56996cac4cf1a9a21acd99..bb8969da199b453077cb1ba8065f8e1fa609c360 100644 (file)
@@ -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