Skip to content

Running linux-lab returning Error: inspecting object: printing inspect output: template: inspect:1:19: executing "inspect" at <.IPAM.Config> #15

@YonK0

Description

@YonK0

This error shows up when I try to launch the Linux lab using: $ tools/docker/run linux-lab :

$ /home/aero/workspace/tinyclub/cloud-lab/tools/docker/run linux-lab
LOG: Init docker environment ...
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Error: inspecting object: printing inspect output: template: inspect:1:19: executing "inspect" at <.IPAM.Config>: can't evaluate field IPAM in type interface {}
/home/aero/workspace/tinyclub/cloud-lab/tools/docker/run: 994: arithmetic expression: expecting primary: "5-/8"
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
INFO: Start cloud-ubuntu-web
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Error: ".2" is not an ip address
ERR: Failed to run cloud-ubuntu-w

I was able to fix it by replacing:

VNC_NET=`docker inspect --format "{{ .IPAM.Config }}" $VNC_NET_NAME | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b/[0-9]{1,2}"`

with :

VNC_NET=`docker network inspect $VNC_NET_NAME | grep -o "\"subnet\": \"[^\"]*\"" | cut -d\" -f4`

in tools/docker/libs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions