On Sun, 12.06.16 02:07, Christian Rebischke (chris.rebisc...@archlinux.org)
wrote:
> Hello,
> I am currently working on a fix for:
> https://github.com/systemd/systemd/issues/2809
>
> How does a machine get deregistered?
> I look for a proper way to remove the machine from the hashmap
> (see below). Does systemd have a function that provides deregistering a
> machine?
Nope. The idea is that systemd will notice that the scope/service of
the machine dies, and let machined know, which then removes the
machine from its list.
Did you check in your case whether the scope/service if your service
still sticks around when it really shouldn't?
>
> > if (hashmap_get(manager->machines, name))
> > return sd_bus_error_setf(error, BUS_ERROR_MACHINE_EXISTS,
> > "Machine '%s' already exists", name);
>
>
> I was thinking about deregistering the machine right after the kill via
> SIGINT to the systemd PID1 in the machine.
> What would be the best way to do this?
Well, it really should stay around in machined until it is really
gone...
Lennart
--
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel