Closed tommiyau closed 2 years ago
To be able to get the container to execute and for the logs to look correct this needs to have a volume mount to a topology file to run. learn.srlinux.dev and the official nokia documentation appears to be incorrect. I suspect that teh authorized keys may need to be set as well to actually ssh into the router.
need to map a volume to the topology file else the container does not run.
docker run -t -d --rm --privileged \ -u $(id -u):$(id -g) \ -v /my/topo/topology.xml:/tmp/topology.yml:ro \ --name srlinux ghcr.io/nokia/srlinux \ sudo bash /opt/srlinux/bin/sr_linux
I used a dump of a router from container lab for the topo. cat /my/topo/topology.xml
chassis_configuration: "chassis_type": 65 "base_mac": "1a:b0:00:00:00:00" "cpm_card_type": 176
slot_configuration: 1: "card_type": 176 "mda_type": 195 # imm48-25g-sfp28+8-100g-qsfp28
logs after the mount
Mon Jun 13 05:49:57 UTC 2022: entrypoint.sh called
Mon Jun 13 05:49:57 UTC 2022: renaming docker interface eth0 to mgmt0
Mon Jun 13 05:49:57 UTC 2022: turning off checksum offloading on mgmt0
Actual changes:
rx-checksumming: off
tx-checksumming: off
tx-checksum-ip-generic: off
tx-checksum-sctp: off
tcp-segmentation-offload: off
tx-tcp-segmentation: off [requested on]
tx-tcp-ecn-segmentation: off [requested on]
tx-tcp-mangleid-segmentation: off [requested on]
tx-tcp6-segmentation: off [requested on]
Mon Jun 13 05:49:57 UTC 2022: starting sshd
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
Mon Jun 13 05:49:57 UTC 2022: Calling boot_run script
/opt/srlinux/bin/bootscript/05_sr_createuser.sh: line 270: !srl_is_running_on_nokia_rootfs: command not found
/opt/srlinux/bin/bootscript/05_sr_createuser.sh: line 282: python: command not found
chmod: missing operand after '0666'
Try 'chmod --help' for more information.
/usr/bin/find: '/var/log/srlinux/file': No such file or directory
logmgr_set_env.sh: plain_bootup_start
Mon Jun 13 05:49:58 UTC 2022 logmgr_set_env.sh: restart of rsyslogd
Failed to set capabilities on file `/usr/sbin/tcpdump' (No such file or directory)
usage: setcap [-q] [-v] [-n
Note
the culprit is in disabling tx offload on the docker bridge, as srlinux validates crc checksums in incoming packets
what you need to do is the following
sudo ethtool --offload docker0 tx off
- to disable tx offload on a default docker bridge and then you deploy a container
docker run -t -d -v $(pwd)/topology.yml:/tmp/topology.yml --rm --privileged \
-u $(id -u):$(id -g) \
--name srlinux ghcr.io/nokia/srlinux:21.11.3 \
sudo bash /opt/srlinux/bin/sr_linux
the topology.yml
file that I used in the example above is
chassis_configuration:
"chassis_type": 72
"base_mac": "1a:b0:00:00:00:00"
"cpm_card_type": 187
slot_configuration:
1:
"card_type": 187
"mda_type": 200
Give it a go
I will update learn.srlinux.dev with these clarifications
docker run -d -t --privileged -u $(id -u):$(id -g) --name srlinux ghcr.io/nokia/srlinux sudo bash /opt/srlinux/bin/sr_linux
fails to run.
Logs state following
Mon Jun 13 05:12:58 UTC 2022: entrypoint.sh called Mon Jun 13 05:12:58 UTC 2022: renaming docker interface eth0 to mgmt0 Mon Jun 13 05:12:59 UTC 2022: turning off checksum offloading on mgmt0 Actual changes: rx-checksumming: off tx-checksumming: off tx-checksum-ip-generic: off tx-checksum-sctp: off tcp-segmentation-offload: off tx-tcp-segmentation: off [requested on] tx-tcp-ecn-segmentation: off [requested on] tx-tcp-mangleid-segmentation: off [requested on] tx-tcp6-segmentation: off [requested on] Mon Jun 13 05:12:59 UTC 2022: starting sshd ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519 Mon Jun 13 05:12:59 UTC 2022: Calling boot_run script /opt/srlinux/bin/bootscript/05_sr_createuser.sh: line 270: !srl_is_running_on_nokia_rootfs: command not found /opt/srlinux/bin/bootscript/05_sr_createuser.sh: line 282: python: command not found chmod: missing operand after '0666' Try 'chmod --help' for more information. /usr/bin/find: '/var/log/srlinux/file': No such file or directory logmgr_set_env.sh: plain_bootup_start Mon Jun 13 05:13:00 UTC 2022 logmgr_set_env.sh: restart of rsyslogd Failed to set capabilities on file `/usr/sbin/tcpdump' (No such file or directory) usage: setcap [-q] [-v] [-n] (-r|-|) [ ... (-r|-|) ]
Note must be a regular (non-symlink) file.
Mon Jun 13 05:13:00 UTC 2022: entrypoint.sh done, executing sudo bash /opt/srlinux/bin/sr_linux
No/Invalid license found!
Not starting in a named namespace, giving it the name "srbase"
Unix domain socket directory is /opt/srlinux/var/run/
Log directory is /var/log/srlinux/stdout
Started supportd: source /etc/profile.d/sr_app_env.sh &>/dev/null; bash -c "./sr_supportd --server-mode" >/var/log/srlinux/stdout/supportd.log 2>&1 &
Application supportd is running: PID 1384
Started dev_mgr: source /etc/profile.d/sr_app_env.sh &>/dev/null; bash -c "./sr_device_mgr" >/var/log/srlinux/stdout/dev_mgr.log 2>&1 &
Application dev_mgr is running: PID 1405
Found dev_mgr: PID 1405 - killing
Found supportd: PID 1384 - killing
Failed to kill supportd: PID 1384. Another kill is retried