[lxc-devel] [lxd/master] lxd-agent/main/agent: Adds comment about reason for systemd-notify usage

tomponline on Github lxc-bot at linuxcontainers.org
Thu Apr 23 08:45:02 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 361 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200423/a8aa1f17/attachment.bin>
-------------- next part --------------
From 42b6ce695a164e742c905965b4a3397aae13fb99 Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parrott at canonical.com>
Date: Thu, 23 Apr 2020 09:44:02 +0100
Subject: [PATCH] lxd-agent/main/agent: Adds comment about reason for
 systemd-notify usage

Signed-off-by: Thomas Parrott <thomas.parrott at canonical.com>
---
 lxd-agent/main_agent.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lxd-agent/main_agent.go b/lxd-agent/main_agent.go
index 659dfb47e3..74e01068ef 100644
--- a/lxd-agent/main_agent.go
+++ b/lxd-agent/main_agent.go
@@ -103,6 +103,8 @@ func (c *cmdAgent) Run(cmd *cobra.Command, args []string) error {
 	c.mountHostShares()
 
 	// Done with early setup, tell systemd to continue boot.
+	// Allows a service that needs a file that's generated by the agent to be able to declare After=lxd-agent
+	// and know the file will have been created by the time the service is started.
 	if os.Getenv("NOTIFY_SOCKET") != "" {
 		shared.RunCommand("systemd-notify", "READY=1")
 	}


More information about the lxc-devel mailing list