aboutsummaryrefslogtreecommitdiff
path: root/gcloud-image-test.aww
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-01-28 00:15:52 +0700
committerShulhan <ms@kilabit.info>2026-01-28 00:16:44 +0700
commit5aafb2bf78ba7e421d75cdef028850a6dc8c286f (patch)
treef245567c89165a8dc44431eb4e8c7c4088bbe434 /gcloud-image-test.aww
parent701ad0f9188f0cba9e220c97aa78546a0da98344 (diff)
downloadcompute-archlinux-image-builder-5aafb2bf78ba7e421d75cdef028850a6dc8c286f.tar.xz
all: set the resolv.conf symlinked to systemd stub-resolv.conf
The default resolv.conf is empty. This cause program that depends on resolv.conf for name resolution will fail. As a test, we create small Go program "cmd/golookup" that can lookup IP address of host name using pure Go resolver (using/etc/resolv.conf).
Diffstat (limited to 'gcloud-image-test.aww')
-rw-r--r--gcloud-image-test.aww31
1 files changed, 24 insertions, 7 deletions
diff --git a/gcloud-image-test.aww b/gcloud-image-test.aww
index 6f8bf41..1ad1346 100644
--- a/gcloud-image-test.aww
+++ b/gcloud-image-test.aww
@@ -12,19 +12,36 @@ gcloud compute instances create arch-test \
gcloud compute instances describe arch-test \
--zone={{.Val "gcloud::zone"}}
-gcloud compute instances tail-serial-port-output {{.Val "host::name"}} \
+timeout 20s gcloud compute instances tail-serial-port-output \
--zone={{.Val "gcloud::zone"}} \
+ {{.Val "host::name"}} \
+ || exit 0
-gcloud compute ssh \
+gcloud compute scp \
--zone={{.Val "gcloud::zone"}} \
- --command="lsblk -o NAME,UUID,MOUNTPOINTS; cat /etc/fstab; \
- cat /etc/resolv.conf; timedatectl show-timesync; localectl; \
- sudo pacman -Sy" \
- --quiet \
- arch-test
+ golookup \
+ arch-test:~/
gcloud compute ssh \
--zone={{.Val "gcloud::zone"}} \
+ --command="\
+ echo '--- lsblk'; \
+ lsblk -o NAME,UUID,MOUNTPOINTS; \
+ echo '--- /etc/fstab'; \
+ cat /etc/fstab; \
+ echo '--- /etc/resolv.conf'; \
+ cat /etc/resolv.conf; \
+ echo '--- networkctl'; \
+ networkctl; \
+ echo '--- timedatectl'; \
+ timedatectl show-timesync; \
+ echo '--- localectl'; \
+ localectl; \
+ echo '--- pacman -Sy'; \
+ sudo pacman -Sy; \
+ echo '--- golookup'; \
+ ./golookup kilabit.info; \
+ " \
arch-test
## Test OS Login.