srl-labs / containerlab

container-based networking labs
https://containerlab.dev
BSD 3-Clause "New" or "Revised" License
1.39k stars 243 forks source link

`license` property is creating an empty license file at the target #1349

Closed karlnewell closed 1 year ago

karlnewell commented 1 year ago

We're using the license property for Juniper cRPD Kind but the copied file is empty. Topology file and debug output included below.

I don't know Go well enough to attempt to troubleshoot. Various naming permutations on the source file have no effect. Moving the license property directly under the node definition has no effect.

Thank you for taking a look and for a great project!

$ sudo containerlab version
    version: 0.40.0
     commit: 8c9b54fc
       date: 2023-04-28T12:22:01Z
     source: https://github.com/srl-labs/containerlab
 rel. notes: https://containerlab.dev/rn/0.40/

Source and destination license files. And debug snippet showing file is copied

DEBU[0000] CopyFile src /srv/clab/Getting_Started/startup-config/license.key -> dst /srv/clab/Getting_Started/clab-automation-workshop-02/crpd4/config/license/safenet/junos_sfnt.lic succeeded

[knewell@tx23-workshop.macc Getting_Started]$ ls -l /srv/clab/Getting_Started/startup-config/license.key /srv/clab/Getting_Started/clab-automation-workshop-02/crpd4/config/license/safenet/junos_sfnt.lic
-rw-r--r--. 1 root    root       0 Apr 28 22:15 /srv/clab/Getting_Started/clab-automation-workshop-02/crpd4/config/license/safenet/junos_sfnt.lic
-rw-r--r--. 1 knewell knewell 1761 Apr 28 21:36 /srv/clab/Getting_Started/startup-config/license.key

Topology

[knewell@tx23-workshop.macc Getting_Started]$ cat workshop02.clab.yml
name: automation-workshop-02

mgmt:
  network: automation-workshop-02
  ipv4_subnet: 172.16.2.0/24
  ipv6_subnet: 2001:db8:16:2::/80

topology:
  kinds:
    cisco_xrd:
      image: ios-xr/xrd-control-plane:7.9.1
      # startup-config: startup-config/xrd.cfg
    juniper_crpd:
      image: crpd:23.1R1.8
      license: startup-config/license.key
      startup-config: startup-config/crpd.conf

  nodes:
    xrd2:
      kind: cisco_xrd
      mgmt_ipv4: 172.16.2.2
      mgmt_ipv6: 2001:db8:16:2::2
      ports:
        - 2022:22
    xrd3:
      kind: cisco_xrd
      mgmt_ipv4: 172.16.2.3
      mgmt_ipv6: 2001:db8:16:2::3
      ports:
        - 2023:22
    crpd4:
      kind: juniper_crpd
      mgmt_ipv4: 172.16.2.4
      mgmt_ipv6: 2001:db8:16:2::4
      ports:
        - 2024:22
    linux5:
      kind: linux
      image: internet2/getting_started
      mgmt_ipv4: 172.16.2.5
      mgmt_ipv6: 2001:db8:16:2::5
      ports:
        - 2025:22
      env:
        CX23_LAB_PASSWORD: Self-Nose-Reasonable-Dust-02

  links:
    - endpoints: ["xrd2:Gi0-0-0-0", "xrd3:Gi0-0-0-0"]
    - endpoints: ["xrd2:Gi0-0-0-1", "crpd4:eth1"]
    - endpoints: ["xrd3:Gi0-0-0-1", "crpd4:eth2"]
    - endpoints: ["linux5:eth1", "xrd2:Gi0-0-0-2"]
    - endpoints: ["linux5:eth2", "xrd3:Gi0-0-0-2"]

Debug deploy

[knewell@tx23-workshop.macc Getting_Started]$ sudo containerlab deploy -ct workshop02.clab.yml -d
INFO[0000] Containerlab v0.40.0 started
DEBU[0000] template variables: <nil>
DEBU[0000] topology:
name: automation-workshop-02

mgmt:
  network: automation-workshop-02
  ipv4_subnet: 172.16.2.0/24
  ipv6_subnet: 2001:db8:16:2::/80

