containerlab: Error: failed reading the file /root: read /root: is a directory

Hello,

So I’m using containerlab for the first time on Ubuntu (22.04.2 LTS) and I’m encountering this issue:

name: simple
topology:
  nodes:
    srl:
      kind: nokia_srlinux
      image: ghcr.io/nokia/srlinux

I first tried with a config file and it failed, so I tried with no config file at all and got the same error.

$ docker images | grep srlinux
ghcr.io/nokia/srlinux      latest    07c39b3d625e   3 weeks ago    2.45GB

Trace:

$ sudo containerlab --log-level trace deploy
DEBU[0000] trying to find topology files automatically  
DEBU[0000] topology file found: simple.clab.yml         
INFO[0000] Containerlab v0.42.0 started                 
DEBU[0000] template variables: <nil>                    
DEBU[0000] topology:
name: simple
topology:
  nodes:
    srl:
      kind: nokia_srlinux
      image: ghcr.io/nokia/srlinux
 
DEBU[0000] method initMgmtNetwork was called mgmt params &{Network: Bridge: IPv4Subnet: IPv4Gw: IPv4Range: IPv6Subnet: IPv6Gw: IPv6Range: MTU: ExternalAccess:<nil>} 
DEBU[0000] New mgmt params are &{Network:clab Bridge: IPv4Subnet:172.20.20.0/24 IPv4Gw: IPv4Range: IPv6Subnet:2001:172:20:20::/64 IPv6Gw: IPv6Range: MTU: ExternalAccess:0xc000caf30a} 
DEBU[0000] env runtime var value is                     
DEBU[0000] Running runtime.Init with params &{Timeout:2m0s GracefulShutdown:false Debug:false KeepMgmtNet:false} and &{Network:clab Bridge: IPv4Subnet:172.20.20.0/24 IPv4Gw: IPv4Range: IPv6Subnet:2001:172:20:20::/64 IPv6Gw: IPv6Range: MTU: ExternalAccess:0xc000caf30a} 
DEBU[0000] Runtime: Docker                              
DEBU[0000] detected docker network mtu value - 1500     
DEBU[0000] initialized a runtime with params &{config:{Timeout:120000000000 GracefulShutdown:false Debug:false KeepMgmtNet:false} Client:0xc000cb2b00 mgmt:0xc000746000} 
INFO[0000] Parsing & checking topology file: simple.clab.yml 
DEBU[0000] node config: &{ShortName:srl LongName:clab-simple-srl Fqdn:srl.simple.io LabDir:/home/USERNAME/workspace/containerlab/simple/clab-simple/srl Index:0 Group: Kind:nokia_srlinux StartupConfig: StartupDelay:0 EnforceStartupConfig:false AutoRemove:0xc0007ac98a ResStartupConfig: Config:<nil> ResConfig: NodeType: Position: License: Image:ghcr.io/nokia/srlinux ImagePullPolicy:IfNotPresent Sysctls:map[] User: Entrypoint: Cmd: Exec:[] Env:map[] Binds:[] PortBindings:map[] PortSet:map[] NetworkMode: MgmtNet: MgmtIntf: MgmtIPv4Address: MgmtIPv4PrefixLength:0 MgmtIPv6Address: MgmtIPv6PrefixLength:0 MgmtIPv4Gateway: MgmtIPv6Gateway: MacAddress: ContainerID: TLSCert: TLSKey: TLSAnchor: Certificate:<nil> NSPath: Publish:[] ExtraHosts:[] Labels:map[] Endpoints:[] SANs:[] Sandbox: Kernel: Runtime: CPU:0 CPUSet: Memory: Extras:<nil> WaitFor:[] DNS:<nil> IsRootNamespaceBased:false} 
DEBU[0000] lab Conf: &{Name:simple Prefix:0xc000a26140 Mgmt:0xc000746000 Topology:0xc0009e8210 Debug:false} 
DEBU[0000] Env: CLAB_VERSION_CHECK=                     
DEBU[0000] kernel version: 5.19.0-45-generic            
DEBU[0000] Looking up ghcr.io/nokia/srlinux Docker image 
DEBU[0000] Image ghcr.io/nokia/srlinux present, skip pulling 
DEBU[0000] kernel module "ip_tables" is already loaded  
DEBU[0000] kernel module "ip6_tables" is already loaded 
INFO[0000] Creating lab directory: /home/USERNAME/workspace/containerlab/simple/clab-simple 
DEBU[0000] failed loading csr /home/USERNAME/workspace/containerlab/simple/clab-simple/.tls/ca/ca.csr, continuing anyways 
DEBU[0000] SSH_AUTH_SOCK not set, skipping pubkey fetching 
DEBU[0000] extracted 0 keys from ssh-agent              
Error: failed reading the file /root: read /root: is a directory

I did not find any issue related to this error message. Any clue?

Sorry if it seems obvious or not related to containerlab, I do not know how to dig further into the issue.

Thanks.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 16 (9 by maintainers)

Most upvoted comments

@angely-dev nice. thanks. I will make those fixes part of the next release. Server is not running is an expected log message, normal operation. I am therefore closing this issue

@angely-dev this should do it

docker run --rm -v $(pwd):/workspace ghcr.io/oras-project/oras:v0.12.0 pull ghcr.io/srl-labs/clab-oci:ac908442

Yes, this is definitely the case here. I don’t have a system with AD to check this myself, but all points out to it. I think we have to add another way to find the user by its ID in case Go stdlib fails to do so. We can use id command that seems to work just fine in both cases.

The IP pool clash is something you have to check, as it is related to your docker settings. You can do docker network ls and see which networks you have defined, one of them appears to be using the network clab chose - 172.20.20.0/24 (or its IPv6 pair)