Skip to content
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

Docker doesn't work with GNS3 VM 1.5.4 #1994

Closed
ghost opened this issue Apr 20, 2017 · 11 comments
Closed

Docker doesn't work with GNS3 VM 1.5.4 #1994

ghost opened this issue Apr 20, 2017 · 11 comments
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Apr 20, 2017

GNS3 version 1.5.4 on Darwin (64-bit) with Python 3.5.2 Qt 5.6.0, official GNS3 VM 1.5.4

The OS X version and the GNS3 VM freshly downloaded and configured. Only the GNS3 VM (in VMware Fusion) and an alpine docker VM is configured.

Then I created a project and added an alpine VM. Starting the alpine VM works, but a few seconds it automatically stops. Running the docker alpine VM from the command line of the GNS3 VM works.

The server logs (with debug):

2017-04-20 11:19:10 INFO response.py:48 GET /v1/version
2017-04-20 11:19:10 DEBUG response.py:49 {'Accept-Language': 'de-DE,en,*', 'Content-Length': '2', 'Host': '172.20.1.130:3080', 'Content-Type': 'application/json', 'User-Agent': 'GNS3 QT Client v1.5.4', 'Connection': 'Keep-Alive', 'Accept-Encoding': 'gzip, deflate'}
2017-04-20 11:19:10 DEBUG response.py:51 {}
2017-04-20 11:19:10 INFO response.py:52 Response: 200 OK
2017-04-20 11:19:10 DEBUG response.py:53 {'Content-Length': '46', 'Content-Type': 'application/json', 'X-Route': '/v1/version', 'Server': 'Python/3.4 GNS3/1.5.4', 'Access-Control-Allow-Origin': '*'}
2017-04-20 11:19:10 DEBUG response.py:55 {'local': False, 'version': '1.5.4'}
2017-04-20 11:19:10 INFO helpers.py:454 172.20.1.1 - - [20/Apr/2017:11:19:10 +0000] "GET /v1/version HTTP/1.1" 200 46 "-" "GNS3 QT Client v1.5.4"
2017-04-20 11:19:10 INFO project.py:84 Project 62d381b4-178f-4c90-8d75-55b6ea26ce95 with path '/opt/gns3/projects/62d381b4-178f-4c90-8d75-55b6ea26ce95' created
2017-04-20 11:19:10 INFO response.py:48 POST /v1/projects
2017-04-20 11:19:10 DEBUG response.py:49 {'Accept-Language': 'de-DE,en,*', 'Content-Length': '60', 'Host': '172.20.1.130:3080', 'Content-Type': 'application/json', 'User-Agent': 'GNS3 QT Client v1.5.4', 'Connection': 'Keep-Alive', 'Accept-Encoding': 'gzip, deflate'}
2017-04-20 11:19:10 DEBUG response.py:51 {'temporary': False, 'name': 'untitled', 'project_id': None}
2017-04-20 11:19:10 INFO response.py:52 Response: 201 Created
2017-04-20 11:19:10 DEBUG response.py:53 {'Content-Length': '217', 'Content-Type': 'application/json', 'X-Route': '/v1/projects', 'Server': 'Python/3.4 GNS3/1.5.4', 'Access-Control-Allow-Origin': '*'}
2017-04-20 11:19:10 DEBUG response.py:55 {'name': 'untitled', 'location': '/opt/gns3/projects', 'temporary': False, 'project_id': '62d381b4-178f-4c90-8d75-55b6ea26ce95', 'path': '/opt/gns3/projects/62d381b4-178f-4c90-8d75-55b6ea26ce95'}
2017-04-20 11:19:10 INFO helpers.py:454 172.20.1.1 - - [20/Apr/2017:11:19:10 +0000] "POST /v1/projects HTTP/1.1" 201 217 "-" "GNS3 QT Client v1.5.4"
2017-04-20 11:19:10 DEBUG port_manager.py:210 TCP port 5000 has been allocated
2017-04-20 11:19:10 DEBUG port_manager.py:210 TCP port 5001 has been allocated
2017-04-20 11:19:10 DEBUG base_vm.py:92 Docker: alpine-1 [cc4782e2-afb5-42f9-ab17-3032b87d94bd] initialized. Console port 5000
2017-04-20 11:19:10 INFO docker_vm.py:784 Docker container "alpine-1" [cc4782e2-afb5-42f9-ab17-3032b87d94bd]: number of Ethernet adapters changed to 1
2017-04-20 11:19:10 DEBUG docker_vm.py:95 Docker: alpine-1 [alpine:latest] initialized.
2017-04-20 11:19:10 DEBUG __init__.py:92 Query Docker GET version params={} data={} Response: {'KernelVersion': '4.4.0-31-generic', 'ApiVersion': '1.28', 'MinAPIVersion': '1.12', 'Version': '17.04.0-ce', 'Arch': 'amd64', 'BuildTime': '2017-04-03T18:01:08.495500006+00:00', 'Os': 'linux', 'GitCommit': '4845c56', 'GoVersion': 'go1.7.5'}
2017-04-20 11:19:10 DEBUG __init__.py:92 Query Docker GET images/alpine:latest/json params={} data={} Response: {'DockerVersion': '1.12.6', 'ContainerConfig': {'StdinOnce': False, 'AttachStdin': False, 'Labels': None, 'Volumes': None, 'WorkingDir': '', 'Hostname': '84baa8e89c00', 'AttachStdout': False, 'Env': ['PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'], 'Tty': False, 'Cmd': ['/bin/sh', '-c', '#(nop) ADD file:730030a984f5f0c5dc9b15ab61da161082b5c0f6e112a9c921b42321140c3927 in / '], 'Entrypoint': None, 'OpenStdin': False, 'User': '', 'AttachStderr': False, 'Domainname': '', 'OnBuild': None, 'Image': ''}, 'Author': '', 'Size': 3987495, 'Container': '84baa8e89c006369728bc59e4f86884ed32a916067c3e26d284de6e7fd730b49', 'Config': {'StdinOnce': False, 'AttachStdin': False, 'Labels': None, 'Volumes': None, 'WorkingDir': '', 'Hostname': '84baa8e89c00', 'AttachStdout': False, 'Env': ['PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'], 'Tty': False, 'Cmd': None, 'Entrypoint': None, 'OpenStdin': False, 'User': '', 'AttachStderr': False, 'Domainname': '', 'OnBuild': None, 'Image': ''}, 'GraphDriver': {'Data': {'UpperDir': '/var/lib/docker/overlay2/4d0cf72d45a2a5af5ad52a2878cbbf4221cc2db015c7cb7e94fa120260095ee8/diff', 'WorkDir': '/var/lib/docker/overlay2/4d0cf72d45a2a5af5ad52a2878cbbf4221cc2db015c7cb7e94fa120260095ee8/work', 'MergedDir': '/var/lib/docker/overlay2/4d0cf72d45a2a5af5ad52a2878cbbf4221cc2db015c7cb7e94fa120260095ee8/merged'}, 'Name': 'overlay2'}, 'Id': 'sha256:4a415e3663882fbc554ee830889c68a33b3585503892cc718a4698e91ef2a526', 'Architecture': 'amd64', 'Created': '2017-03-03T20:32:37.723773456Z', 'Parent': '', 'RepoTags': ['alpine:latest'], 'RepoDigests': ['alpine@sha256:58e1a1bb75db1b5a24a462dd5e2915277ea06438c3f105138f97eb53149673c4'], 'VirtualSize': 3987495, 'RootFS': {'Type': 'layers', 'Layers': ['sha256:23b9c7b43573dd164619ad59e9d51eda4095926729f59d5f22803bcbe9ab24c2']}, 'Comment': '', 'Os': 'linux'}
2017-04-20 11:19:10 DEBUG __init__.py:92 Query Docker POST containers/create params={} data={'Name': 'alpine-1', 'StdinOnce': False, 'Volumes': {}, 'Hostname': 'alpine-1', 'Env': ['container=docker', 'GNS3_MAX_ETHERNET=eth0', 'GNS3_VOLUMES=/etc/network'], 'Tty': True, 'Cmd': ['/bin/sh'], 'Entrypoint': ['/gns3/init.sh'], 'NetworkDisabled': True, 'HostConfig': {'CapAdd': ['ALL'], 'Privileged': True, 'Binds': ['/usr/local/lib/python3.4/dist-packages/gns3server/modules/docker/resources:/gns3:ro', '/opt/gns3/projects/62d381b4-178f-4c90-8d75-55b6ea26ce95/project-files/docker/cc4782e2-afb5-42f9-ab17-3032b87d94bd/etc/network:/gns3volumes/etc/network:rw']}, 'OpenStdin': True, 'Image': 'alpine:latest'} Response: {'Warnings': None, 'Id': '5db4aba490c2545c3ae802d26888280e4d0fc52ee8ff3b6dbad26844df4ca015'}
2017-04-20 11:19:10 INFO docker_vm.py:313 Docker container 'alpine-1' [cc4782e2-afb5-42f9-ab17-3032b87d94bd] created
2017-04-20 11:19:10 INFO response.py:48 POST /v1/projects/62d381b4-178f-4c90-8d75-55b6ea26ce95/docker/vms
2017-04-20 11:19:10 DEBUG response.py:49 {'Accept-Language': 'de-DE,en,*', 'Content-Length': '165', 'Host': '172.20.1.130:3080', 'Content-Type': 'application/json', 'User-Agent': 'GNS3 QT Client v1.5.4', 'Connection': 'Keep-Alive', 'Accept-Encoding': 'gzip, deflate'}
2017-04-20 11:19:10 DEBUG response.py:51 {'adapters': 1, 'console_resolution': '1024x768', 'console_http_port': 80, 'console_type': 'telnet', 'console_http_path': '/'}
2017-04-20 11:19:10 INFO response.py:52 Response: 201 Created
2017-04-20 11:19:10 DEBUG response.py:53 {'Content-Length': '628', 'Content-Type': 'application/json', 'X-Route': '/v1/projects/{project_id}/docker/vms', 'Server': 'Python/3.4 GNS3/1.5.4', 'Access-Control-Allow-Origin': '*'}
2017-04-20 11:19:10 DEBUG response.py:55 {'image': 'alpine:latest', 'aux': 5001, 'console_resolution': '1024x768', 'console': 5000, 'container_id': '5db4aba490c2545c3ae802d26888280e4d0fc52ee8ff3b6dbad26844df4ca015', 'environment': None, 'vm_id': 'cc4782e2-afb5-42f9-ab17-3032b87d94bd', 'console_type': 'telnet', 'console_http_path': '/', 'adapters': 1, 'start_command': None, 'console_http_port': 80, 'vm_directory': '/opt/gns3/projects/62d381b4-178f-4c90-8d75-55b6ea26ce95/project-files/docker/cc4782e2-afb5-42f9-ab17-3032b87d94bd', 'name': 'alpine-1', 'project_id': '62d381b4-178f-4c90-8d75-55b6ea26ce95'}
2017-04-20 11:19:10 INFO helpers.py:454 172.20.1.1 - - [20/Apr/2017:11:19:10 +0000] "POST /v1/projects/62d381b4-178f-4c90-8d75-55b6ea26ce95/docker/vms HTTP/1.1" 201 628 "-" "GNS3 QT Client v1.5.4"
2017-04-20 11:19:14 DEBUG __init__.py:92 Query Docker GET containers/5db4aba490c2545c3ae802d26888280e4d0fc52ee8ff3b6dbad26844df4ca015/json params={} data={} Response: {'State': {'Paused': False, 'Restarting': False, 'Error': '', 'StartedAt': '0001-01-01T00:00:00Z', 'Status': 'created', 'ExitCode': 0, 'Dead': False, 'FinishedAt': '0001-01-01T00:00:00Z', 'Pid': 0, 'Running': False, 'OOMKilled': False}, 'Created': '2017-04-20T11:19:10.898276824Z', 'Image': 'sha256:4a415e3663882fbc554ee830889c68a33b3585503892cc718a4698e91ef2a526', 'HostsPath': '', 'Id': '5db4aba490c2545c3ae802d26888280e4d0fc52ee8ff3b6dbad26844df4ca015', 'Path': '/gns3/init.sh', 'ExecIDs': None, 'Args': ['/bin/sh'], 'MountLabel': '', 'NetworkSettings': {'IPv6Gateway': '', 'EndpointID': '', 'MacAddress': '', 'Networks': {}, 'HairpinMode': False, 'Gateway': '', 'SecondaryIPAddresses': None, 'GlobalIPv6Address': '', 'Bridge': '', 'LinkLocalIPv6PrefixLen': 0, 'IPAddress': '', 'SandboxKey': '', 'IPPrefixLen': 0, 'GlobalIPv6PrefixLen': 0, 'SandboxID': '', 'LinkLocalIPv6Address': '', 'SecondaryIPv6Addresses': None, 'Ports': {}}, 'AppArmorProfile': '', 'Name': '/hungry_boyd', 'HostnamePath': '', 'Config': {'StdinOnce': False, 'AttachStdin': False, 'Labels': {}, 'Volumes': None, 'WorkingDir': '', 'Hostname': 'alpine-1', 'AttachStdout': False, 'Env': ['container=docker', 'GNS3_MAX_ETHERNET=eth0', 'GNS3_VOLUMES=/etc/network', 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'], 'Tty': True, 'Cmd': ['/bin/sh'], 'Entrypoint': ['/gns3/init.sh'], 'OpenStdin': True, 'NetworkDisabled': True, 'User': '', 'AttachStderr': False, 'Domainname': '', 'OnBuild': None, 'Image': 'alpine:latest'}, 'ResolvConfPath': '', 'ProcessLabel': '', 'GraphDriver': {'Data': {'LowerDir': '/var/lib/docker/overlay2/0e5100661f63062f8d306684c47db4143ff8fe960055334a30d3525cce4d2ddd-init/diff:/var/lib/docker/overlay2/4d0cf72d45a2a5af5ad52a2878cbbf4221cc2db015c7cb7e94fa120260095ee8/diff', 'UpperDir': '/var/lib/docker/overlay2/0e5100661f63062f8d306684c47db4143ff8fe960055334a30d3525cce4d2ddd/diff', 'MergedDir': '/var/lib/docker/overlay2/0e5100661f63062f8d306684c47db4143ff8fe960055334a30d3525cce4d2ddd/merged', 'WorkDir': '/var/lib/docker/overlay2/0e5100661f63062f8d306684c47db4143ff8fe960055334a30d3525cce4d2ddd/work'}, 'Name': 'overlay2'}, 'HostConfig': {'LogConfig': {'Config': {}, 'Type': 'json-file'}, 'IpcMode': '', 'IOMaximumBandwidth': 0, 'Dns': None, 'OomKillDisable': False, 'Binds': ['/usr/local/lib/python3.4/dist-packages/gns3server/modules/docker/resources:/gns3:ro', '/opt/gns3/projects/62d381b4-178f-4c90-8d75-55b6ea26ce95/project-files/docker/cc4782e2-afb5-42f9-ab17-3032b87d94bd/etc/network:/gns3volumes/etc/network:rw'], 'CpuRealtimeRuntime': 0, 'CpusetMems': '', 'CapAdd': ['ALL'], 'DnsSearch': None, 'Ulimits': None, 'SecurityOpt': ['label=disable'], 'MemoryReservation': 0, 'BlkioWeightDevice': None, 'CapDrop': None, 'RestartPolicy': {'Name': '', 'MaximumRetryCount': 0}, 'OomScoreAdj': 0, 'CpuCount': 0, 'DnsOptions': None, 'DeviceCgroupRules': None, 'CpuPeriod': 0, 'Runtime': 'runc', 'BlkioDeviceWriteIOps': None, 'Devices': None, 'CpusetCpus': '', 'CpuPercent': 0, 'GroupAdd': None, 'CpuRealtimePeriod': 0, 'ReadonlyRootfs': False, 'CpuShares': 0, 'Privileged': True, 'Memory': 0, 'AutoRemove': False, 'CgroupParent': '', 'PortBindings': None, 'DiskQuota': 0, 'PidMode': '', 'CpuQuota': 0, 'PublishAllPorts': False, 'VolumesFrom': None, 'BlkioDeviceReadBps': None, 'NetworkMode': 'default', 'ContainerIDFile': '', 'Isolation': '', 'BlkioWeight': 0, 'UsernsMode': '', 'MemorySwappiness': -1, 'KernelMemory': 0, 'UTSMode': '', 'Cgroup': '', 'ExtraHosts': None, 'NanoCpus': 0, 'MemorySwap': 0, 'ShmSize': 67108864, 'VolumeDriver': '', 'ConsoleSize': [0, 0], 'PidsLimit': 0, 'Links': None, 'BlkioDeviceReadIOps': None, 'IOMaximumIOps': 0, 'BlkioDeviceWriteBps': None}, 'LogPath': '', 'Driver': 'overlay2', 'Mounts': [{'Propagation': '', 'Mode': 'rw', 'Source': '/opt/gns3/projects/62d381b4-178f-4c90-8d75-55b6ea26ce95/project-files/docker/cc4782e2-afb5-42f9-ab17-3032b87d94bd/etc/network', 'RW': True, 'Destination': '/gns3volumes/etc/network', 'Type': 'bind'}, {'Propagation': '', 'Mode': 'ro', 'Source': '/usr/local/lib/python3.4/dist-packages/gns3server/modules/docker/resources', 'RW': False, 'Destination': '/gns3', 'Type': 'bind'}], 'RestartCount': 0}
2017-04-20 11:19:14 DEBUG __init__.py:92 Query Docker POST containers/5db4aba490c2545c3ae802d26888280e4d0fc52ee8ff3b6dbad26844df4ca015/start params={} data={} Response: b''
2017-04-20 11:19:14 DEBUG __init__.py:92 Query Docker GET containers/5db4aba490c2545c3ae802d26888280e4d0fc52ee8ff3b6dbad26844df4ca015/json params={} data={} Response: {'State': {'Paused': False, 'Restarting': False, 'Error': '', 'StartedAt': '2017-04-20T11:19:14.388330834Z', 'Status': 'running', 'ExitCode': 0, 'Dead': False, 'FinishedAt': '0001-01-01T00:00:00Z', 'Pid': 2297, 'Running': True, 'OOMKilled': False}, 'Created': '2017-04-20T11:19:10.898276824Z', 'Image': 'sha256:4a415e3663882fbc554ee830889c68a33b3585503892cc718a4698e91ef2a526', 'HostsPath': '', 'Id': '5db4aba490c2545c3ae802d26888280e4d0fc52ee8ff3b6dbad26844df4ca015', 'Path': '/gns3/init.sh', 'ExecIDs': None, 'Args': ['/bin/sh'], 'MountLabel': '', 'NetworkSettings': {'IPv6Gateway': '', 'EndpointID': '', 'MacAddress': '', 'Networks': {}, 'HairpinMode': False, 'Gateway': '', 'SecondaryIPAddresses': None, 'GlobalIPv6Address': '', 'Bridge': '', 'LinkLocalIPv6PrefixLen': 0, 'IPAddress': '', 'SandboxKey': '', 'IPPrefixLen': 0, 'GlobalIPv6PrefixLen': 0, 'SandboxID': '', 'LinkLocalIPv6Address': '', 'SecondaryIPv6Addresses': None, 'Ports': {}}, 'AppArmorProfile': 'unconfined', 'Name': '/hungry_boyd', 'HostnamePath': '/var/lib/docker/containers/5db4aba490c2545c3ae802d26888280e4d0fc52ee8ff3b6dbad26844df4ca015/hostname', 'Config': {'StdinOnce': False, 'AttachStdin': False, 'Labels': {}, 'Volumes': None, 'WorkingDir': '', 'Hostname': 'alpine-1', 'AttachStdout': False, 'Env': ['container=docker', 'GNS3_MAX_ETHERNET=eth0', 'GNS3_VOLUMES=/etc/network', 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'], 'Tty': True, 'Cmd': ['/bin/sh'], 'Entrypoint': ['/gns3/init.sh'], 'OpenStdin': True, 'NetworkDisabled': True, 'User': '', 'AttachStderr': False, 'Domainname': '', 'OnBuild': None, 'Image': 'alpine:latest'}, 'ResolvConfPath': '', 'ProcessLabel': '', 'GraphDriver': {'Data': {'LowerDir': '/var/lib/docker/overlay2/0e5100661f63062f8d306684c47db4143ff8fe960055334a30d3525cce4d2ddd-init/diff:/var/lib/docker/overlay2/4d0cf72d45a2a5af5ad52a2878cbbf4221cc2db015c7cb7e94fa120260095ee8/diff', 'UpperDir': '/var/lib/docker/overlay2/0e5100661f63062f8d306684c47db4143ff8fe960055334a30d3525cce4d2ddd/diff', 'MergedDir': '/var/lib/docker/overlay2/0e5100661f63062f8d306684c47db4143ff8fe960055334a30d3525cce4d2ddd/merged', 'WorkDir': '/var/lib/docker/overlay2/0e5100661f63062f8d306684c47db4143ff8fe960055334a30d3525cce4d2ddd/work'}, 'Name': 'overlay2'}, 'HostConfig': {'LogConfig': {'Config': {}, 'Type': 'json-file'}, 'IpcMode': '', 'IOMaximumBandwidth': 0, 'Dns': None, 'OomKillDisable': False, 'Binds': ['/usr/local/lib/python3.4/dist-packages/gns3server/modules/docker/resources:/gns3:ro', '/opt/gns3/projects/62d381b4-178f-4c90-8d75-55b6ea26ce95/project-files/docker/cc4782e2-afb5-42f9-ab17-3032b87d94bd/etc/network:/gns3volumes/etc/network:rw'], 'CpuRealtimeRuntime': 0, 'CpusetMems': '', 'CapAdd': ['ALL'], 'DnsSearch': None, 'Ulimits': None, 'SecurityOpt': ['label=disable'], 'MemoryReservation': 0, 'BlkioWeightDevice': None, 'CapDrop': None, 'RestartPolicy': {'Name': '', 'MaximumRetryCount': 0}, 'OomScoreAdj': 0, 'CpuCount': 0, 'DnsOptions': None, 'DeviceCgroupRules': None, 'CpuPeriod': 0, 'Runtime': 'runc', 'BlkioDeviceWriteIOps': None, 'Devices': None, 'CpusetCpus': '', 'CpuPercent': 0, 'GroupAdd': None, 'CpuRealtimePeriod': 0, 'ReadonlyRootfs': False, 'CpuShares': 0, 'Privileged': True, 'Memory': 0, 'AutoRemove': False, 'CgroupParent': '', 'PortBindings': None, 'DiskQuota': 0, 'PidMode': '', 'CpuQuota': 0, 'PublishAllPorts': False, 'VolumesFrom': None, 'BlkioDeviceReadBps': None, 'NetworkMode': 'default', 'ContainerIDFile': '', 'Isolation': '', 'BlkioWeight': 0, 'UsernsMode': '', 'MemorySwappiness': -1, 'KernelMemory': 0, 'UTSMode': '', 'Cgroup': '', 'ExtraHosts': None, 'NanoCpus': 0, 'MemorySwap': 0, 'ShmSize': 67108864, 'VolumeDriver': '', 'ConsoleSize': [0, 0], 'PidsLimit': 0, 'Links': None, 'BlkioDeviceReadIOps': None, 'IOMaximumIOps': 0, 'BlkioDeviceWriteBps': None}, 'LogPath': '/var/lib/docker/containers/5db4aba490c2545c3ae802d26888280e4d0fc52ee8ff3b6dbad26844df4ca015/5db4aba490c2545c3ae802d26888280e4d0fc52ee8ff3b6dbad26844df4ca015-json.log', 'Driver': 'overlay2', 'Mounts': [{'Propagation': '', 'Mode': 'ro', 'Source': '/usr/local/lib/python3.4/dist-packages/gns3server/modules/docker/resources', 'RW': False, 'Destination': '/gns3', 'Type': 'bind'}, {'Propagation': '', 'Mode': 'rw', 'Source': '/opt/gns3/projects/62d381b4-178f-4c90-8d75-55b6ea26ce95/project-files/docker/cc4782e2-afb5-42f9-ab17-3032b87d94bd/etc/network', 'RW': True, 'Destination': '/gns3volumes/etc/network', 'Type': 'bind'}], 'RestartCount': 0}
2017-04-20 11:19:14 INFO base_vm.py:425 Starting new uBridge hypervisor 0.0.0.0:35066
2017-04-20 11:19:14 INFO hypervisor.py:152 starting ubridge: ['/usr/bin/ubridge', '-H', '0.0.0.0:35066', '-d', '2']
2017-04-20 11:19:14 INFO hypervisor.py:154 logging to /opt/gns3/projects/62d381b4-178f-4c90-8d75-55b6ea26ce95/project-files/docker/cc4782e2-afb5-42f9-ab17-3032b87d94bd/ubridge.log
2017-04-20 11:19:14 INFO hypervisor.py:162 ubridge started PID=2319
2017-04-20 11:19:14 INFO base_vm.py:427 Hypervisor 0.0.0.0:35066 has successfully started
2017-04-20 11:19:14 INFO ubridge_hypervisor.py:84 Connected to uBridge hypervisor after 0.0141 seconds
2017-04-20 11:19:14 DEBUG ubridge_hypervisor.py:208 sending hypervisor version

2017-04-20 11:19:14 DEBUG ubridge_hypervisor.py:263 returned result ['0.9.11']
2017-04-20 11:19:14 DEBUG ubridge_hypervisor.py:208 sending docker create_veth veth-gns3-e0 veth-gns3-i0

2017-04-20 11:19:14 DEBUG ubridge_hypervisor.py:263 returned result ['veth pair created: veth-gns3-e0 and veth-gns3-i0']
2017-04-20 11:19:14 DEBUG docker_vm.py:644 Move container alpine-1 adapter veth-gns3-i0 to namespace 2297
2017-04-20 11:19:14 DEBUG ubridge_hypervisor.py:208 sending docker move_to_ns veth-gns3-i0 2297 eth0

2017-04-20 11:19:14 DEBUG ubridge_hypervisor.py:263 returned result ['veth-gns3-i0 moved to namespace 2297']
2017-04-20 11:19:14 DEBUG docker_vm.py:389 Docker container 'alpine-1' started listen for auxilary telnet on 5001
2017-04-20 11:19:14 INFO docker_vm.py:372 Docker container 'alpine-1' [alpine:latest] started listen for telnet on 5000
2017-04-20 11:19:14 INFO response.py:48 POST /v1/projects/62d381b4-178f-4c90-8d75-55b6ea26ce95/docker/vms/cc4782e2-afb5-42f9-ab17-3032b87d94bd/start
2017-04-20 11:19:14 DEBUG response.py:49 {'Accept-Language': 'de-DE,en,*', 'Content-Length': '2', 'Host': '172.20.1.130:3080', 'Content-Type': 'application/json', 'User-Agent': 'GNS3 QT Client v1.5.4', 'Connection': 'Keep-Alive', 'Accept-Encoding': 'gzip, deflate'}
2017-04-20 11:19:14 DEBUG response.py:51 {}
2017-04-20 11:19:14 INFO response.py:52 Response: 204 No Content
2017-04-20 11:19:14 DEBUG response.py:53 {'Content-Length': '0', 'Content-Type': 'application/octet-stream', 'X-Route': '/v1/projects/{project_id}/docker/vms/{id}/start', 'Server': 'Python/3.4 GNS3/1.5.4', 'Access-Control-Allow-Origin': '*'}
2017-04-20 11:19:14 INFO helpers.py:454 172.20.1.1 - - [20/Apr/2017:11:19:14 +0000] "POST /v1/projects/62d381b4-178f-4c90-8d75-55b6ea26ce95/docker/vms/cc4782e2-afb5-42f9-ab17-3032b87d94bd/start HTTP/1.1" 204 0 "-" "GNS3 QT Client v1.5.4"
2017-04-20 11:19:14 DEBUG project_handler.py:219 Send notification: {"action": "vm.started", "event": {"adapters": 1, "aux": 5001, "console": 5000, "console_http_path": "/", "console_http_port": 80, "console_resolution": "1024x768", "console_type": "telnet", "container_id": "5db4aba490c2545c3ae802d26888280e4d0fc52ee8ff3b6dbad26844df4ca015", "environment": null, "image": "alpine:latest", "name": "alpine-1", "project_id": "62d381b4-178f-4c90-8d75-55b6ea26ce95", "start_command": null, "vm_directory": "/opt/gns3/projects/62d381b4-178f-4c90-8d75-55b6ea26ce95/project-files/docker/cc4782e2-afb5-42f9-ab17-3032b87d94bd", "vm_id": "cc4782e2-afb5-42f9-ab17-3032b87d94bd"}}
2017-04-20 11:19:14 INFO hypervisor.py:186 Stopping uBridge process PID=2319
2017-04-20 11:19:14 DEBUG ubridge_hypervisor.py:208 sending hypervisor stop

2017-04-20 11:19:14 DEBUG ubridge_hypervisor.py:263 returned result []
2017-04-20 11:19:15 DEBUG __init__.py:92 Query Docker GET containers/5db4aba490c2545c3ae802d26888280e4d0fc52ee8ff3b6dbad26844df4ca015/json params={} data={} Response: {'State': {'Paused': False, 'Restarting': False, 'Error': '', 'StartedAt': '2017-04-20T11:19:14.388330834Z', 'Status': 'running', 'ExitCode': 0, 'Dead': False, 'FinishedAt': '0001-01-01T00:00:00Z', 'Pid': 2297, 'Running': True, 'OOMKilled': False}, 'Created': '2017-04-20T11:19:10.898276824Z', 'Image': 'sha256:4a415e3663882fbc554ee830889c68a33b3585503892cc718a4698e91ef2a526', 'HostsPath': '', 'Id': '5db4aba490c2545c3ae802d26888280e4d0fc52ee8ff3b6dbad26844df4ca015', 'Path': '/gns3/init.sh', 'ExecIDs': ['7282f4d3d4d335534d777fbfe652aa4b60dea35ccb65a651a9b2ed78a7f0c14a'], 'Args': ['/bin/sh'], 'MountLabel': '', 'NetworkSettings': {'IPv6Gateway': '', 'EndpointID': '', 'MacAddress': '', 'Networks': {}, 'HairpinMode': False, 'Gateway': '', 'SecondaryIPAddresses': None, 'GlobalIPv6Address': '', 'Bridge': '', 'LinkLocalIPv6PrefixLen': 0, 'IPAddress': '', 'SandboxKey': '', 'IPPrefixLen': 0, 'GlobalIPv6PrefixLen': 0, 'SandboxID': '', 'LinkLocalIPv6Address': '', 'SecondaryIPv6Addresses': None, 'Ports': {}}, 'AppArmorProfile': 'unconfined', 'Name': '/hungry_boyd', 'HostnamePath': '/var/lib/docker/containers/5db4aba490c2545c3ae802d26888280e4d0fc52ee8ff3b6dbad26844df4ca015/hostname', 'Config': {'StdinOnce': False, 'AttachStdin': False, 'Labels': {}, 'Volumes': None, 'WorkingDir': '', 'Hostname': 'alpine-1', 'AttachStdout': False, 'Env': ['container=docker', 'GNS3_MAX_ETHERNET=eth0', 'GNS3_VOLUMES=/etc/network', 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'], 'Tty': True, 'Cmd': ['/bin/sh'], 'Entrypoint': ['/gns3/init.sh'], 'OpenStdin': True, 'NetworkDisabled': True, 'User': '', 'AttachStderr': False, 'Domainname': '', 'OnBuild': None, 'Image': 'alpine:latest'}, 'ResolvConfPath': '', 'ProcessLabel': '', 'GraphDriver': {'Data': {'LowerDir': '/var/lib/docker/overlay2/0e5100661f63062f8d306684c47db4143ff8fe960055334a30d3525cce4d2ddd-init/diff:/var/lib/docker/overlay2/4d0cf72d45a2a5af5ad52a2878cbbf4221cc2db015c7cb7e94fa120260095ee8/diff', 'UpperDir': '/var/lib/docker/overlay2/0e5100661f63062f8d306684c47db4143ff8fe960055334a30d3525cce4d2ddd/diff', 'MergedDir': '/var/lib/docker/overlay2/0e5100661f63062f8d306684c47db4143ff8fe960055334a30d3525cce4d2ddd/merged', 'WorkDir': '/var/lib/docker/overlay2/0e5100661f63062f8d306684c47db4143ff8fe960055334a30d3525cce4d2ddd/work'}, 'Name': 'overlay2'}, 'HostConfig': {'LogConfig': {'Config': {}, 'Type': 'json-file'}, 'IpcMode': '', 'IOMaximumBandwidth': 0, 'Dns': None, 'OomKillDisable': False, 'Binds': ['/usr/local/lib/python3.4/dist-packages/gns3server/modules/docker/resources:/gns3:ro', '/opt/gns3/projects/62d381b4-178f-4c90-8d75-55b6ea26ce95/project-files/docker/cc4782e2-afb5-42f9-ab17-3032b87d94bd/etc/network:/gns3volumes/etc/network:rw'], 'CpuRealtimeRuntime': 0, 'CpusetMems': '', 'CapAdd': ['ALL'], 'DnsSearch': None, 'Ulimits': None, 'SecurityOpt': ['label=disable'], 'MemoryReservation': 0, 'BlkioWeightDevice': None, 'CapDrop': None, 'RestartPolicy': {'Name': '', 'MaximumRetryCount': 0}, 'OomScoreAdj': 0, 'CpuCount': 0, 'DnsOptions': None, 'DeviceCgroupRules': None, 'CpuPeriod': 0, 'Runtime': 'runc', 'BlkioDeviceWriteIOps': None, 'Devices': None, 'CpusetCpus': '', 'CpuPercent': 0, 'GroupAdd': None, 'CpuRealtimePeriod': 0, 'ReadonlyRootfs': False, 'CpuShares': 0, 'Privileged': True, 'Memory': 0, 'AutoRemove': False, 'CgroupParent': '', 'PortBindings': None, 'DiskQuota': 0, 'PidMode': '', 'CpuQuota': 0, 'PublishAllPorts': False, 'VolumesFrom': None, 'BlkioDeviceReadBps': None, 'NetworkMode': 'default', 'ContainerIDFile': '', 'Isolation': '', 'BlkioWeight': 0, 'UsernsMode': '', 'MemorySwappiness': -1, 'KernelMemory': 0, 'UTSMode': '', 'Cgroup': '', 'ExtraHosts': None, 'NanoCpus': 0, 'MemorySwap': 0, 'ShmSize': 67108864, 'VolumeDriver': '', 'ConsoleSize': [0, 0], 'PidsLimit': 0, 'Links': None, 'BlkioDeviceReadIOps': None, 'IOMaximumIOps': 0, 'BlkioDeviceWriteBps': None}, 'LogPath': '/var/lib/docker/containers/5db4aba490c2545c3ae802d26888280e4d0fc52ee8ff3b6dbad26844df4ca015/5db4aba490c2545c3ae802d26888280e4d0fc52ee8ff3b6dbad26844df4ca015-json.log', 'Driver': 'overlay2', 'Mounts': [{'Propagation': '', 'Mode': 'rw', 'Source': '/opt/gns3/projects/62d381b4-178f-4c90-8d75-55b6ea26ce95/project-files/docker/cc4782e2-afb5-42f9-ab17-3032b87d94bd/etc/network', 'RW': True, 'Destination': '/gns3volumes/etc/network', 'Type': 'bind'}, {'Propagation': '', 'Mode': 'ro', 'Source': '/usr/local/lib/python3.4/dist-packages/gns3server/modules/docker/resources', 'RW': False, 'Destination': '/gns3', 'Type': 'bind'}], 'RestartCount': 0}
2017-04-20 11:19:15 DEBUG docker_vm.py:399 Docker container 'alpine-1' [alpine:latest] fix ownership on /etc/network
2017-04-20 11:19:20 DEBUG __init__.py:92 Query Docker POST containers/5db4aba490c2545c3ae802d26888280e4d0fc52ee8ff3b6dbad26844df4ca015/stop params={'t': 5} data={} Response: b''
2017-04-20 11:19:20 INFO docker_vm.py:547 Docker container 'alpine-1' [alpine:latest] stopped
2017-04-20 11:19:20 DEBUG project_handler.py:219 Send notification: {"action": "vm.stopped", "event": {"adapters": 1, "aux": 5001, "console": 5000, "console_http_path": "/", "console_http_port": 80, "console_resolution": "1024x768", "console_type": "telnet", "container_id": "5db4aba490c2545c3ae802d26888280e4d0fc52ee8ff3b6dbad26844df4ca015", "environment": null, "image": "alpine:latest", "name": "alpine-1", "project_id": "62d381b4-178f-4c90-8d75-55b6ea26ce95", "start_command": null, "vm_directory": "/opt/gns3/projects/62d381b4-178f-4c90-8d75-55b6ea26ce95/project-files/docker/cc4782e2-afb5-42f9-ab17-3032b87d94bd", "vm_id": "cc4782e2-afb5-42f9-ab17-3032b87d94bd"}}
@ghost
Copy link
Author

ghost commented Apr 20, 2017

Using the official GNS3 VM v1.5.3 and updating the gns3-server to 1.5.4 with "pip3 install" (not using the Upgrade function from the menu) results in a working configuration.

I assume, that the latest docker in the GNS3 VM creates some trouble. The old docker version 1.12.6 from the GNS3 VM 1.5.3 seems to work better.

@ghost
Copy link
Author

ghost commented Apr 20, 2017

Verified it:

  • Installing GNS3 VM v1.5.3 and updating it with "pip3 install gns3-server==1.5.4" results in a working docker environment.
  • After updating docker to 17.04.0-ce with "apt-get update; apt-get install docker-engine" a docker VM stops automatically after a start.

@ghost ghost changed the title Docker doesn't work with 1.5.4 Docker doesn't work with GNS3 VM 1.5.4 Apr 20, 2017
@julien-duponchelle
Copy link
Contributor

julien-duponchelle commented Apr 20, 2017 via email

@ghost
Copy link
Author

ghost commented Apr 20, 2017

According to https://www.gns3.com/qa/gns3-1-5-4-ubuntu-container-stop 2.0.0rc4 is also affected.

@julien-duponchelle
Copy link
Contributor

julien-duponchelle commented Apr 20, 2017 via email

@julien-duponchelle julien-duponchelle added this to the 2.0 milestone Apr 20, 2017
@ghost
Copy link
Author

ghost commented Apr 20, 2017

It works with the latest stable docker version 17.03.1-ce, the next (unstable) version 17.04.0-ce has this issue.

I've installed those versions as documented in https://store.docker.com/editions/community/docker-ce-server-ubuntu?tab=description , my /etc/apt/sources.list.d/docker.list looks like this:

deb [arch=amd64] https://download.docker.com/linux/ubuntu trusty stable
#deb [arch=amd64] https://download.docker.com/linux/ubuntu trusty edge

@julien-duponchelle
Copy link
Contributor

I will freeze the docker version provided in the GNS3 VM

@julien-duponchelle
Copy link
Contributor

Ok if user run upgrade in the GNS3 VM the previous release is installed. Now we need to understand what is wrong with the edge version

julien-duponchelle added a commit to GNS3/gns3-server that referenced this issue Apr 24, 2017
@ghost
Copy link
Author

ghost commented Apr 24, 2017

Doesn't the requirement for api 1.27 mean, that the GNS3 server won't run with docker versions earlier than v17.03.1-ce? For the GNS3 VM that's not a problem, you can take care about that. But I fear, that a lot of linux GNS3 installations will stop working with docker VMs, because their docker version is older.

@ghost
Copy link
Author

ghost commented Apr 28, 2017

Have you tried your changes in 2.0.0dev13 with docker version 17.04.0-ce? In my environment it still doesn't work.

I'm pretty sure, that the reason, why docker API 1.28 doesn't work, is the following change in 17.04.0-ce:

Your patches changed the docker call in http_query (which shouldn't be necessary), but missed the docker call in websocket_query. Additionally changing that call, docker works also with 17.04.0-ce. Even after removing your change in http_query, it works.

Here my patch to websocket_query:

diff --git a/gns3server/compute/docker/__init__.py b/gns3server/compute/docker/__init__.py
index 53b4a7a..7b3e4d9 100644
--- a/gns3server/compute/docker/__init__.py
+++ b/gns3server/compute/docker/__init__.py
@@ -161,7 +161,7 @@ class Docker(BaseManager):
         :returns: Websocket
         """

-        url = "http://docker/" + path
+        url = "http://docker/v" + DOCKER_MINIMUM_API_VERSION + "/" + path
         connection = yield from aiohttp.ws_connect(url,
                                                    connector=self.connector(),
                                                    origin="http://docker",

julien-duponchelle pushed a commit to GNS3/gns3-server that referenced this issue Apr 28, 2017
Fix GNS3/gns3-gui#1994

Signed-off-by: Julien Duponchelle <julien@gns3.net>
@julien-duponchelle
Copy link
Contributor

julien-duponchelle commented Apr 28, 2017 via email

julien-duponchelle pushed a commit to GNS3/gns3-server that referenced this issue Apr 28, 2017
Fix GNS3/gns3-gui#1994

Signed-off-by: Julien Duponchelle <julien@gns3.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant