You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Toolbox fails to resolve names together with systemd-resolved. Filled systemd issue systemd/systemd#33870, but systemd maintainers think hostname should not be changed. And that it is failure of toolbox to change system identification, but not fully.
Is the changing of hostname good idea, when variable $HOSTNAME stays unmodified? Is there specific reason, why it is implemented the current way? Would not some shell variable work better maybe just overriding PS1 prompt?
Steps how to reproduce the behaviour
Have Fedora 40
Spawn Fedora 40 toolbox by toolbox enter.
Have dns-suffix on your connection (lan for example).
Try to resolve toolbox.lan, where toolbox is what $(hostname) command returns.
Expected behaviour
It should resolve fast and clean. It should not fail to take a long to resolve.
Actual behaviour
Under specific conditions, because NSS plugin resolve is ordered beforemyhostname plugin, it may take quite a long time. That is because unlike myhostname plugin, systemd-resolved.service does not understand that toolbox.$SUFFIX is its own hostname. Tries it to find on the network and may fail when doing that.
Toolbx package info (rpm -q toolbox) toolbox-0.0.99.5-11.fc40.x86_64
Output of podman version
# podman version
Client: Podman Engine
Version: 5.2.1
API Version: 5.2.1
Go Version: go1.22.5
Built: Tue Aug 13 20:00:00 2024
OS/Arch: linux/amd64
Podman package info (rpm -q podman) podman-5.2.1-1.fc40.x86_64
Info about your OS
Fedora 40
Additional context
This happens because some black magic is specially applied on $HOSTNAME queries. But because toolbox uses different hostname, it does not recognize it as own name at systemd-resolved and resolves it like any other name. On certainly broken networks that may take exceptionally long time.
This happens on Fedora 40, where just toolbox enter is used and systemd-resolved is enabled by default.
# grep hosts /etc/nsswitch.conf
hosts: files resolve [!UNAVAIL=return] myhostname dns
The text was updated successfully, but these errors were encountered:
I expect just to make easier identification of toolbox shell, that you are inside the toolbox. But that is just my guess, which might be wrong. Hostname is displayed by shell of any distribution by PS1 variable. But I guess the question might be more for local maintainers, who might not only guess.
Describe the bug
Toolbox fails to resolve names together with systemd-resolved. Filled systemd issue systemd/systemd#33870, but systemd maintainers think hostname should not be changed. And that it is failure of toolbox to change system identification, but not fully.
Initially reported at bug https://bugzilla.redhat.com/show_bug.cgi?id=2291062
Is the changing of hostname good idea, when variable
$HOSTNAME
stays unmodified? Is there specific reason, why it is implemented the current way? Would not some shell variable work better maybe just overriding PS1 prompt?Steps how to reproduce the behaviour
toolbox enter
.toolbox.lan
, wheretoolbox
is what$(hostname)
command returns.Expected behaviour
It should resolve fast and clean. It should not fail to take a long to resolve.
Actual behaviour
Under specific conditions, because NSS plugin
resolve
is ordered beforemyhostname
plugin, it may take quite a long time. That is because unlikemyhostname
plugin,systemd-resolved.service
does not understand that toolbox.$SUFFIX is its own hostname. Tries it to find on the network and may fail when doing that.Screenshots
None, see https://bugzilla.redhat.com/show_bug.cgi?id=2291062
Output of
toolbox --version
(v0.0.90+)0.0.99.5
Toolbx package info (
rpm -q toolbox
)toolbox-0.0.99.5-11.fc40.x86_64
Output of
podman version
Podman package info (
rpm -q podman
)podman-5.2.1-1.fc40.x86_64
Info about your OS
Fedora 40
Additional context
This happens because some black magic is specially applied on $HOSTNAME queries. But because toolbox uses different hostname, it does not recognize it as own name at systemd-resolved and resolves it like any other name. On certainly broken networks that may take exceptionally long time.
This happens on Fedora 40, where just
toolbox enter
is used and systemd-resolved is enabled by default.The text was updated successfully, but these errors were encountered: