-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APIv2: missing NetworkSettings and failure to start a container #5580
Comments
Actually we do not care about the output compatibility with
Overall (with a couple of workarounds), Salt is able to successfully pull the container but can't start it yet If you need an easier way to reproduce the problems, I can write a simple Python script (it is hard to do using |
A friendly reminder that this issue had no activity for 30 days. |
Up |
I think you are indicating that this is still an issue. |
Yes, just want to make sure that the issue won’t be closed automatically due to inactivity |
We were discussing this a bit yesterday among the team. It's definitely on our radar, and will probably come up sooner rather than later as part of our work on the Podman HTTP API. |
@max-arnold BTW, we currently do not close issues automatically. The reminder is just a kick in the butt for us to relook at the issue. |
@max-arnold Could you try this against master to tell us if it still exists. |
Thanks for the update! Unfortunately, due to personal reasons, I’ll be able to check this only in 2-4 weeks (I’m not at home and have no laptop with me). I’ll get back to you on that as soon as I can. |
@ashley-cui Mind taking a look to see if this issue still exists? |
@rhatdan Are the 2.0.0 packages for Ubuntu delayed? I only see 1.9.3 here https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ |
Not that I know of, but these are handled manually by @lsm5 I believe. |
We had disabled autobuilds for podman until v2.0.0. I'm in the middle of building them now and I'll enable autobuilds after that. Expect to be done before noon. |
@max-arnold should be available now. |
I tried the 2.0.0 release briefly and it doesn't work with SaltStack due to an incorrect date format: #6796 On the positive side, I no longer need to patch salt for minimum expected Docker version (1.9.0), since Podman is 2.0.0 I'll try again once that issue is fixed. |
#6835
If this be merged, maybe you could try start containers to test |
A friendly reminder that this issue had no activity for 30 days. |
@ashley-cui Mind taking a look to see if this issue still exists? |
I’ll check it |
I still can't get past the incorrect date format issue. Feel free to ping me directly once it is fixed and the updated package is avaliable here: http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ |
I managed to compile Below are the results I get when creating a container in both Docker and Podman. Docker% sudo curl --unix-socket /run/docker.sock -H "Content-Type: application/json" --data '{"Tty": false, "OpenStdin": false, "StdinOnce": false, "AttachStdin": false, "AttachStdout": true, "AttachStderr": true, "Cmd": ["bash"], "Image": "ubuntu:18.04", "NetworkDisabled": false, "HostConfig": {"NetworkMode": "default", "AutoRemove": true}}' 'http://d/v1.40/containers/create?name=ubuntu'
{"Id":"8ee46ed5032c9ebbddfdca56521c4101b5d4d27ddf8b5a468533066e6f318487","Warnings":[]}
% sudo curl --unix-socket /run/docker.sock http://d/v1.35/containers/8ee46ed5032c9ebbddfdca56521c4101b5d4d27ddf8b5a468533066e6f318487/json
{
"Id":"8ee46ed5032c9ebbddfdca56521c4101b5d4d27ddf8b5a468533066e6f318487",
"Created":"2020-08-09T12:15:09.713675077Z",
"Path":"bash",
"Args":[
],
"State":{
"Status":"created",
"Running":false,
"Paused":false,
"Restarting":false,
"OOMKilled":false,
"Dead":false,
"Pid":0,
"ExitCode":0,
"Error":"",
"StartedAt":"0001-01-01T00:00:00Z",
"FinishedAt":"0001-01-01T00:00:00Z"
},
"Image":"sha256:2eb2d388e1a255c98029f40d6d7f8029fb13f1030abc8f11ccacbca686a8dc12",
"ResolvConfPath":"",
"HostnamePath":"",
"HostsPath":"",
"LogPath":"",
"Name":"/ubuntu",
"RestartCount":0,
"Driver":"overlay2",
"Platform":"linux",
"MountLabel":"",
"ProcessLabel":"",
"AppArmorProfile":"",
"ExecIDs":null,
"HostConfig":{
"Binds":null,
"ContainerIDFile":"",
"LogConfig":{
"Type":"json-file",
"Config":{
}
},
"NetworkMode":"default",
"PortBindings":null,
"RestartPolicy":{
"Name":"",
"MaximumRetryCount":0
},
"AutoRemove":true,
"VolumeDriver":"",
"VolumesFrom":null,
"CapAdd":null,
"CapDrop":null,
"Capabilities":null,
"Dns":null,
"DnsOptions":null,
"DnsSearch":null,
"ExtraHosts":null,
"GroupAdd":null,
"IpcMode":"private",
"Cgroup":"",
"Links":null,
"OomScoreAdj":0,
"PidMode":"",
"Privileged":false,
"PublishAllPorts":false,
"ReadonlyRootfs":false,
"SecurityOpt":null,
"UTSMode":"",
"UsernsMode":"",
"ShmSize":67108864,
"Runtime":"runc",
"ConsoleSize":[
0,
0
],
"Isolation":"",
"CpuShares":0,
"Memory":0,
"NanoCpus":0,
"CgroupParent":"",
"BlkioWeight":0,
"BlkioWeightDevice":null,
"BlkioDeviceReadBps":null,
"BlkioDeviceWriteBps":null,
"BlkioDeviceReadIOps":null,
"BlkioDeviceWriteIOps":null,
"CpuPeriod":0,
"CpuQuota":0,
"CpuRealtimePeriod":0,
"CpuRealtimeRuntime":0,
"CpusetCpus":"",
"CpusetMems":"",
"Devices":null,
"DeviceCgroupRules":null,
"DeviceRequests":null,
"KernelMemory":0,
"KernelMemoryTCP":0,
"MemoryReservation":0,
"MemorySwap":0,
"MemorySwappiness":null,
"OomKillDisable":false,
"PidsLimit":null,
"Ulimits":null,
"CpuCount":0,
"CpuPercent":0,
"IOMaximumIOps":0,
"IOMaximumBandwidth":0,
"MaskedPaths":[
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware"
],
"ReadonlyPaths":[
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"GraphDriver":{
"Data":{
"LowerDir":"/var/lib/docker/overlay2/dbd34c269fc293d1287830eecd155ff1364560d9aa09b59fd8bdf8172e4c0e31-init/diff:/var/lib/docker/overlay2/c5d154fbe09727d00303094bc5ca68c8bed5c8ad281b7ea580cb5a30a1ad8466/diff:/var/lib/docker/overlay2/1f1b314fff38b0c46a397178603e626fea2dabae88cd9d6af43c432139db33d5/diff:/var/lib/docker/overlay2/fa4568c371e4832c41f7c787b9a9aa3305de9ccaa2296eecbb283280a87f6fe6/diff:/var/lib/docker/overlay2/2a79fa161523805f6c896ce24deb5a91dbe914798ac672cf7f5389ae31336d4f/diff",
"MergedDir":"/var/lib/docker/overlay2/dbd34c269fc293d1287830eecd155ff1364560d9aa09b59fd8bdf8172e4c0e31/merged",
"UpperDir":"/var/lib/docker/overlay2/dbd34c269fc293d1287830eecd155ff1364560d9aa09b59fd8bdf8172e4c0e31/diff",
"WorkDir":"/var/lib/docker/overlay2/dbd34c269fc293d1287830eecd155ff1364560d9aa09b59fd8bdf8172e4c0e31/work"
},
"Name":"overlay2"
},
"Mounts":[
],
"Config":{
"Hostname":"8ee46ed5032c",
"Domainname":"",
"User":"",
"AttachStdin":false,
"AttachStdout":true,
"AttachStderr":true,
"Tty":false,
"OpenStdin":false,
"StdinOnce":false,
"Env":[
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd":[
"bash"
],
"Image":"ubuntu:18.04",
"Volumes":null,
"WorkingDir":"",
"Entrypoint":null,
"OnBuild":null,
"Labels":{
}
},
"NetworkSettings":{
"Bridge":"",
"SandboxID":"",
"HairpinMode":false,
"LinkLocalIPv6Address":"",
"LinkLocalIPv6PrefixLen":0,
"Ports":{
},
"SandboxKey":"",
"SecondaryIPAddresses":null,
"SecondaryIPv6Addresses":null,
"EndpointID":"",
"Gateway":"",
"GlobalIPv6Address":"",
"GlobalIPv6PrefixLen":0,
"IPAddress":"",
"IPPrefixLen":0,
"IPv6Gateway":"",
"MacAddress":"",
"Networks":{
"bridge":{
"IPAMConfig":null,
"Links":null,
"Aliases":null,
"NetworkID":"",
"EndpointID":"",
"Gateway":"",
"IPAddress":"",
"IPPrefixLen":0,
"IPv6Gateway":"",
"GlobalIPv6Address":"",
"GlobalIPv6PrefixLen":0,
"MacAddress":"",
"DriverOpts":null
}
}
}
} Podman% sudo curl --unix-socket /run/podman/podman.sock -H "Content-Type: application/json" --data '{"Tty": false, "OpenStdin": false, "StdinOnce": false, "AttachStdin": false, "AttachStdout": true, "AttachStderr": true, "Cmd": ["bash"], "Image": "ubuntu:18.04", "NetworkDisabled": false, "HostConfig": {"NetworkMode": "default", "AutoRemove": true}}' 'http://d/v1.40/containers/create?name=ubuntu'
{"Id":"a565948e2b6177d01d32d7cf02bf6347fd92a17bc05790690bd24d7ba695751a","Warnings":[]}
% sudo curl --unix-socket /run/podman/podman.sock http://d/v1.35/containers/a565948e2b6177d01d32d7cf02bf6347fd92a17bc05790690bd24d7ba695751a/json
{
"Id":"a565948e2b6177d01d32d7cf02bf6347fd92a17bc05790690bd24d7ba695751a",
"Created":"2020-08-09 05:11:47.969774599 -0700 PDT",
"Path":"",
"Args":null,
"State":{
"Status":"configured",
"Running":false,
"Paused":false,
"Restarting":false,
"OOMKilled":false,
"Dead":false,
"Pid":0,
"ExitCode":0,
"Error":"",
"StartedAt":"0001-01-01T00:00:00Z",
"FinishedAt":"0001-01-01T00:00:00Z"
},
"Image":"ubuntu:18.04",
"ResolvConfPath":"",
"HostnamePath":"",
"HostsPath":"",
"LogPath":"/var/lib/containers/storage/overlay-containers/a565948e2b6177d01d32d7cf02bf6347fd92a17bc05790690bd24d7ba695751a/userdata/ctr.log",
"Name":"/ubuntu",
"RestartCount":0,
"Driver":"overlay",
"Platform":"linux",
"MountLabel":"",
"ProcessLabel":"",
"AppArmorProfile":"",
"ExecIDs":[
],
"HostConfig":{
"Binds":[
],
"ContainerIDFile":"",
"LogConfig":{
"Type":"",
"Config":null
},
"NetworkMode":"",
"PortBindings":{
},
"RestartPolicy":{
"Name":"",
"MaximumRetryCount":0
},
"AutoRemove":true,
"VolumeDriver":"",
"VolumesFrom":null,
"CapAdd":[
],
"CapDrop":[
],
"Capabilities":null,
"CgroupnsMode":"",
"Dns":[
],
"DnsOptions":[
],
"DnsSearch":[
],
"ExtraHosts":[
],
"GroupAdd":[
],
"IpcMode":"private",
"Cgroup":"",
"Links":null,
"OomScoreAdj":0,
"PidMode":"private",
"Privileged":false,
"PublishAllPorts":false,
"ReadonlyRootfs":false,
"SecurityOpt":[
],
"UTSMode":"private",
"UsernsMode":"",
"ShmSize":0,
"Runtime":"oci",
"ConsoleSize":[
0,
0
],
"Isolation":"",
"CpuShares":0,
"Memory":0,
"NanoCpus":0,
"CgroupParent":"",
"BlkioWeight":0,
"BlkioWeightDevice":null,
"BlkioDeviceReadBps":null,
"BlkioDeviceWriteBps":null,
"BlkioDeviceReadIOps":null,
"BlkioDeviceWriteIOps":null,
"CpuPeriod":0,
"CpuQuota":0,
"CpuRealtimePeriod":0,
"CpuRealtimeRuntime":0,
"CpusetCpus":"",
"CpusetMems":"",
"Devices":[
],
"DeviceCgroupRules":null,
"DeviceRequests":null,
"KernelMemory":0,
"KernelMemoryTCP":0,
"MemoryReservation":0,
"MemorySwap":0,
"MemorySwappiness":0,
"OomKillDisable":false,
"PidsLimit":0,
"Ulimits":[
{
"Name":"RLIMIT_NOFILE",
"Hard":1048576,
"Soft":1048576
},
{
"Name":"RLIMIT_NPROC",
"Hard":4194304,
"Soft":4194304
}
],
"CpuCount":0,
"CpuPercent":0,
"IOMaximumIOps":0,
"IOMaximumBandwidth":0,
"MaskedPaths":null,
"ReadonlyPaths":null
},
"GraphDriver":{
"Data":{
"LowerDir":"/var/lib/containers/storage/overlay/802cad39c47beadbe4c98febc97d1c1b878718513bd5d8872e8590685910fe40/diff:/var/lib/containers/storage/overlay/429ac67f5820c7cf30c1966115900b18607ee53772918d113fd7613bd7eaf861/diff:/var/lib/containers/storage/overlay/8a1f2c24e0215398919ade6736616c413010aedef99dead4a06de6c18c3fa69a/diff:/var/lib/containers/storage/overlay/7ef3687765828a9cb2645925f27febbac21a5adece69e8437c26184a897b6ec7/diff",
"UpperDir":"/var/lib/containers/storage/overlay/d0afacaf914f3df42da116f32bb162757d3e4547a0e180628e9d7180c8d84c38/diff",
"WorkDir":"/var/lib/containers/storage/overlay/d0afacaf914f3df42da116f32bb162757d3e4547a0e180628e9d7180c8d84c38/work"
},
"Name":"overlay"
},
"SizeRootFs":0,
"Mounts":[
],
"Config":{
"Hostname":"a565948e2b61",
"Domainname":"",
"User":"",
"AttachStdin":false,
"AttachStdout":false,
"AttachStderr":false,
"Tty":false,
"OpenStdin":false,
"StdinOnce":false,
"Env":[
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"TERM=xterm",
"HOSTNAME=",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"TERM=xterm"
],
"Cmd":[
"bash"
],
"Image":"ubuntu:18.04",
"Volumes":null,
"WorkingDir":"/",
"Entrypoint":[
],
"OnBuild":null,
"Labels":{
},
"StopSignal":"\u000f",
"StopTimeout":10
},
"NetworkSettings":{
"Bridge":"",
"SandboxID":"",
"HairpinMode":false,
"LinkLocalIPv6Address":"",
"LinkLocalIPv6PrefixLen":0,
"Ports":{
},
"SandboxKey":"",
"SecondaryIPAddresses":null,
"SecondaryIPv6Addresses":null,
"EndpointID":"",
"Gateway":"",
"GlobalIPv6Address":"",
"GlobalIPv6PrefixLen":0,
"IPAddress":"",
"IPPrefixLen":0,
"IPv6Gateway":"",
"MacAddress":"",
"Networks":null
}
} The key network configuration differences are highlighted in the followind diff: --- docker.json 2020-08-09 19:26:24.000000000 +0700
+++ podman.json 2020-08-09 19:26:39.000000000 +0700
@@ -1,39 +1,23 @@
"NetworkSettings":{
"Bridge":"",
"SandboxID":"",
"HairpinMode":false,
"LinkLocalIPv6Address":"",
"LinkLocalIPv6PrefixLen":0,
"Ports":{
},
"SandboxKey":"",
"SecondaryIPAddresses":null,
"SecondaryIPv6Addresses":null,
"EndpointID":"",
"Gateway":"",
"GlobalIPv6Address":"",
"GlobalIPv6PrefixLen":0,
"IPAddress":"",
"IPPrefixLen":0,
"IPv6Gateway":"",
"MacAddress":"",
- "Networks":{
- "bridge":{
- "IPAMConfig":null,
- "Links":null,
- "Aliases":null,
- "NetworkID":"",
- "EndpointID":"",
- "Gateway":"",
- "IPAddress":"",
- "IPPrefixLen":0,
- "IPv6Gateway":"",
- "GlobalIPv6Address":"",
- "GlobalIPv6PrefixLen":0,
- "MacAddress":"",
- "DriverOpts":null
- }
- }
+ "Networks":null
}
} SaltStack just fails to introspect the A quick scan of the Docker API shows that
|
@zhangguanzhang The |
@max-arnold @zhangguanzhang Does this mean we can close this issue? |
@rhatdan The main issue (missing |
I could not find a matching PR and testing with the current HEAD/2.2.0-rc1 still yields the
|
@max-arnold @rsommer @baude is this fixed in the main branch now? |
it is not ... but i can fix this. i need info from @mheon . @mheon what are you excluding the default network from inspect? podman/libpod/networking_linux.go Line 957 in 4fa1fce
|
This matches Docker behaviour - network structs are only included if and only if they were explicitly requested by the user (otherwise, the network information is included in the base network info struct). The default network was not added by a user, so we don't generate a network struct for it. |
@mheon, the problem is that it is organized differently for docker too. there is no general network settings with network underneath it. just networks ... which does include the default. ill cobble a pr to see if we can do this. |
eh, this is more difficult. will need to discuss when we are back to work. |
A friendly reminder that this issue had no activity for 30 days. |
@baude Reminder this is something we might need? |
I think #9109 may actually fix this? |
I don't think I'm fixing compat inspect, though |
Though, this pre-dates APIv2, so we can probably close this one after #9109 merges |
well, i want to see your pr get in ... from there i can see what is and isnt |
@max-arnold are you in a position to try the latest code in the master branch and indicate if there is still a problem? extra credit if you can get onto freenode #podman and hit me up when you do the test. |
I’ll take a look |
Did another round of testing. Here is a json response diff between podman and docker:
diff -u podman.json docker.json--- podman.json 2021-02-04 12:51:01.000000000 +0700
+++ docker.json 2021-02-04 12:51:17.000000000 +0700
@@ -1,10 +1,8 @@
{
- "Id": "5d30a00aa13ee9335cf7d1b7bf6f983364ad1f78ed9f6de3711c3e33f4d3e832",
- "Created": "2021-02-03T21:42:38.14509732-08:00",
+ "Id": "847867ecd11546f048c3145ac6fd869ee2b0dc8098c17e53ac3d0c01013edc66",
+ "Created": "2021-02-04T05:45:52.423553663Z",
"Path": "bash",
- "Args": [
- "bash"
- ],
+ "Args": [],
"State": {
"Status": "created",
"Running": false,
@@ -18,28 +16,28 @@
"StartedAt": "0001-01-01T00:00:00Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
- "Image": "docker.io/library/ubuntu:18.04",
+ "Image": "sha256:c090eaba6b9480dcd1daf063e4efe271711745c21a73c53bdc94c8d9610d2fd9",
"ResolvConfPath": "",
"HostnamePath": "",
"HostsPath": "",
- "LogPath": "/var/lib/containers/storage/overlay-containers/5d30a00aa13ee9335cf7d1b7bf6f983364ad1f78ed9f6de3711c3e33f4d3e832/userdata/ctr.log",
+ "LogPath": "",
"Name": "/ubuntu",
"RestartCount": 0,
- "Driver": "overlay",
+ "Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
- "AppArmorProfile": "containers-default-0.33.1",
- "ExecIDs": [],
+ "AppArmorProfile": "",
+ "ExecIDs": null,
"HostConfig": {
- "Binds": [],
+ "Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
- "Config": null
+ "Config": {}
},
- "NetworkMode": "bridge",
- "PortBindings": {},
+ "NetworkMode": "default",
+ "PortBindings": null,
"RestartPolicy": {
"Name": "",
"MaximumRetryCount": 0
@@ -47,27 +45,27 @@
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
- "CapAdd": [],
- "CapDrop": [],
- "CgroupnsMode": "",
- "Dns": [],
- "DnsOptions": [],
- "DnsSearch": [],
- "ExtraHosts": [],
- "GroupAdd": [],
+ "CapAdd": null,
+ "CapDrop": null,
+ "CgroupnsMode": "host",
+ "Dns": null,
+ "DnsOptions": null,
+ "DnsSearch": null,
+ "ExtraHosts": null,
+ "GroupAdd": null,
"IpcMode": "private",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
- "PidMode": "private",
+ "PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
- "SecurityOpt": [],
- "UTSMode": "private",
+ "SecurityOpt": null,
+ "UTSMode": "",
"UsernsMode": "",
- "ShmSize": 65536000,
- "Runtime": "oci",
+ "ShmSize": 67108864,
+ "Runtime": "runc",
"ConsoleSize": [
0,
0
@@ -89,71 +87,73 @@
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
- "Devices": [],
+ "Devices": null,
"DeviceCgroupRules": null,
"DeviceRequests": null,
"KernelMemory": 0,
"KernelMemoryTCP": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
- "MemorySwappiness": 0,
+ "MemorySwappiness": null,
"OomKillDisable": false,
- "PidsLimit": 2048,
- "Ulimits": [
- {
- "Name": "RLIMIT_NOFILE",
- "Hard": 1048576,
- "Soft": 1048576
- },
- {
- "Name": "RLIMIT_NPROC",
- "Hard": 4194304,
- "Soft": 4194304
- }
- ],
+ "PidsLimit": null,
+ "Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
- "MaskedPaths": null,
- "ReadonlyPaths": null
+ "MaskedPaths": [
+ "/proc/asound",
+ "/proc/acpi",
+ "/proc/kcore",
+ "/proc/keys",
+ "/proc/latency_stats",
+ "/proc/timer_list",
+ "/proc/timer_stats",
+ "/proc/sched_debug",
+ "/proc/scsi",
+ "/sys/firmware"
+ ],
+ "ReadonlyPaths": [
+ "/proc/bus",
+ "/proc/fs",
+ "/proc/irq",
+ "/proc/sys",
+ "/proc/sysrq-trigger"
+ ]
},
"GraphDriver": {
"Data": {
- "LowerDir": "/var/lib/containers/storage/overlay/b4348bfd84050f05a39ebe017b137d3bde5ce307cc5dd819495c4f362587c4e3/diff:/var/lib/containers/storage/overlay/9dd0b45ebe39e477b2a869802e9b771d991f7341cb79e3446c9ca8231fc35d3f/diff:/var/lib/containers/storage/overlay/c95d2191d7773c6e29188f92922bc9547e1f0b6130e85dfc2f5e4eae13137c7c/diff",
- "UpperDir": "/var/lib/containers/storage/overlay/3f8be611c10079bf6284c1c8d8e30ffff7dea7bfd2026cd8220e58b2856932a2/diff",
- "WorkDir": "/var/lib/containers/storage/overlay/3f8be611c10079bf6284c1c8d8e30ffff7dea7bfd2026cd8220e58b2856932a2/work"
+ "LowerDir": "/var/lib/docker/overlay2/45722d27de80b9cb28e6efe7d84711a2e197a4c9e0127bb6afc150f53902a2d3-init/diff:/var/lib/docker/overlay2/bf8a4fa8f68f9e1843e1b1cdce1a62aad8ddcdef43ad860aaaedbe3e292041d5/diff:/var/lib/docker/overlay2/56a4d0bfdfc12c7842ff5a7df19a130189d9d2a8d0b8ef4bcdfc2ea2aa74722a/diff:/var/lib/docker/overlay2/8bb4e26228489ed028c33618f945b0eeb07b3e543a55067b23568f47fb3646fa/diff",
+ "MergedDir": "/var/lib/docker/overlay2/45722d27de80b9cb28e6efe7d84711a2e197a4c9e0127bb6afc150f53902a2d3/merged",
+ "UpperDir": "/var/lib/docker/overlay2/45722d27de80b9cb28e6efe7d84711a2e197a4c9e0127bb6afc150f53902a2d3/diff",
+ "WorkDir": "/var/lib/docker/overlay2/45722d27de80b9cb28e6efe7d84711a2e197a4c9e0127bb6afc150f53902a2d3/work"
},
- "Name": "overlay"
+ "Name": "overlay2"
},
- "SizeRootFs": 0,
"Mounts": [],
"Config": {
- "Hostname": "5d30a00aa13e",
+ "Hostname": "847867ecd115",
"Domainname": "",
"User": "",
"AttachStdin": false,
- "AttachStdout": false,
- "AttachStderr": false,
+ "AttachStdout": true,
+ "AttachStderr": true,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
- "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
- "TERM=xterm",
- "container=podman"
+ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"bash"
],
"Image": "docker.io/library/ubuntu:18.04",
"Volumes": null,
- "WorkingDir": "/",
- "Entrypoint": [],
+ "WorkingDir": "",
+ "Entrypoint": null,
"OnBuild": null,
- "Labels": {},
- "StopSignal": "15",
- "StopTimeout": 0
+ "Labels": {}
},
"NetworkSettings": {
"Bridge": "",
@@ -174,11 +174,11 @@
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
- "default": {
+ "bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
- "NetworkID": "default",
+ "NetworkID": "",
"EndpointID": "",
"Gateway": "",
"IPAddress": "", The NetworkSettings part (at the end of the diff) is almost identical, and that is good! Then Salt tries to start the container:
And this is the response: {
"cause": "CNI network \"default\" not found",
"message": "error configuring network namespace for container 5d30a00aa13ee9335cf7d1b7bf6f983364ad1f78ed9f6de3711c3e33f4d3e832: CNI network \"default\" not found",
"response": 500
} libpod: 4e1bcf3 I'll ping you on the IRC soon. |
I suspect this issue is because the default network for docker is actually called default and on podman it is called podman. If you want the default network, you could try not sending it (to Podman) |
@baude I'm fairly certain |
We patched this elsewhere (I remember Dan working on the PR for it) |
According to the diff, the default network for docker is called --- podman.json 2021-02-04 12:51:01.000000000 +0700
+++ docker.json 2021-02-04 12:51:17.000000000 +0700
@@ -174,11 +174,11 @@
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
- "default": {
+ "bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
- "NetworkID": "default",
+ "NetworkID": "",
"EndpointID": "",
"Gateway": "",
"IPAddress": "", This is the whole API exchange between Salt and Podman:
I did a little bit of digging to see where the The Docker API documentation contains the following text:
However, there is a To summarize:
This difference is also visible in the json response diff above. |
I did a little bit more digging, and while Salt can't pass an empty NetworkMode (because of the default fallback value in
This avoids the 500 error when starting the container:
And finally:
So I can call it a success! 🎉 |
if you good, mind closing this? |
/kind bug
Iteration 2 of my APIv2 &
docker-py
compatibility tests (see #5553 for the first one).1. I still had to patch the expected minimal version (from 1.9.0 to 1.8.0).
However, problems (2) and (3) from #5553 are fixed!
2. Attempt to run a container failed due to Salt code that expects
NetworkSettings
->Networks
to be a non-empty dictionaryNetwork settings:
Docker
Podman
The data structures look quite different.
Below is the difference between API responses from Docker (
19.03.8
) and Podman (note the<--
comments):Docker
Podman
3. And finally (after I patched Salt to not crash on (2)), the container fails to start with
OCI runtime error
Docker
Output of
podman version
:Output of
podman info --debug
:podman info --debug
The text was updated successfully, but these errors were encountered: