From 1d2195523656a74c3a1fc968aa9ef7f9afe41408 Mon Sep 17 00:00:00 2001 From: Rich Ercolani Date: Fri, 22 Oct 2021 14:48:46 -0400 Subject: [PATCH] Workaround cloud-init hotplug issue cloud-init added a hook which triggers on every device add/rm event, which results in holding open devices for a while after they're created/destroyed. So let's shove an exclusion rule for that into the GH workflows until it gets fixed. Closes: #12644 Signed-off-by: Rich Ercolani --- .github/workflows/zfs-tests-functional.yml | 10 ++++++++++ .github/workflows/zfs-tests-sanity.yml | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/.github/workflows/zfs-tests-functional.yml b/.github/workflows/zfs-tests-functional.yml index eacc95ae1617..8a9b1205a93b 100644 --- a/.github/workflows/zfs-tests-functional.yml +++ b/.github/workflows/zfs-tests-functional.yml @@ -45,6 +45,16 @@ jobs: sudo sed -i.bak 's/updates/extra updates/' /etc/depmod.d/ubuntu.conf sudo depmod sudo modprobe zfs + # Workaround for cloud-init bug + # see https://github.com/openzfs/zfs/issues/12644 + FILE=/lib/udev/rules.d/10-cloud-init-hook-hotplug.rules + if [ -r "${FILE}" ]; then + HASH=$(md5sum "${FILE}" | awk '{ print $1 }') + if [ "${HASH}" = "121ff0ef1936cd2ef65aec0458a35772" ]; then + # Just shove a zd* exclusion right above the hotplug hook... + sudo sed -i -e s/'LABEL="cloudinit_hook"'/'KERNEL=="zd*", GOTO="cloudinit_end"\n&'/ "${FILE}" + fi + fi # Workaround to provide additional free space for testing. # https://github.com/actions/virtual-environments/issues/2840 sudo rm -rf /usr/share/dotnet diff --git a/.github/workflows/zfs-tests-sanity.yml b/.github/workflows/zfs-tests-sanity.yml index 40a7f8ba511c..004656bf15d3 100644 --- a/.github/workflows/zfs-tests-sanity.yml +++ b/.github/workflows/zfs-tests-sanity.yml @@ -41,6 +41,16 @@ jobs: sudo sed -i.bak 's/updates/extra updates/' /etc/depmod.d/ubuntu.conf sudo depmod sudo modprobe zfs + # Workaround for cloud-init bug + # see https://github.com/openzfs/zfs/issues/12644 + FILE=/lib/udev/rules.d/10-cloud-init-hook-hotplug.rules + if [ -r "${FILE}" ]; then + HASH=$(md5sum "${FILE}" | awk '{ print $1 }') + if [ "${HASH}" = "121ff0ef1936cd2ef65aec0458a35772" ]; then + # Just shove a zd* exclusion right above the hotplug hook... + sudo sed -i -e s/'LABEL="cloudinit_hook"'/'KERNEL=="zd*", GOTO="cloudinit_end"\n&'/ "${FILE}" + fi + fi # Workaround to provide additional free space for testing. # https://github.com/actions/virtual-environments/issues/2840 sudo rm -rf /usr/share/dotnet