topology:
  kinds:
    cisco_xrd:
      image: ios-xr/xrd-control-plane:7.9.1
      # startup-config: startup-config/xrd.cfg
    juniper_crpd:
      image: crpd:23.1R1.8
      license: startup-config/license.key
      startup-config: startup-config/crpd.conf

  nodes:
    xrd2:
      kind: cisco_xrd
      mgmt_ipv4: 172.16.2.2
      mgmt_ipv6: 2001:db8:16:2::2
      ports:
        - 2022:22
    xrd3:
      kind: cisco_xrd
      mgmt_ipv4: 172.16.2.3
      mgmt_ipv6: 2001:db8:16:2::3
      ports:
        - 2023:22
    crpd4:
      kind: juniper_crpd
      mgmt_ipv4: 172.16.2.4
      mgmt_ipv6: 2001:db8:16:2::4
      ports:
        - 2024:22
    linux5:
      kind: linux
      image: internet2/getting_started
      mgmt_ipv4: 172.16.2.5
      mgmt_ipv6: 2001:db8:16:2::5
      ports:
        - 2025:22
      env:
        CX23_LAB_PASSWORD: Self-Nose-Reasonable-Dust-02

  links:
    - endpoints: ["xrd2:Gi0-0-0-0", "xrd3:Gi0-0-0-0"]
    - endpoints: ["xrd2:Gi0-0-0-1", "crpd4:eth1"]
    - endpoints: ["xrd3:Gi0-0-0-1", "crpd4:eth2"]
    - endpoints: ["linux5:eth1", "xrd2:Gi0-0-0-2"]
    - endpoints: ["linux5:eth2", "xrd3:Gi0-0-0-2"]
