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
When a --network-alias option to a container has a space in it, no error is thrown during container creation, but DNS resolution within the container will fail with timeouts.
Steps to reproduce the issue
Steps to reproduce the issue
sudo podman run --network-alias "testtrim release" --rm -it node:current-bookworm /bin/bash
curl https://google.com/
Describe the results you received
$ sudo podman run --network-alias "testtrim release" --rm -it node:current-bookworm /bin/bash
root@00a382cc61c7:/# curl https://google.com/
curl: (6) Could not resolve host: google.com
Describe the results you expected
Either having whitespace in an alias is unsupported (which would make sense) and should cause an error; or it should be silently ignored; but either way I should not get a container where DNS resolution will fail for an unidentifiable reason.
If I remove the space from my alias, DNS resolution works:
$ sudo podman run --network-alias "testtrim-release" --rm -it node:current-bookworm /bin/bash
root@ad50b96ec6b2:/# curl https://google.com > /dev/null
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 220 100 220 0 0 3031 0 --:--:-- --:--:-- --:--:-- 3055
podman info output
host:
arch: amd64buildahVersion: 1.37.3cgroupControllers:
- cpuset
- cpu
- io
- memory
- hugetlb
- pids
- rdma
- misccgroupManager: systemdcgroupVersion: v2conmon:
package: Unknownpath: /nix/store/cygy62gmh4fqjicwg2zflyaidimfnj6q-podman-helper-binary-wrapper/bin/conmonversion: 'conmon version 2.1.12, commit: 'cpuUtilization:
idlePercent: 97.79systemPercent: 0.52userPercent: 1.69cpus: 32databaseBackend: boltdbdistribution:
codename: vicunadistribution: nixosversion: "24.11"eventLogger: journaldfreeLocks: 2031hostname: nixosdesktopidMappings:
gidmap: nulluidmap: nullkernel: 6.6.63linkmode: dynamiclogDriver: journaldmemFree: 2413629440memTotal: 134120222720networkBackend: netavarknetworkBackendInfo:
backend: netavarkdns:
package: Unknownpath: /nix/store/60cdq9pj1y4sxn28pqb7mb5wf3yv6769-podman-5.2.3/libexec/podman/aardvark-dnsversion: aardvark-dns 1.13.0package: Unknownpath: /nix/store/60cdq9pj1y4sxn28pqb7mb5wf3yv6769-podman-5.2.3/libexec/podman/netavarkversion: netavark 1.7.0ociRuntime:
name: crunpackage: Unknownpath: /nix/store/cygy62gmh4fqjicwg2zflyaidimfnj6q-podman-helper-binary-wrapper/bin/crunversion: |- crun version 1.18.2 commit: 1.18.2 rundir: /run/crun spec: 1.0.0 +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJLos: linuxpasta:
executable: /nix/store/60cdq9pj1y4sxn28pqb7mb5wf3yv6769-podman-5.2.3/libexec/podman/pastapackage: Unknownversion: | pasta 2024_09_06.6b38f07 Copyright Red Hat GNU General Public License, version 2 or later <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.remoteSocket:
exists: truepath: /run/podman/podman.sockrootlessNetworkCmd: pastasecurity:
apparmorEnabled: falsecapabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOTrootless: falseseccompEnabled: trueseccompProfilePath: ""selinuxEnabled: falseserviceIsRemote: falseslirp4netns:
executable: ""package: ""version: ""swapFree: 50637725696swapTotal: 50708865024uptime: 218h 31m 8.00s (Approximately 9.08 days)variant: ""plugins:
authorization: nulllog:
- k8s-file
- none
- passthrough
- journaldnetwork:
- bridge
- macvlan
- ipvlanvolume:
- localregistries:
search:
- docker.io
- quay.iostore:
configFile: /etc/containers/storage.confcontainerStore:
number: 2paused: 0running: 0stopped: 2graphDriverName: overlaygraphOptions: {}graphRoot: /var/lib/containers/storagegraphRootAllocated: 1982707269632graphRootUsed: 1479270805504graphStatus:
Backing Filesystem: btrfsNative Overlay Diff: "true"Supports d_type: "true"Supports shifting: "true"Supports volatile: "true"Using metacopy: "false"imageCopyTmpDir: /var/tmpimageStore:
number: 16runRoot: /run/containers/storagetransientStore: falsevolumePath: /var/lib/containers/storage/volumesversion:
APIVersion: 5.2.3Built: 315532800BuiltTime: Mon Dec 31 17:00:00 1979GitCommit: ""GoVersion: go1.23.3Os: linuxOsArch: linux/amd64Version: 5.2.3
Podman in a container
No
Privileged Or Rootless
Privileged
Upstream Latest Release
No
Additional environment details
Reproducible on two NixOS 24.11 servers, but they likely have very similar configurations to each other.
Additional information
I'm sure that the initial reaction to this report will be "so don't do that" -- which is fair. 👍 However I identified this issue because a tool (act-runner) was using a string name field as an alias for a container, with no reason to believe that the name would be turned into a DNS alias and cause this issue.
If this is indicated as an unsupported operation (again, would make sense), I'm happy to also report it to the tool for them to validate and/or sanitize the input. But if it's going to cause a problem with the container, I feel like podman should block it as an invalid input.
The text was updated successfully, but these errors were encountered:
Issue Description
When a
--network-alias
option to a container has a space in it, no error is thrown during container creation, but DNS resolution within the container will fail with timeouts.Steps to reproduce the issue
Steps to reproduce the issue
sudo podman run --network-alias "testtrim release" --rm -it node:current-bookworm /bin/bash
curl https://google.com/
Describe the results you received
Describe the results you expected
Either having whitespace in an alias is unsupported (which would make sense) and should cause an error; or it should be silently ignored; but either way I should not get a container where DNS resolution will fail for an unidentifiable reason.
If I remove the space from my alias, DNS resolution works:
podman info output
Podman in a container
No
Privileged Or Rootless
Privileged
Upstream Latest Release
No
Additional environment details
Reproducible on two NixOS 24.11 servers, but they likely have very similar configurations to each other.
Additional information
I'm sure that the initial reaction to this report will be "so don't do that" -- which is fair. 👍 However I identified this issue because a tool (act-runner) was using a string name field as an alias for a container, with no reason to believe that the name would be turned into a DNS alias and cause this issue.
If this is indicated as an unsupported operation (again, would make sense), I'm happy to also report it to the tool for them to validate and/or sanitize the input. But if it's going to cause a problem with the container, I feel like podman should block it as an invalid input.
The text was updated successfully, but these errors were encountered: