diff --git a/lib/tiny-cloud/cloud/nocloud/imds b/lib/tiny-cloud/cloud/nocloud/imds index 2c7a4f0..636ec2c 100644 --- a/lib/tiny-cloud/cloud/nocloud/imds +++ b/lib/tiny-cloud/cloud/nocloud/imds @@ -56,7 +56,7 @@ _load_nocloud_volume() { [ "$mounted" ] && break for label in cidata CIDATA; do [ -n "$mounted" ] && break - mount -o ro -t "$fstype" LABEL="$label" "$mntdir" && mounted=1 + mount -o ro -t "$fstype" LABEL="$label" "$mntdir" 2>/dev/null && mounted=1 done done if [ -n "$mounted" ]; then diff --git a/tests/tiny-cloud.test b/tests/tiny-cloud.test index a9614ff..f65852b 100755 --- a/tests/tiny-cloud.test +++ b/tests/tiny-cloud.test @@ -34,6 +34,7 @@ no_metadata_boot_body() { -e not-match:"not found" \ -e not-match:"o such file" \ -o match:"rc-update add.*sshd" \ + -e not-match:"mount:" \ tiny-cloud boot done } @@ -43,6 +44,7 @@ no_userdata_early_body() { CLOUD="$provider" atf_check \ -e not-match:"unknown" \ -e match:"save_userdata.*done" \ + -e not-match:"mount:" \ tiny-cloud early done } @@ -52,6 +54,7 @@ no_userdata_main_body() { # we should not set empty hostname # we should not create .ssh dir for non-existing user CLOUD="$provider" atf_check \ + -e not-match:"mount:" \ -e not-match:"failed" \ -e not-match:"unknown" \ -o not-match:"hostname.*-F" \