DEBU[0000] method initMgmtNetwork was called mgmt params &{Network:automation-workshop-02 Bridge: IPv4Subnet:172.16.2.0/24 IPv4Gw: IPv6Subnet:2001:db8:16:2::/80 IPv6Gw: MTU: ExternalAccess:<nil>}
DEBU[0000] New mgmt params are &{Network:automation-workshop-02 Bridge: IPv4Subnet:172.16.2.0/24 IPv4Gw: IPv6Subnet:2001:db8:16:2::/80 IPv6Gw: MTU: ExternalAccess:0xc000c98c1a}
DEBU[0000] env runtime var value is
DEBU[0000] Running runtime.Init with params &{Timeout:2m0s GracefulShutdown:false Debug:false KeepMgmtNet:false} and &{Network:automation-workshop-02 Bridge: IPv4Subnet:172.16.2.0/24 IPv4Gw: IPv6Subnet:2001:db8:16:2::/80 IPv6Gw: MTU: ExternalAccess:0xc000c98c1a}
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:0xc001274380 mgmt:0xc001274000}
INFO[0000] Parsing & checking topology file: workshop02.clab.yml
DEBU[0000] node config: &{ShortName:crpd4 LongName:clab-automation-workshop-02-crpd4 Fqdn:crpd4.automation-workshop-02.io LabDir:/srv/clab/Getting_Started/clab-automation-workshop-02/crpd4 Index:0 Group: Kind:juniper_crpd StartupConfig: StartupDelay:0 EnforceStartupConfig:false AutoRemove:0xc000bb99fa ResStartupConfig: Config:<nil> ResConfig: NodeType: Position: License: Image:crpd:23.1R1.8 ImagePullPolicy:IfNotPresent Sysctls:map[] User: Entrypoint: Cmd: Exec:[] Env:map[] Binds:[] PortBindings:map[] PortSet:map[] NetworkMode: MgmtNet: MgmtIntf: MgmtIPv4Address:172.16.2.4 MgmtIPv4PrefixLength:0 MgmtIPv6Address:2001:db8:16:2::4 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: DeploymentStatus: Extras:<nil> WaitFor:[] DNS:<nil> IsRootNamespaceBased:false}
DEBU[0000] node config: &{ShortName:linux5 LongName:clab-automation-workshop-02-linux5 Fqdn:linux5.automation-workshop-02.io LabDir:/srv/clab/Getting_Started/clab-automation-workshop-02/linux5 Index:1 Group: Kind:linux StartupConfig: StartupDelay:0 EnforceStartupConfig:false AutoRemove:0xc000456cfe ResStartupConfig: Config:<nil> ResConfig: NodeType: Position: License: Image:internet2/getting_started ImagePullPolicy:IfNotPresent Sysctls:map[] User: Entrypoint: Cmd: Exec:[] Env:map[CX23_LAB_PASSWORD:Self-Nose-Reasonable-Dust-02] Binds:[] PortBindings:map[] PortSet:map[] NetworkMode: MgmtNet: MgmtIntf: MgmtIPv4Address:172.16.2.5 MgmtIPv4PrefixLength:0 MgmtIPv6Address:2001:db8:16:2::5 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: DeploymentStatus: Extras:<nil> WaitFor:[] DNS:<nil> IsRootNamespaceBased:false}
DEBU[0000] node config: &{ShortName:xrd2 LongName:clab-automation-workshop-02-xrd2 Fqdn:xrd2.automation-workshop-02.io LabDir:/srv/clab/Getting_Started/clab-automation-workshop-02/xrd2 Index:2 Group: Kind:cisco_xrd StartupConfig: StartupDelay:0 EnforceStartupConfig:false AutoRemove:0xc00045757f ResStartupConfig: Config:<nil> ResConfig: NodeType: Position: License: Image:ios-xr/xrd-control-plane:7.9.1 ImagePullPolicy:IfNotPresent Sysctls:map[] User: Entrypoint: Cmd: Exec:[] Env:map[] Binds:[] PortBindings:map[] PortSet:map[] NetworkMode: MgmtNet: MgmtIntf: MgmtIPv4Address:172.16.2.2 MgmtIPv4PrefixLength:0 MgmtIPv6Address:2001:db8:16:2::2 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: DeploymentStatus: Extras:<nil> WaitFor:[] DNS:<nil> IsRootNamespaceBased:false}
DEBU[0000] node config: &{ShortName:xrd3 LongName:clab-automation-workshop-02-xrd3 Fqdn:xrd3.automation-workshop-02.io LabDir:/srv/clab/Getting_Started/clab-automation-workshop-02/xrd3 Index:3 Group: Kind:cisco_xrd StartupConfig: StartupDelay:0 EnforceStartupConfig:false AutoRemove:0xc000457cae ResStartupConfig: Config:<nil> ResConfig: NodeType: Position: License: Image:ios-xr/xrd-control-plane:7.9.1 ImagePullPolicy:IfNotPresent Sysctls:map[] User: Entrypoint: Cmd: Exec:[] Env:map[] Binds:[] PortBindings:map[] PortSet:map[] NetworkMode: MgmtNet: MgmtIntf: MgmtIPv4Address:172.16.2.3 MgmtIPv4PrefixLength:0 MgmtIPv6Address:2001:db8:16:2::3 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: DeploymentStatus: Extras:<nil> WaitFor:[] DNS:<nil> IsRootNamespaceBased:false}
DEBU[0000] lab Conf: &{Name:automation-workshop-02 Prefix:0xc000488470 Mgmt:0xc001274000 Topology:0xc000ca29c0 Debug:false}
DEBU[0000] Env: CLAB_VERSION_CHECK=
DEBU[0000] Filter key: name, filter value: ^clab-automation-workshop-02-crpd4$
INFO[0000] Removing /srv/clab/Getting_Started/clab-automation-workshop-02 directory...
DEBU[0000] Looking up ios-xr/xrd-control-plane:7.9.1 Docker image
DEBU[0000] Image ios-xr/xrd-control-plane:7.9.1 present, skip pulling
DEBU[0000] Looking up crpd:23.1R1.8 Docker image
DEBU[0000] Image crpd:23.1R1.8 present, skip pulling
DEBU[0000] Looking up internet2/getting_started Docker image
DEBU[0000] Image internet2/getting_started present, skip pulling
DEBU[0000] Looking up ios-xr/xrd-control-plane:7.9.1 Docker image
DEBU[0000] Image ios-xr/xrd-control-plane:7.9.1 present, skip pulling
INFO[0000] Creating lab directory: /srv/clab/Getting_Started/clab-automation-workshop-02
DEBU[0000] Creating root CA certificate and key
DEBU[0000] writing cert file to /srv/clab/Getting_Started/clab-automation-workshop-02/.tls/ca/ca.pem
DEBU[0000] writing key file to /srv/clab/Getting_Started/clab-automation-workshop-02/.tls/ca/ca.key
DEBU[0000] writing csr file to /srv/clab/Getting_Started/clab-automation-workshop-02/.tls/ca/ca.csr
DEBU[0000] /root/.ssh/authorized_keys found, adding the public keys it contains
DEBU[0000] found public key files ["/root/.ssh/authorized_keys"]
DEBU[0000] Checking if docker network "automation-workshop-02" exists
DEBU[0000] Network "automation-workshop-02" does not exist
INFO[0000] Creating docker network: Name="automation-workshop-02", IPv4Subnet="172.16.2.0/24", IPv6Subnet="2001:db8:16:2::/80", MTU="1500"
DEBU[0000] Docker network "automation-workshop-02", bridge name "br-5dc09b3d5a1e"
DEBU[0000] Disable RPF check on the docker host
DEBU[0000] Enable LLDP on the linux bridge br-5dc09b3d5a1e
DEBU[0000] Disabling TX checksum offloading for the br-5dc09b3d5a1e bridge interface...
DEBU[0000] Installing iptables rules for bridge "br-5dc09b3d5a1e"
DEBU[0000] Number of Node workers: 4, Number of Link workers: 5
DEBU[0000] Adding static ipv4 /etc/hosts entry for crpd4:172.16.2.4
DEBU[0000] Adding static ipv6 /etc/hosts entry for crpd4:2001:db8:16:2::4
DEBU[0000] Adding static ipv4 /etc/hosts entry for linux5:172.16.2.5
DEBU[0000] Adding static ipv6 /etc/hosts entry for linux5:2001:db8:16:2::5
DEBU[0000] Adding static ipv4 /etc/hosts entry for xrd2:172.16.2.2
DEBU[0000] Adding static ipv6 /etc/hosts entry for xrd2:2001:db8:16:2::2
DEBU[0000] Adding static ipv4 /etc/hosts entry for xrd3:172.16.2.3
DEBU[0000] Adding static ipv6 /etc/hosts entry for xrd3:2001:db8:16:2::3
DEBU[0000] Dependencies:
xrd3 -> [  ]
crpd4 -> [  ]
linux5 -> [  ]
xrd2 -> [  ]
DEBU[0000] - cycle check round 1 -
crpd4 <- [  ]
linux5 <- [  ]
xrd2 <- [  ]
xrd3 <- [  ]
DEBU[0000] node creation graph is successfully validated as being acyclic
DEBU[0000] creating links...
DEBU[0000] Worker 2 received node: &{ShortName:crpd4 LongName:clab-automation-workshop-02-crpd4 Fqdn:crpd4.automation-workshop-02.io LabDir:/srv/clab/Getting_Started/clab-automation-workshop-02/crpd4 Index:0 Group: Kind:juniper_crpd StartupConfig:/srv/clab/Getting_Started/startup-config/crpd.conf StartupDelay:0 EnforceStartupConfig:false AutoRemove:0xc000bb99fa ResStartupConfig: Config:0xc000cba0a8 ResConfig: NodeType: Position: License:/srv/clab/Getting_Started/startup-config/license.key Image:crpd:23.1R1.8 ImagePullPolicy:IfNotPresent Sysctls:map[] User: Entrypoint: Cmd: Exec:[] Env:map[CLAB_INTFS:2 CLAB_LABEL_CLAB_NODE_GROUP: CLAB_LABEL_CLAB_NODE_KIND:juniper_crpd CLAB_LABEL_CLAB_NODE_LAB_DIR:/srv/clab/Getting_Started/clab-automation-workshop-02/crpd4 CLAB_LABEL_CLAB_NODE_NAME:crpd4 CLAB_LABEL_CLAB_NODE_TYPE: CLAB_LABEL_CLAB_TOPO_FILE:/srv/clab/Getting_Started/workshop02.clab.yml CLAB_LABEL_CONTAINERLAB:automation-workshop-02] Binds:[/srv/clab/Getting_Started/clab-automation-workshop-02/crpd4/config:/config /srv/clab/Getting_Started/clab-automation-workshop-02/crpd4/log:/var/log /srv/clab/Getting_Started/clab-automation-workshop-02/crpd4/config/sshd_config:/etc/ssh/sshd_config] PortBindings:map[22/tcp:[{HostIP: HostPort:2024}]] PortSet:map[22/tcp:{}] NetworkMode: MgmtNet: MgmtIntf: MgmtIPv4Address:172.16.2.4 MgmtIPv4PrefixLength:0 MgmtIPv6Address:2001:db8:16:2::4 MgmtIPv6PrefixLength:0 MgmtIPv4Gateway: MgmtIPv6Gateway: MacAddress: ContainerID: TLSCert: TLSKey: TLSAnchor: Certificate:<nil> NSPath: Publish:[] ExtraHosts:[crpd4:172.16.2.4 crpd4:2001:db8:16:2::4 linux5:172.16.2.5 linux5:2001:db8:16:2::5 xrd2:172.16.2.2 xrd2:2001:db8:16:2::2 xrd3:172.16.2.3 xrd3:2001:db8:16:2::3] Labels:map[clab-mgmt-net-bridge:br-5dc09b3d5a1e clab-node-group: clab-node-kind:juniper_crpd clab-node-lab-dir:/srv/clab/Getting_Started/clab-automation-workshop-02/crpd4 clab-node-name:crpd4 clab-node-type: clab-topo-file:/srv/clab/Getting_Started/workshop02.clab.yml containerlab:automation-workshop-02] Endpoints:[{Node:0xc000427500 EndpointName:eth1 MAC:aa:c1:ab:79:e8:1a} {Node:0xc000427500 EndpointName:eth2 MAC:aa:c1:ab:07:f4:31}] SANs:[] Sandbox: Kernel: Runtime: CPU:0 CPUSet: Memory: DeploymentStatus: Extras:<nil> WaitFor:[] DNS:<nil> IsRootNamespaceBased:false}
DEBU[0000] Worker 1 received node: &{ShortName:xrd3 LongName:clab-automation-workshop-02-xrd3 Fqdn:xrd3.automation-workshop-02.io LabDir:/srv/clab/Getting_Started/clab-automation-workshop-02/xrd3 Index:3 Group: Kind:cisco_xrd StartupConfig: StartupDelay:0 EnforceStartupConfig:false AutoRemove:0xc000457cae ResStartupConfig: Config:0xc000cba210 ResConfig: NodeType: Position: License: Image:ios-xr/xrd-control-plane:7.9.1 ImagePullPolicy:IfNotPresent Sysctls:map[] User: Entrypoint: Cmd: Exec:[] Env:map[CLAB_INTFS:3 CLAB_LABEL_CLAB_NODE_GROUP: CLAB_LABEL_CLAB_NODE_KIND:cisco_xrd CLAB_LABEL_CLAB_NODE_LAB_DIR:/srv/clab/Getting_Started/clab-automation-workshop-02/xrd3 CLAB_LABEL_CLAB_NODE_NAME:xrd3 CLAB_LABEL_CLAB_NODE_TYPE: CLAB_LABEL_CLAB_TOPO_FILE:/srv/clab/Getting_Started/workshop02.clab.yml CLAB_LABEL_CONTAINERLAB:automation-workshop-02] Binds:[/srv/clab/Getting_Started/clab-automation-workshop-02/xrd3/first-boot.cfg:/etc/xrd/first-boot.cfg /srv/clab/Getting_Started/clab-automation-workshop-02/xrd3/xr-storage:/xr-storage] PortBindings:map[22/tcp:[{HostIP: HostPort:2023}]] PortSet:map[22/tcp:{}] NetworkMode: MgmtNet: MgmtIntf: MgmtIPv4Address:172.16.2.3 MgmtIPv4PrefixLength:0 MgmtIPv6Address:2001:db8:16:2::3 MgmtIPv6PrefixLength:0 MgmtIPv4Gateway: MgmtIPv6Gateway: MacAddress: ContainerID: TLSCert: TLSKey: TLSAnchor: Certificate:<nil> NSPath: Publish:[] ExtraHosts:[crpd4:172.16.2.4 crpd4:2001:db8:16:2::4 linux5:172.16.2.5 linux5:2001:db8:16:2::5 xrd2:172.16.2.2 xrd2:2001:db8:16:2::2 xrd3:172.16.2.3 xrd3:2001:db8:16:2::3] Labels:map[clab-mgmt-net-bridge:br-5dc09b3d5a1e clab-node-group: clab-node-kind:cisco_xrd clab-node-lab-dir:/srv/clab/Getting_Started/clab-automation-workshop-02/xrd3 clab-node-name:xrd3 clab-node-type: clab-topo-file:/srv/clab/Getting_Started/workshop02.clab.yml containerlab:automation-workshop-02] Endpoints:[{Node:0xc0010a0000 EndpointName:Gi0-0-0-0 MAC:aa:c1:ab:e9:b2:3c} {Node:0xc0010a0000 EndpointName:Gi0-0-0-1 MAC:aa:c1:ab:49:22:0c} {Node:0xc0010a0000 EndpointName:Gi0-0-0-2 MAC:aa:c1:ab:76:4d:48}] SANs:[] Sandbox: Kernel: Runtime: CPU:0 CPUSet: Memory: DeploymentStatus: Extras:<nil> WaitFor:[] DNS:<nil> IsRootNamespaceBased:false}
DEBU[0000] Worker 0 received node: &{ShortName:linux5 LongName:clab-automation-workshop-02-linux5 Fqdn:linux5.automation-workshop-02.io LabDir:/srv/clab/Getting_Started/clab-automation-workshop-02/linux5 Index:1 Group: Kind:linux StartupConfig: StartupDelay:0 EnforceStartupConfig:false AutoRemove:0xc000456cfe ResStartupConfig: Config:0xc000cba120 ResConfig: NodeType: Position: License: Image:internet2/getting_started ImagePullPolicy:IfNotPresent Sysctls:map[net.ipv6.conf.all.disable_ipv6:0] User: Entrypoint: Cmd: Exec:[] Env:map[CLAB_INTFS:2 CLAB_LABEL_CLAB_NODE_GROUP: CLAB_LABEL_CLAB_NODE_KIND:linux CLAB_LABEL_CLAB_NODE_LAB_DIR:/srv/clab/Getting_Started/clab-automation-workshop-02/linux5 CLAB_LABEL_CLAB_NODE_NAME:linux5 CLAB_LABEL_CLAB_NODE_TYPE: CLAB_LABEL_CLAB_TOPO_FILE:/srv/clab/Getting_Started/workshop02.clab.yml CLAB_LABEL_CONTAINERLAB:automation-workshop-02 CX23_LAB_PASSWORD:Self-Nose-Reasonable-Dust-02] Binds:[] PortBindings:map[22/tcp:[{HostIP: HostPort:2025}]] PortSet:map[22/tcp:{}] NetworkMode: MgmtNet: MgmtIntf: MgmtIPv4Address:172.16.2.5 MgmtIPv4PrefixLength:0 MgmtIPv6Address:2001:db8:16:2::5 MgmtIPv6PrefixLength:0 MgmtIPv4Gateway: MgmtIPv6Gateway: MacAddress: ContainerID: TLSCert: TLSKey: TLSAnchor: Certificate:<nil> NSPath: Publish:[] ExtraHosts:[crpd4:172.16.2.4 crpd4:2001:db8:16:2::4 linux5:172.16.2.5 linux5:2001:db8:16:2::5 xrd2:172.16.2.2 xrd2:2001:db8:16:2::2 xrd3:172.16.2.3 xrd3:2001:db8:16:2::3] Labels:map[clab-mgmt-net-bridge:br-5dc09b3d5a1e clab-node-group: clab-node-kind:linux clab-node-lab-dir:/srv/clab/Getting_Started/clab-automation-workshop-02/linux5 clab-node-name:linux5 clab-node-type: clab-topo-file:/srv/clab/Getting_Started/workshop02.clab.yml containerlab:automation-workshop-02] Endpoints:[{Node:0xc000427c00 EndpointName:eth1 MAC:aa:c1:ab:10:36:b8} {Node:0xc000427c00 EndpointName:eth2 MAC:aa:c1:ab:51:c8:a6}] SANs:[] Sandbox: Kernel: Runtime: CPU:0 CPUSet: Memory: DeploymentStatus: Extras:<nil> WaitFor:[] DNS:<nil> IsRootNamespaceBased:false}
INFO[0000] Creating container: "linux5"
DEBU[0000] Worker 3 received node: &{ShortName:xrd2 LongName:clab-automation-workshop-02-xrd2 Fqdn:xrd2.automation-workshop-02.io LabDir:/srv/clab/Getting_Started/clab-automation-workshop-02/xrd2 Index:2 Group: Kind:cisco_xrd StartupConfig: StartupDelay:0 EnforceStartupConfig:false AutoRemove:0xc00045757f ResStartupConfig: Config:0xc000cba198 ResConfig: NodeType: Position: License: Image:ios-xr/xrd-control-plane:7.9.1 ImagePullPolicy:IfNotPresent Sysctls:map[] User: Entrypoint: Cmd: Exec:[] Env:map[CLAB_INTFS:3 CLAB_LABEL_CLAB_NODE_GROUP: CLAB_LABEL_CLAB_NODE_KIND:cisco_xrd CLAB_LABEL_CLAB_NODE_LAB_DIR:/srv/clab/Getting_Started/clab-automation-workshop-02/xrd2 CLAB_LABEL_CLAB_NODE_NAME:xrd2 CLAB_LABEL_CLAB_NODE_TYPE: CLAB_LABEL_CLAB_TOPO_FILE:/srv/clab/Getting_Started/workshop02.clab.yml CLAB_LABEL_CONTAINERLAB:automation-workshop-02] Binds:[/srv/clab/Getting_Started/clab-automation-workshop-02/xrd2/first-boot.cfg:/etc/xrd/first-boot.cfg /srv/clab/Getting_Started/clab-automation-workshop-02/xrd2/xr-storage:/xr-storage] PortBindings:map[22/tcp:[{HostIP: HostPort:2022}]] PortSet:map[22/tcp:{}] NetworkMode: MgmtNet: MgmtIntf: MgmtIPv4Address:172.16.2.2 MgmtIPv4PrefixLength:0 MgmtIPv6Address:2001:db8:16:2::2 MgmtIPv6PrefixLength:0 MgmtIPv4Gateway: MgmtIPv6Gateway: MacAddress: ContainerID: TLSCert: TLSKey: TLSAnchor: Certificate:<nil> NSPath: Publish:[] ExtraHosts:[crpd4:172.16.2.4 crpd4:2001:db8:16:2::4 linux5:172.16.2.5 linux5:2001:db8:16:2::5 xrd2:172.16.2.2 xrd2:2001:db8:16:2::2 xrd3:172.16.2.3 xrd3:2001:db8:16:2::3] Labels:map[clab-mgmt-net-bridge:br-5dc09b3d5a1e clab-node-group: clab-node-kind:cisco_xrd clab-node-lab-dir:/srv/clab/Getting_Started/clab-automation-workshop-02/xrd2 clab-node-name:xrd2 clab-node-type: clab-topo-file:/srv/clab/Getting_Started/workshop02.clab.yml containerlab:automation-workshop-02] Endpoints:[{Node:0xc000fd5500 EndpointName:Gi0-0-0-0 MAC:aa:c1:ab:8a:da:67} {Node:0xc000fd5500 EndpointName:Gi0-0-0-1 MAC:aa:c1:ab:cc:6b:cc} {Node:0xc000fd5500 EndpointName:Gi0-0-0-2 MAC:aa:c1:ab:1c:c1:c0}] SANs:[] Sandbox: Kernel: Runtime: CPU:0 CPUSet: Memory: DeploymentStatus: Extras:<nil> WaitFor:[] DNS:<nil> IsRootNamespaceBased:false}
DEBU[0000] generating config for node xrd3 from file
DEBU[0000] generating config for node crpd4 from file /srv/clab/Getting_Started/startup-config/crpd.conf
DEBU[0000] node 'crpd4' generated config: system {
    root-authentication {
        encrypted-password "$6$lB5c6$Zeud8c6IhCTE6hnZxXBl3ZMZTC2hOx9pxxYUWTHKW1oC32SATWLMH2EXarxWS5k685qMggUfFur1lq.o4p4cg1";
    }
    services {
        ssh {
            root-login allow;
        }
    }
}
interfaces {
    eth1 {
        unit 0 {
            description PeerA-Gi0/0/0/1;
            family inet {
                address 172.17.1.17/31;
            }
        }
    }
    eth2 {
        unit 0 {
            description DTN;
            family inet {
                address 20.20.20.20/24;
            }
        }
    }
    lo1 {
        unit 0 {
            description bgp-loopback;
            family inet {
                address 2.2.2.2/32;
            }
        }
    }
    lo100 {
        unit 0 {
            description dtn-network;
            family inet {
                address 20.20.20.1/24;
            }
        }
    }
}
routing-options {
    autonomous-system 22222;
    static {
        route 1.1.1.1/32 next-hop 172.17.1.16;
    }
}
protocols {
    bgp {
        group PEER-A {
            type external;
            peer-as 11111;
            neighbor 1.1.1.1;
        }
    }
}
DEBU[0000] generating config for node xrd2 from file
DEBU[0000] node 'xrd3' generated config: !
hostname xrd3
!
username clab
 group root-lr
 group cisco-support
 secret clab@123
