public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 0/2] guestfs: minor fixes
@ 2024-03-08  9:49 Luis Chamberlain
  2024-03-08  9:49 ` [PATCH 1/2] systemd-remote-journal: fix bridge ip for guestsfs Luis Chamberlain
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Luis Chamberlain @ 2024-03-08  9:49 UTC (permalink / raw)
  To: kdevops; +Cc: dave, a.manzanares, fan.ni, jim.harris, Luis Chamberlain

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(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] systemd-remote-journal: fix bridge ip for guestsfs
  2024-03-08  9:49 [PATCH 0/2] guestfs: minor fixes Luis Chamberlain
@ 2024-03-08  9:49 ` Luis Chamberlain
  2024-03-08  9:49 ` [PATCH 2/2] guestfs: wait for connections early Luis Chamberlain
  2024-03-08  9:56 ` [PATCH 0/2] guestfs: minor fixes Luis Chamberlain
  2 siblings, 0 replies; 4+ messages in thread
From: Luis Chamberlain @ 2024-03-08  9:49 UTC (permalink / raw)
  To: kdevops; +Cc: dave, a.manzanares, fan.ni, jim.harris, Luis Chamberlain

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.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 kconfigs/Kconfig.ansible_provisioning | 3 ++-
 kconfigs/Kconfig.guestfs              | 6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/kconfigs/Kconfig.ansible_provisioning b/kconfigs/Kconfig.ansible_provisioning
index 2775ddff22ae..0cddf220d2f7 100644
--- a/kconfigs/Kconfig.ansible_provisioning
+++ b/kconfigs/Kconfig.ansible_provisioning
@@ -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
diff --git a/kconfigs/Kconfig.guestfs b/kconfigs/Kconfig.guestfs
index 03e0fb865a66..377f3434a892 100644
--- a/kconfigs/Kconfig.guestfs
+++ b/kconfigs/Kconfig.guestfs
@@ -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
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] guestfs: wait for connections early
  2024-03-08  9:49 [PATCH 0/2] guestfs: minor fixes Luis Chamberlain
  2024-03-08  9:49 ` [PATCH 1/2] systemd-remote-journal: fix bridge ip for guestsfs Luis Chamberlain
@ 2024-03-08  9:49 ` Luis Chamberlain
  2024-03-08  9:56 ` [PATCH 0/2] guestfs: minor fixes Luis Chamberlain
  2 siblings, 0 replies; 4+ messages in thread
From: Luis Chamberlain @ 2024-03-08  9:49 UTC (permalink / raw)
  To: kdevops; +Cc: dave, a.manzanares, fan.ni, jim.harris, 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.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 scripts/guestfs.Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/guestfs.Makefile b/scripts/guestfs.Makefile
index cfa59cc6bc07..af901b8ddaa0 100644
--- a/scripts/guestfs.Makefile
+++ b/scripts/guestfs.Makefile
@@ -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)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] guestfs: minor fixes
  2024-03-08  9:49 [PATCH 0/2] guestfs: minor fixes Luis Chamberlain
  2024-03-08  9:49 ` [PATCH 1/2] systemd-remote-journal: fix bridge ip for guestsfs Luis Chamberlain
  2024-03-08  9:49 ` [PATCH 2/2] guestfs: wait for connections early Luis Chamberlain
@ 2024-03-08  9:56 ` Luis Chamberlain
  2 siblings, 0 replies; 4+ messages in thread
From: Luis Chamberlain @ 2024-03-08  9:56 UTC (permalink / raw)
  To: kdevops; +Cc: dave, a.manzanares, fan.ni, jim.harris

On Fri, Mar 08, 2024 at 01:49:48AM -0800, Luis Chamberlain wrote:
> Two more minor fixes for guestfs.

Pushed.

  Luis

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-03-08  9:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-08  9:49 [PATCH 0/2] guestfs: minor fixes Luis Chamberlain
2024-03-08  9:49 ` [PATCH 1/2] systemd-remote-journal: fix bridge ip for guestsfs Luis Chamberlain
2024-03-08  9:49 ` [PATCH 2/2] guestfs: wait for connections early Luis Chamberlain
2024-03-08  9:56 ` [PATCH 0/2] guestfs: minor fixes Luis Chamberlain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox