Skip to contentSkip to conversation

guestfs: minor fixes

PATCH In review Luis Chamberlain 1 participant 4 messages Mar 8, 2024

lore
Share & tools
lore
#0 lore raw

cover guestfs: minor fixes

Two more minor fixes for guestfs.

Luis Chamberlain (2):
systemd-remote-journal: fix bridge ip for guestsfs
guestfs: wait for connections early

 kconfigs/Kconfig.ansible_provisioning | 3 ++-
 kconfigs/Kconfig.guestfs              | 6 ++++++
 scripts/guestfs.Makefile              | 1 +
 3 files changed, 9 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/2 systemd-remote-journal: fix bridge ip for guestsfs

The IP address for the default network must be used for the systemd-remote-journal. This can vary distro-to-distro and so provide an easy way to describe this.

---
 kconfigs/Kconfig.ansible_provisioning | 3 ++-
 kconfigs/Kconfig.guestfs              | 6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)
kconfigs/Kconfig.ansible_provisioning +2 -1
index 2775ddff22ae..0cddf220d2f7 100644
@@ -195,7 +195,8 @@ config DEVCONFIG_SYSTEMD_JOURNAL_USE_HTTP
 
 config DEVCONFIG_SYSTEMD_JOURNAL_REMOTE_URL
 	string "systemd-remote URL"
-	default "http://192.168.124.1"
+	default "http://192.168.124.1" if VAGRANT
+	default GUESTFS_DEFAULT_BRIDGE_IP if GUESTFS
 	help
           This is used for the client /etc/systemd/journal-upload.conf URL line.
           By default we won't use SSL for now. If you should make sure the
kconfigs/Kconfig.guestfs +6 -0
index 03e0fb865a66..377f3434a892 100644
@@ -1,5 +1,11 @@
 if GUESTFS
 
+config GUESTFS_DEFAULT_BRIDGE_IP
+       string
+       default "http://192.168.122.1" if DISTRO_FEDORA || DISTRO_REDHAT
+       default "http://192.168.122.1" if DISTRO_OPENSUSE || DISTRO_SUSE
+       default "http://192.168.122.1" if DISTRO_DEBIAN || DISTRO_UBUNTU
+
 choice
 	prompt "Guestfs Linux distribution to use"
 	default GUESTFS_FEDORA if DISTRO_FEDORA || DISTRO_REDHAT
Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/2 guestfs: wait for connections early

In reply to Luis Chamberlain

If we kick off ansible the train of ansible tasks right away we end up timing out. The right thing to do is to wait for connections even before we try to gather facts. So be super explicit about that for guestfs. This will save us tons of silly odd timeout bug reports.

---
 scripts/guestfs.Makefile | 1 +
 1 file changed, 1 insertion(+)
scripts/guestfs.Makefile +1 -0
index cfa59cc6bc07..af901b8ddaa0 100644
@@ -70,6 +70,7 @@ $(KDEVOPS_PROVISIONED_SSH):
 			-e 'ansible_python_interpreter=/usr/bin/python3' ;\
 		LIBVIRT_DEFAULT_URI=$(CONFIG_LIBVIRT_URI) $(TOPDIR)/scripts/update_ssh_config_guestfs.py; \
 	fi
+	$(Q)ansible $(ANSIBLE_VERBOSE) -i hosts all -e 'ansible_python_interpreter=/usr/bin/python3' -m wait_for_connection
 	$(Q)touch $(KDEVOPS_PROVISIONED_SSH)
 
 bringup_guestfs: $(GUESTFS_BRINGUP_DEPS)
Signature · 1 line
2.43.0