!
grpc

 port 9339
 no-tls
 address-family dual
!
!
line default
  transport input ssh
!
netconf-yang agent
 ssh
!
interface MgmtEth0/RP0/CPU0/0

!
router static

 address-family ipv4 unicast
  0.0.0.0/0 MgmtEth0/RP0/CPU0/0 172.16.2.1
  !
 address-family ipv6 unicast
  ::/0 MgmtEth0/RP0/CPU0/0 2001:db8:16:2::1
  !
!
ssh server v2
ssh server netconf
end
INFO[0000] Creating container: "xrd3"
DEBU[0000] Writing sshd_config succeeded
DEBU[0000] node 'xrd2' generated config: !
hostname xrd2
!
username clab
 group root-lr
 group cisco-support
 secret clab@123
!
grpc

 port 9339
 no-tls
 address-family dual
!
!
line default
  transport input ssh
!
netconf-yang agent
 ssh
!
interface MgmtEth0/RP0/CPU0/0

!
router static

 address-family ipv4 unicast
  0.0.0.0/0 MgmtEth0/RP0/CPU0/0 172.16.2.1
  !
 address-family ipv6 unicast
  ::/0 MgmtEth0/RP0/CPU0/0 2001:db8:16:2::1
  !
!
ssh server v2
ssh server netconf
end
INFO[0000] Creating container: "xrd2"
DEBU[0000] CopyFile src /srv/clab/Getting_Started/startup-config/license.key -> dst /srv/clab/Getting_Started/clab-automation-workshop-02/crpd4/config/license/safenet/junos_sfnt.lic succeeded
INFO[0000] Creating container: "crpd4"
DEBU[0000] Container "xrd3" create response: {ID:736ae8d992ed430b0fd7aa39ef06d2d34ea7fc813103ee72678f62d6b5451b0e Warnings:[]}
DEBU[0000] Start container: "clab-automation-workshop-02-xrd3"
DEBU[0000] Container "crpd4" create response: {ID:89ab45b9d536762b356addf61f35d36fc8f291ea63b6be72a13f82196993efc2 Warnings:[]}
DEBU[0000] Container "xrd2" create response: {ID:d08c3a3a15add8b5ea920aed5095c93d3f0c7f2340ec532d0d6069a911ab661b Warnings:[]}
DEBU[0000] Start container: "clab-automation-workshop-02-crpd4"
DEBU[0000] Start container: "clab-automation-workshop-02-xrd2"
DEBU[0000] Container "linux5" create response: {ID:d7005fcd557ca896658cac314eb92783515f609d3d68ba781c0b9ddfe977fa93 Warnings:[]}
DEBU[0000] Start container: "clab-automation-workshop-02-linux5"
DEBU[0000] Container started: "clab-automation-workshop-02-xrd3"
DEBU[0000] Worker 1 terminating...
DEBU[0001] Container started: "clab-automation-workshop-02-xrd2"
DEBU[0001] Worker 3 terminating...
DEBU[0001] Container started: "clab-automation-workshop-02-crpd4"
DEBU[0001] Worker 2 terminating...
DEBU[0001] Container started: "clab-automation-workshop-02-linux5"
DEBU[0001] Worker 0 terminating...
DEBU[0001] Link worker 1 received link: link [linux5:eth1, xrd2:Gi0-0-0-2]
INFO[0001] Creating virtual wire: linux5:eth1 <--> xrd2:Gi0-0-0-2
DEBU[0001] Link worker 3 received link: link [linux5:eth2, xrd3:Gi0-0-0-2]
INFO[0001] Creating virtual wire: linux5:eth2 <--> xrd3:Gi0-0-0-2
DEBU[0001] Link worker 2 received link: link [xrd2:Gi0-0-0-0, xrd3:Gi0-0-0-0]
INFO[0001] Creating virtual wire: xrd2:Gi0-0-0-0 <--> xrd3:Gi0-0-0-0
DEBU[0001] Link worker 4 received link: link [xrd2:Gi0-0-0-1, crpd4:eth1]
INFO[0001] Creating virtual wire: xrd2:Gi0-0-0-1 <--> crpd4:eth1
DEBU[0001] Link worker 0 received link: link [xrd3:Gi0-0-0-1, crpd4:eth2]
INFO[0001] Creating virtual wire: xrd3:Gi0-0-0-1 <--> crpd4:eth2
DEBU[0001] Link worker 0 terminating...
DEBU[0001] Link worker 3 terminating...
DEBU[0001] Link worker 4 terminating...
DEBU[0001] Link worker 1 terminating...
DEBU[0001] Link worker 2 terminating...
DEBU[0001] containers created, retrieving state and IP addresses...
DEBU[0001] Filter key: name, filter value: ^clab-automation-workshop-02-xrd2$
DEBU[0001] Filter key: name, filter value: ^clab-automation-workshop-02-xrd3$
DEBU[0001] Filter key: name, filter value: ^clab-automation-workshop-02-crpd4$
DEBU[0001] Filter key: name, filter value: ^clab-automation-workshop-02-linux5$
DEBU[0001] Exported topology data using /etc/containerlab/templates/export/auto.tmpl template
DEBU[0001] Running postdeploy actions for CRPD "crpd4" node
DEBU[0001] Running postdeploy actions for Linux 'linux5' node
DEBU[0001] /clab-automation-workshop-02-crpd4 exec created clab-automation-workshop-02-crpd4
DEBU[0001] /clab-automation-workshop-02-crpd4 exec attached clab-automation-workshop-02-crpd4
ERRO[0001] failed to run postdeploy task for node crpd4: crpd post-deploy failed: ssh: unrecognized service
DEBU[0001] Filter key: name, filter value: ^clab-automation-workshop-02-linux5$
DEBU[0001] Filter key: name, filter value: ^clab-automation-workshop-02-xrd2$
DEBU[0001] Filter key: name, filter value: ^clab-automation-workshop-02-xrd3$
DEBU[0001] Filter key: name, filter value: ^clab-automation-workshop-02-crpd4$
INFO[0001] Adding containerlab host entries to /etc/hosts file
+---+------------------------------------+--------------+--------------------------------+--------------+---------+---------------+---------------------+
| # |                Name                | Container ID |             Image              |     Kind     |  State  | IPv4 Address  |    IPv6 Address     |
+---+------------------------------------+--------------+--------------------------------+--------------+---------+---------------+---------------------+
| 1 | clab-automation-workshop-02-crpd4  | 89ab45b9d536 | crpd:23.1R1.8                  | juniper_crpd | running | 172.16.2.4/24 | 2001:db8:16:2::4/80 |
| 2 | clab-automation-workshop-02-linux5 | d7005fcd557c | internet2/getting_started      | linux        | running | 172.16.2.5/24 | 2001:db8:16:2::5/80 |
| 3 | clab-automation-workshop-02-xrd2   | d08c3a3a15ad | ios-xr/xrd-control-plane:7.9.1 | cisco_xrd    | running | 172.16.2.2/24 | 2001:db8:16:2::2/80 |
| 4 | clab-automation-workshop-02-xrd3   | 736ae8d992ed | ios-xr/xrd-control-plane:7.9.1 | cisco_xrd    | running | 172.16.2.3/24 | 2001:db8:16:2::3/80 |
+---+------------------------------------+--------------+--------------------------------+--------------+---------+---------------+---------------------+
hellt commented 1 year ago

Hi @karlnewell I think we saw that and it's likely due to changed license initin crpd v22+

Can you check this thread for a workaround? https://discord.com/channels/860500297297821756/865572929601142845/1045670601622294592

This is from our discord https://containerlab.dev/community/#discord

karlnewell commented 1 year ago

Thanks, we'll use that workaround for now. When I have some time, I'll see if I can troubleshoot the cRPD init to figure out why it's deleting the contents of the license file.

karlnewell commented 1 year ago

For reference. It looks like something is also copying the file to /tmp so adding an exec to a cRPD node or kind loads the license file on startup.

topology:
  kinds:
    juniper_crpd:
      license: license.txt
      exec:
        - cli request system license add tmp/junos_sfnt_tmp.lic
steiler commented 1 year ago

Can we close this and track the implementation in #1350?

hellt commented 1 year ago

yes, we can do that. @karlnewell if you are interested in the progress you can subscribe to updates for #1350. Good that workaround is "working", but eventually we will make it right.