Hi, Efim

Thanks for your contribution.

I think your patch is a partial solution because other network managers can
be used
for example systemd-networkd or dhcpcd. Maybe a better solution is
After=network.target.

Do you have any other suggestions?

Best Regards,
Konstantin Kostiuk.


On Wed, Aug 16, 2023 at 11:20 PM Efim Shevrin <[email protected]>
wrote:

> From: Fima Shevrin <[email protected]>
>
> When the guest OS starts, qemu-ga sends an event to the host.
> This event allows services on the host to start configuring
> the already running guest OS. When configuring network settings,
> it is possible that an external service will receive a signal
> from qemu-ga about the start of guest OS, while NetworkManager
> may not be running yet. Therefore, network setting may not
> be available. With the current patch, we eliminate the described
> race condition between qemu-ga and NetworkManager for guest OS
> network setting cases.
>
> Signed-off-by: Fima Shevrin <[email protected]>
> ---
>  contrib/systemd/qemu-guest-agent.service | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/contrib/systemd/qemu-guest-agent.service
> b/contrib/systemd/qemu-guest-agent.service
> index 51cd7b37ff..6e2d059356 100644
> --- a/contrib/systemd/qemu-guest-agent.service
> +++ b/contrib/systemd/qemu-guest-agent.service
> @@ -2,6 +2,7 @@
>  Description=QEMU Guest Agent
>  BindTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device
>  After=dev-virtio\x2dports-org.qemu.guest_agent.0.device
> +After=NetworkManager.service
>
>  [Service]
>  ExecStart=-/usr/bin/qemu-ga
> --
> 2.34.1
>
>

Reply via email to