Skip to content

Updates and fixes for upcoming Bullseye changes #8883

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

saiarcot895
Copy link
Contributor

  • Update the repos used for Bullseye (adding in support for bullseye-security, and adding support for armhf and arm64)
  • Use a newer version of iproute2 (to get around a future compatibility issue with the 5.10 kernel)
  • Make a inline-python command compatible with both Python 2 and 3

Why I did it

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

Update the repos for amd64, and add support for at least arm64.

Signed-off-by: Saikrishna Arcot <[email protected]>
The common startup script used for SONiC containers is calling an inline
python command that uses Python 2 syntax, and thus errors out when run
with Python 3. Make this work with Python 3.

Signed-off-by: Saikrishna Arcot <[email protected]>
There is an issue discovered by Alexander Allen where manually removing
an interface from a vlan doesn't appear to fully remove it from the
vlan. If the `bridge vlan del` command (from iproute2 version 4.20) is
used to manually remove an interface from a vlan, then running `bridge
vlan show` afterwards still lists that interface, but with no vlan ID,
suggesting it's not fully removed from that vlan. Using the `bridge`
command from iproute version 5.10 removes it cleanly, suggesting that
it's some issue between the iproute2 4.20 package and the 5.10 kernel.

To fix this issue, in all Buster-based docker containers, use iproute2
5.10 from the backports section of Buster. This ensures that all of the
containers have a fully functional version of iproute2 available.

Working test case:

```
admin@vlab-01:~$ sudo config vlan add 50
admin@vlab-01:~$ sudo config vlan member add 50 Ethernet4
admin@vlab-01:~$ sudo bridge vlan show dev Ethernet4
port              vlan-id
Ethernet4         50
admin@vlab-01:~$ docker exec -it swss bash
root@vlab-01:/# apt-cache policy iproute2
iproute2:
  Installed: 5.10.0-4~bpo10+1
  Candidate: 5.10.0-4~bpo10+1
  Version table:
 *** 5.10.0-4~bpo10+1 100
        100 http://debian-archive.trafficmanager.net/debian buster-backports/main amd64 Packages
        100 http://packages.trafficmanager.net/debian/debian buster-backports/main amd64 Packages
        100 /var/lib/dpkg/status
     5.9.0-1~bpo10+1 100
        100 http://packages.trafficmanager.net/debian/debian buster-backports/main amd64 Packages
     4.20.0-2+deb10u1 500
        500 http://debian-archive.trafficmanager.net/debian buster/main amd64 Packages
        500 http://packages.trafficmanager.net/debian/debian buster/main amd64 Packages
     4.20.0-2 500
        500 http://packages.trafficmanager.net/debian/debian buster/main amd64 Packages
root@vlab-01:/# bridge vlan del vid 50 dev Ethernet4
root@vlab-01:/# bridge vlan show dev Ethernet4
port              vlan-id
root@vlab-01:/#
```

Signed-off-by: Saikrishna Arcot <[email protected]>
net-tools \
# for processing/handling json files in bash environment
jq \
# for sairedis zmq rpc channel
libzmq5

# Install 5.10 version of iproute2 from backports
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5.10

Do you mean ">= 5.10" ?

@qiluo-msft
Copy link
Collaborator

Use a newer version of iproute2 (to get around a future compatibility issue with the 5.10 kernel)

Could you explain the "future compatibility issue" ?

@saiarcot895
Copy link
Contributor Author

Use a newer version of iproute2 (to get around a future compatibility issue with the 5.10 kernel)

Could you explain the "future compatibility issue" ?

Hmm, I thought my changes fixed the issue, but taking another look at it, there's more to it.

Assume that Ethernet0 currently belongs to VLAN 50. On a 5.10 kernel, when manually removing an interface from a VLAN with tools from iproute2 4.19 (the version of iproute2 that would be present in the swss docker), it doesn't look like that VLAN membership is fully removed/cleaned up. Instead, the output of the bridge command inside the swss docker (after removing the VLAN membership using bridge vlan del vid 50 dev Ethernet0) looks like the following:

root@vlab-01:/# bridge vlan show dev Ethernet0
port    vlan ids
Ethernet0
root@vlab-01:/# show ip ^C
root@vlab-01:/# ip link show dev Ethernet0
42: Ethernet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9100 qdisc mq master Bridge state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff

The interface is still assigned to the master Bridge, but because there's no None in the output, vlanmgr won't actually remove the master based on the current code.

When running the bridge vlan show command on the host, with iproute2 5.10, there's no reference to Ethernet0:

root@vlab-01:/home/admin# bridge vlan show dev Ethernet0
port              vlan-id

I took this to mean some interpretation issue with the iproute2 4.19 package and the information that the 5.10 kernel gives it, but the actual issue is that on the 5.10 kernel, iproute2 4.19 won't show the None in the output (on the 4.19 kernel, it does show None), and iproute2 5.10 won't show the interface at all. Additionally, Ethernet0 still has a master bridge assigned to it; this should've been cleaned up.

This leads me to think that vlanmgr's code may need to be changed here instead.

@saiarcot895
Copy link
Contributor Author

The VLAN/bridge issue will be handled in sonic-net/sonic-swss#1970. Once that is merged, I'll update this PR.

@saiarcot895 saiarcot895 marked this pull request as draft October 19, 2021 18:57
@saiarcot895
Copy link
Contributor Author

Closing this PR since #8191 will be bringing in these changes in a few days.

@saiarcot895 saiarcot895 deleted the bullseye-master-updates branch March 7, 2022 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants