public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH installer v2] first-boot: multi-user: start after product-specific API proxy
@ 2024-11-19 15:13 Christoph Heiss
  2024-11-19 16:21 ` Thomas Lamprecht
  2024-11-19 17:47 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Heiss @ 2024-11-19 15:13 UTC (permalink / raw)
  To: pve-devel

First of, multi-user.target does not seem to really provide any (strong)
ordering guarantee, it seems.

Instead, let the "fully-up" ordering from the auto-installer depend on
the product-specific API proxy instead.

That way, it is ensured that 1) the system really is fully up and 2)
that users could even use the API / CLI commands, or write files to
pmxcfs (in case of PVE).

After= and Wants= ignore non-existent units, so we can just specify all
three API proxy units here w/o any conditional.

Suggested-by: Shannon Sterz <s.sterz@proxmox.com>
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
That systemd ignores non-existent for After= and Wants= was definitely a
TIL for me, but very convenient in this case :^)

v1: https://lore.proxmox.com/pve-devel/20241119143946.370202-1-c.heiss@proxmox.com/

 proxmox-first-boot/etc/proxmox-first-boot-multi-user.service | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/proxmox-first-boot/etc/proxmox-first-boot-multi-user.service b/proxmox-first-boot/etc/proxmox-first-boot-multi-user.service
index d3c798d..a99d826 100644
--- a/proxmox-first-boot/etc/proxmox-first-boot-multi-user.service
+++ b/proxmox-first-boot/etc/proxmox-first-boot-multi-user.service
@@ -1,6 +1,7 @@
 [Unit]
 Description=Proxmox First Boot Setup (Fully Booted)
-After=systemd-remount-fs.service
+After=systemd-remount-fs.service pveproxy.service pmgproxy.service proxmox-backup-proxy.service
+Wants=pveproxy.service pmgproxy.service proxmox-backup-proxy.service
 ConditionPathExists=/var/lib/proxmox-first-boot/pending-first-boot-setup
 ConditionPathIsReadWrite=/var/lib
 
-- 
2.47.0



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


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

* Re: [pve-devel] [PATCH installer v2] first-boot: multi-user: start after product-specific API proxy
  2024-11-19 15:13 [pve-devel] [PATCH installer v2] first-boot: multi-user: start after product-specific API proxy Christoph Heiss
@ 2024-11-19 16:21 ` Thomas Lamprecht
  2024-11-19 17:47 ` [pve-devel] applied: " Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2024-11-19 16:21 UTC (permalink / raw)
  To: Proxmox VE development discussion, Christoph Heiss

Am 19.11.24 um 16:13 schrieb Christoph Heiss:
> First of, multi-user.target does not seem to really provide any (strong)
> ordering guarantee, it seems.

Note that on a second thought it's really clear, we never ordered _after_
multi-user.target, we just told systemd that we're part of that target so
that we get scheduled when it's pulled in, which this always is by default.

But when we get scheduled is purely dependent from the ordering we
explicitly state.

We could have made this part of some other target and then ordered after
mutli-user.target and it would have worked like originally planned.
But ordering after the API daemons is nicer anyway, so in some sense we
were lucky to get it wrong first ^^



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


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

* [pve-devel] applied: [PATCH installer v2] first-boot: multi-user: start after product-specific API proxy
  2024-11-19 15:13 [pve-devel] [PATCH installer v2] first-boot: multi-user: start after product-specific API proxy Christoph Heiss
  2024-11-19 16:21 ` Thomas Lamprecht
@ 2024-11-19 17:47 ` Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2024-11-19 17:47 UTC (permalink / raw)
  To: Proxmox VE development discussion, Christoph Heiss

Am 19.11.24 um 16:13 schrieb Christoph Heiss:
> First of, multi-user.target does not seem to really provide any (strong)
> ordering guarantee, it seems.
> 
> Instead, let the "fully-up" ordering from the auto-installer depend on
> the product-specific API proxy instead.
> 
> That way, it is ensured that 1) the system really is fully up and 2)
> that users could even use the API / CLI commands, or write files to
> pmxcfs (in case of PVE).
> 
> After= and Wants= ignore non-existent units, so we can just specify all
> three API proxy units here w/o any conditional.
> 
> Suggested-by: Shannon Sterz <s.sterz@proxmox.com>
> Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
> ---
> That systemd ignores non-existent for After= and Wants= was definitely a
> TIL for me, but very convenient in this case :^)
> 
> v1: https://lore.proxmox.com/pve-devel/20241119143946.370202-1-c.heiss@proxmox.com/
> 
>  proxmox-first-boot/etc/proxmox-first-boot-multi-user.service | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
>

applied, thanks!


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


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

end of thread, other threads:[~2024-11-19 17:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-19 15:13 [pve-devel] [PATCH installer v2] first-boot: multi-user: start after product-specific API proxy Christoph Heiss
2024-11-19 16:21 ` Thomas Lamprecht
2024-11-19 17:47 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal