Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix delay issues on libvirt service when using RHEL with snc profile #297

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions pkg/provider/aws/action/rhel/cloud-config-snc
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,18 @@ rh_subscription:
auto-attach: true
runcmd:
- while fuser /var/lib/rpm/.rpm.lock > /dev/null 2>&1 ; do sleep 1 ; done
- dnf install -y podman qemu-kvm libvirt virt-install virt-viewer jq git
- dnf clean all
- dnf --best install -y qemu-kvm libvirt virt-install virt-viewer jq git curl openssl
# 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 mask libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket libvirtd-tls.socket libvirtd-tcp.socket
- systemctl enable libvirtd
- systemctl start --no-block libvirtd
- for drv in qemu network nodedev nwfilter secret storage interface; do systemctl start virt${drv}d{,-ro,-admin}.socket; done
- 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
{{ if .InstallActionsRunner }} - sudo -u {{ .Username }} bash -c /opt/install-ghrunner.sh {{ end }}
{{ if .InstallActionsRunner }}write_files:
# Github actions runner installation
Expand Down