sap-hana icon indicating copy to clipboard operation
sap-hana copied to clipboard

Use cloud-init to setup nm-cloud-setup for RHEL

Open machacekondra opened this issue 2 years ago • 1 comments

Problem

Two network interfaces support for RHEL 8.4+.

Solution

Two network interfaces support for Azure was implemented in package `NetworkManager-cloud-setup`, which is included in RHEL 8.4. Unfortunatelly there is [bug](https://bugzilla.redhat.com/show_bug.cgi?id=1912236) which makes two net interface not working. There is z-stream [bug](https://bugzilla.redhat.com/show_bug.cgi?id=2013208) clone, so the fix should contain next NetworkManager relase (1.30.0-13) included in next RHEL 8.4 zstream.

In order to have nm-cloud-setup up and running in Azure RHEL VM images we need to do following:

dnf install -y NetworkManager-cloud-setup
mkdir -p /etc/systemd/system/nm-cloud-setup.service.d
cat > /etc/systemd/system/nm-cloud-setup.service.d/10-enable-azure.conf << EOF
[Service]
Environment=NM_CLOUD_SETUP_AZURE=yes
EOF
systemctl enable nm-cloud-setup.service
systemctl enable nm-cloud-setup.timer
systemctl restart nm-cloud-setup.service

So we need to either:

  1. rebuild Azure RHEL images with the service installed, configured & enabled.
  2. use this PR to setup this via cloud-init

Tests

Notes

machacekondra avatar Oct 14 '21 13:10 machacekondra

@KimForss @rhmk please take a look. What do you thing about RHEL image rebuilt / using cloudinit?

machacekondra avatar Oct 14 '21 13:10 machacekondra