Skip to content

Commit

Permalink
fix: delay issues on libvirt service when using RHEL with snc profile.
Browse files Browse the repository at this point in the history
…Fix #296

Signed-off-by: Adrian Riobo <[email protected]>
  • Loading branch information
adrianriobo committed Sep 27, 2024
1 parent c9f82da commit e164f4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions pkg/provider/aws/action/rhel/cloud-config-snc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tkn/infra-aws-rhel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e164f4d

Please sign in to comment.