From e164f4d13d4f0c9e216d84d474f93adf3bcc7629 Mon Sep 17 00:00:00 2001 From: Adrian Riobo Date: Fri, 27 Sep 2024 10:16:44 +0200 Subject: [PATCH] fix: delay issues on libvirt service when using RHEL with snc profile. Fix #296 Signed-off-by: Adrian Riobo --- pkg/provider/aws/action/rhel/cloud-config-snc | 10 ++++------ tkn/infra-aws-rhel.yaml | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pkg/provider/aws/action/rhel/cloud-config-snc b/pkg/provider/aws/action/rhel/cloud-config-snc index 6dcc22d94..4f2acce2c 100644 --- a/pkg/provider/aws/action/rhel/cloud-config-snc +++ b/pkg/provider/aws/action/rhel/cloud-config-snc @@ -5,26 +5,24 @@ rh_subscription: auto-attach: true runcmd: - while fuser /var/lib/rpm/.rpm.lock > /dev/null 2>&1 ; do sleep 1 ; done + - dnf clean all - dnf install -y podman qemu-kvm libvirt virt-install virt-viewer jq git # Debug libvirt #- echo 'log_filters="1:libvirt 1:util 1:qemu"' | tee -a /etc/libvirt/libvirtd.conf #- echo 'log_outputs="1:file:/var/log/libvirt/libvirtd.log"' | tee -a /etc/libvirt/libvirtd.conf # https://libvirt.org/manpages/libvirtd.html#system-socket-activation - echo 'LIBVIRTD_ARGS="--listen"' | tee -a /etc/sysconfig/libvirtd - - echo 'listen_tls = 0' | tee -a /etc/libvirt/libvirtd.conf - - echo 'listen_tcp = 1' | tee -a /etc/libvirt/libvirtd.conf - - echo 'tcp_port = "16509"' | tee -a /etc/libvirt/libvirtd.conf - - echo 'auth_tcp = "none"' | tee -a /etc/libvirt/libvirtd.conf - systemctl daemon-reload - systemctl enable libvirtd-tcp.socket - - systemctl start --no-block libvirtd-tcp.socket + - systemctl start libvirtd-tcp.socket - systemctl mask libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket libvirtd-tls.socket libvirtd-tcp.socket - systemctl enable libvirtd - - systemctl start --no-block libvirtd + - systemctl start libvirtd - usermod -a -G libvirt {{ .Username }} - echo "user.max_user_namespaces=28633" | tee -a /etc/sysctl.d/userns.conf - sysctl -p /etc/sysctl.d/userns.conf - dnf upgrade -y curl openssl + - until virsh -c qemu:///system uri; do sleep 15; done {{ if .InstallActionsRunner }} - sudo -u {{ .Username }} bash -c /opt/install-ghrunner.sh {{ end }} {{ if .InstallActionsRunner }}write_files: # Github actions runner installation diff --git a/tkn/infra-aws-rhel.yaml b/tkn/infra-aws-rhel.yaml index 94b4174d7..89d053332 100644 --- a/tkn/infra-aws-rhel.yaml +++ b/tkn/infra-aws-rhel.yaml @@ -90,7 +90,7 @@ spec: steps: - name: provisioner - image: quay.io/redhat-developer/mapt:v0.7.0-dev + image: quay.io/rhqp/mapt:pr-297 imagePullPolicy: Always script: | #!/bin/sh