hellt / vrnetlab

Make VM-based Network OSes run in Containerlab
https://containerlab.dev
MIT License
129 stars 88 forks source link

Seeing issues with nic_provision_delay with v0.18.0 #226

Closed KramKroc closed 4 months ago

KramKroc commented 4 months ago

Getting the following errors in make docker-image when building Cisco xrv9k images:

2024-07-09 13:30:14,665: vrnetlab   INFO     Starting XRV_vm
2024-07-09 13:30:14,668: vrnetlab   DEBUG    number of provisioned data plane interfaces is 0
Traceback (most recent call last):
  File "/launch.py", line 369, in <module>
    vr.install()
  File "/vrnetlab.py", line 720, in install
    vm.work()
  File "/vrnetlab.py", line 532, in work
    self.check_qemu()
  File "/vrnetlab.py", line 546, in check_qemu
    self.start()
  File "/vrnetlab.py", line 205, in start
    cmd.extend(self.gen_nics())
  File "/vrnetlab.py", line 402, in gen_nics
    self.nic_provision_delay()
  File "/vrnetlab.py", line 330, in nic_provision_delay
    if self.min_nics:
AttributeError: 'XRV_vm' object has no attribute 'min_nics'
sha256:45380d2d84f6683aaf763e567302d3250a2c4e69cbd66a5ac9e878445e52dbc4
d8b43bb794311b5ca1936eb321e0ab94296559d4723012121c14488aaa5d443b

Tried this on the following xrv9k versions of the qcow2 file:

When starting the images, similar issues are logged:

docker logs -f c8ebea234f1e
2024-07-09 13:27:54,062: launch     DEBUG    Environment variables: environ({'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'HOSTNAME': 'xrv9k', 'TERM': 'xterm', 'DOCKER_NET_V6_ADDR': '2001:172:20:20::/64', 'CONNECTION_MODE': 'tc', 'CLAB_LABEL_CLAB_TOPO_FILE': '/home/cntrlab/xrv9k/vr04.clab.yml', 'CLAB_INTFS': '0', 'CLAB_LABEL_CONTAINERLAB': 'vr04', 'CLAB_LABEL_CLAB_NODE_KIND': 'cisco_xrv9k', 'PASSWORD': 'clab@123', 'DOCKER_NET_V4_ADDR': '172.20.20.0/24', 'RAM': '16384', 'USERNAME': 'clab', 'CLAB_LABEL_CLAB_NODE_NAME': 'xrv9k', 'VCPU': '2', 'CLAB_LABEL_CLAB_NODE_TYPE': '', 'CLAB_LABEL_CLAB_NODE_GROUP': '', 'CLAB_LABEL_CLAB_NODE_LAB_DIR': '/home/cntrlab/xrv9k/clab-vr04/xrv9k', 'HOME': '/root', 'LC_CTYPE': 'C.UTF-8'})
2024-07-09 13:27:54,062: vrnetlab   DEBUG    Creating overlay disk image
2024-07-09 13:27:54,085: vrnetlab   DEBUG    Starting vrnetlab XRV
2024-07-09 13:27:54,085: vrnetlab   DEBUG    VMs: [<__main__.XRV_vm object at 0x7f2bc05d10a0>]
2024-07-09 13:27:54,104: vrnetlab   DEBUG    VM not started; starting!
2024-07-09 13:27:54,105: vrnetlab   INFO     Starting XRV_vm
2024/07/09 13:27:54 socat[20] E bind(5, {AF=2 0.0.0.0:57400}, 16): Address already in use
2024-07-09 13:27:54,108: vrnetlab   DEBUG    number of provisioned data plane interfaces is 0
Traceback (most recent call last):
  File "/launch.py", line 380, in <module>
    vr.start()
  File "/vrnetlab.py", line 684, in start
    vm.work()
  File "/vrnetlab.py", line 532, in work
    self.check_qemu()
  File "/vrnetlab.py", line 546, in check_qemu
    self.start()
  File "/vrnetlab.py", line 205, in start
    cmd.extend(self.gen_nics())
  File "/vrnetlab.py", line 402, in gen_nics
    self.nic_provision_delay()
  File "/vrnetlab.py", line 330, in nic_provision_delay
2024/07/09 13:27:54 socat[23] E bind(5, {AF=2 0.0.0.0:57400}, 16): Address already in use
    if self.min_nics:
AttributeError: 'XRV_vm' object has no attribute 'min_nics'
kaelemc commented 4 months ago

Thanks for catching this.

I have made the fix in #227.

In future when using vrnetlab please make sure to perform git checkout to the latest release as per the install instructions. It most likely prevents issues from new changes affecting you, which means less headache for you :)

hellt commented 4 months ago

the fix has been published as v0.18.1

Thanks @KramKroc