[systemd-devel] getent hosts <machine>
Johannes Ernst
johannes.ernst at gmail.com
Mon Jun 29 11:51:37 PDT 2015
> On Jun 29, 2015, at 10:32, Johannes Ernst <johannes.ernst at gmail.com> wrote:
>
> I was hoping that
> getent hosts <containername>
> would work, just like
> getent hosts <hostname>
> where <hostname> can be anything else in the hosts: field in nsswitch.conf. But no such luck.
>
> The <containername> does get resolved correctly in other cases, e.g. when pinging it.
>
> Not knowing how getent actually works, I don’t know why that is, but I figured I mention it.
I take it back. A reboot fixed it.
It appears I had a different problem: machinectl (suddenly) stopped showing any containers, but ps still showed several systemd-nspawn processes. These containers were originally shown with machinectl. The corresponding nics were also still there. Wildly speculating, I’d say it might be possible that getent stopped working at that time, and “ping” used a cached value.
This may be the same situation as I reported here: http://lists.freedesktop.org/archives/systemd-devel/2015-June/033150.html <http://lists.freedesktop.org/archives/systemd-devel/2015-June/033150.html> — perhaps the container was still there, it just didn’t show up with machinectl any more, which made me believe it was a leftover interface.
(No, I did not touch —register, and note the containers did show up with machinectl after they had been started)
I’ll see whether I can reproduce this, after reboot.
Cheers,
Johannes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150629/6d02477e/attachment-0001.html>
More information about the systemd-devel
mailing list