kernelkit / infix

Linux :yellow_heart: NETCONF = Infix
https://kernelkit.org
GNU General Public License v2.0
52 stars 12 forks source link

CLI 'show interface' no longer show bridge and its ports #618

Closed jovatn closed 2 months ago

jovatn commented 2 months ago

Current Behavior

Running qemu.sh from the Infix 24.08.0 x86 tar-ball, by default provides a single Ethernet interface 'e1'. Creating a bridge (br0) and adding e1 as a bridge-port of br0 seems to work fine at first, but "show interface" do not list either br0 or e1.

admin@infix-00-00-00:/> show interfaces 
INTERFACE       PROTOCOL   STATE       DATA                                     
lo              ethernet   UP          00:00:00:00:00:00                        
                ipv4                   127.0.0.1/8 (static)
                ipv6                   ::1/128 (static)
e1              ethernet   UP          02:00:00:00:00:01                        
                ipv6                   fe80::ff:fe00:1/64 (link-layer)
                ipv6                   fec0::ff:fe00:1/64 (link-layer)
admin@infix-00-00-00:/> configure 
admin@infix-00-00-00:/config/> edit interface br0
admin@infix-00-00-00:/config/interface/br0/> set ipv6 enabled 
admin@infix-00-00-00:/config/interface/br0/> up
admin@infix-00-00-00:/config/> set interface e1 bridge-port bridge br0
admin@infix-00-00-00:/config/> leave
admin@infix-00-00-00:/> show interfaces 
INTERFACE       PROTOCOL   STATE       DATA                                     
lo              ethernet   UP          00:00:00:00:00:00                        
                ipv4                   127.0.0.1/8 (static)
                ipv6                   ::1/128 (static)
admin@infix-00-00-00:/>

br0 and e1 are both shown in Linux shell, though.

admin@infix-00-00-00:/> exit
admin@infix-00-00-00:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UP group iface qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host proto static lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host proto static 
       valid_lft forever preferred_lft forever
2: e1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP group default qlen 1000
    link/ether 02:00:00:00:00:01 brd ff:ff:ff:ff:ff:ff
3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 02:00:00:00:00:01 brd ff:ff:ff:ff:ff:ff
    inet6 fec0::ff:fe00:1/64 scope site dynamic mngtmpaddr proto kernel_ra 
       valid_lft 86164sec preferred_lft 14164sec
    inet6 fe80::50dd:c2ff:fedc:a881/64 scope link proto kernel_ll 
       valid_lft forever preferred_lft forever
admin@infix-00-00-00:~$ ^C
admin@infix-00-00-00:~$ 

Expected Behavior

Doing the same with Infix 24.06.0 works as expected.

admin@infix-00-00-00:/> show interfaces 
INTERFACE       PROTOCOL   STATE       DATA                                     
e1              ethernet   UP          02:00:00:00:00:01                        
                ipv6                   fe80::ff:fe00:1/64 (link-layer)
                ipv6                   fec0::ff:fe00:1/64 (link-layer)
lo              ethernet   UP          00:00:00:00:00:00                        
                ipv4                   127.0.0.1/8 (static)
                ipv6                   ::1/128 (static)
admin@infix-00-00-00:/> configure 
admin@infix-00-00-00:/config/> edit interface br0
admin@infix-00-00-00:/config/interface/br0/> set ipv6 enabled 
admin@infix-00-00-00:/config/interface/br0/> up
admin@infix-00-00-00:/config/> set interface e1 bridge-port bridge br0
admin@infix-00-00-00:/config/> leave
admin@infix-00-00-00:/> show interfaces 
INTERFACE       PROTOCOL   STATE       DATA                                     
br0             bridge                 
│               ethernet   UP          02:00:00:00:00:01                        
│               ipv6                   fe80::b04b:68ff:fe3b:4eef/64 (link-layer)
│               ipv6                   fec0::ff:fe00:1/64 (link-layer)
└ e1            bridge     FORWARDING  
lo              ethernet   UP          00:00:00:00:00:00                        
                ipv4                   127.0.0.1/8 (static)
                ipv6                   ::1/128 (static)
admin@infix-00-00-00:/> 

Steps To Reproduce

Download Infix 24.08.0 for x86 and unpack.

PC:/tmp/infix-x86_64-24.08.0 $ ./qemu.sh 
Starting Qemu  ::  Ctrl-a x -- exit | Ctrl-a c -- toggle console/monitor
● ● ●  Infix -- a Network Operating System v24.08.0 ════════════════════
...
[ OK ] Verifying self-signed https certificate
[ OK ] Starting Status daemon

Infix -- a Network Operating System v24.08.0 (hvc0)
infix-00-00-00 login: admin
Password: 
.-------.
|  . .  | Infix -- a Network Operating System
|-. v .-| https://kernelkit.org
'-'---'-'

Run the command 'cli' for interactive OAM

admin@infix-00-00-00:~$ cli

See the 'help' command for an introduction to the system

admin@infix-00-00-00:/> show interfaces 
INTERFACE       PROTOCOL   STATE       DATA                                     
lo              ethernet   UP          00:00:00:00:00:00                        
                ipv4                   127.0.0.1/8 (static)
                ipv6                   ::1/128 (static)
e1              ethernet   UP          02:00:00:00:00:01                        
                ipv6                   fe80::ff:fe00:1/64 (link-layer)
                ipv6                   fec0::ff:fe00:1/64 (link-layer)
admin@infix-00-00-00:/> con
 configure container
admin@infix-00-00-00:/> configure 
admin@infix-00-00-00:/config/> edit interface br0
admin@infix-00-00-00:/config/interface/br0/> set ipv6 enabled 
admin@infix-00-00-00:/config/interface/br0/> up
admin@infix-00-00-00:/config/> set interface e1 bridge-port bridge br0
admin@infix-00-00-00:/config/> leave
admin@infix-00-00-00:/> show interfaces 
INTERFACE       PROTOCOL   STATE       DATA                                     
lo              ethernet   UP          00:00:00:00:00:00                        
                ipv4                   127.0.0.1/8 (static)
                ipv6                   ::1/128 (static)
admin@infix-00-00-00:/> 

Additional information

Some syslog output below, perhaps it helps.

Sep 11 09:04:59 infix-00-00-00 klishd[3347]: Service process for client was forked: 3395
Sep 11 09:04:59 infix-00-00-00 klishd[3395]: user "admin" starting interactive sysrepo session.
Sep 11 09:05:41 infix-00-00-00 klishd[3395]: user "admin" commiting changes to running ...
Sep 11 09:05:42 infix-00-00-00 avahi-daemon[3364]: Interface e1.IPv6 no longer relevant for mDNS.
Sep 11 09:05:42 infix-00-00-00 avahi-daemon[3364]: Leaving mDNS multicast group on interface e1.IPv6 with address fec0::ff:fe00:1.
Sep 11 09:05:42 infix-00-00-00 avahi-daemon[3364]: Withdrawing address record for fec0::ff:fe00:1 on e1.
Sep 11 09:05:42 infix-00-00-00 kernel: 8021q: adding VLAN 0 to HW filter on device e1
Sep 11 09:05:42 infix-00-00-00 kernel: br0: port 1(e1) entered blocking state
Sep 11 09:05:42 infix-00-00-00 kernel: br0: port 1(e1) entered disabled state
Sep 11 09:05:42 infix-00-00-00 kernel: virtio_net virtio2 e1: entered allmulticast mode
Sep 11 09:05:42 infix-00-00-00 kernel: virtio_net virtio2 e1: entered promiscuous mode
Sep 11 09:05:42 infix-00-00-00 kernel: br0: port 1(e1) entered blocking state
Sep 11 09:05:42 infix-00-00-00 kernel: br0: port 1(e1) entered forwarding state
Sep 11 09:05:42 infix-00-00-00 dagger[2919]: Evolved to generation 1
Sep 11 09:05:42 infix-00-00-00 klishd[3395]: user "admin" committed changes to running.
Sep 11 09:05:43 infix-00-00-00 avahi-daemon[3364]: Joining mDNS multicast group on interface br0.IPv6 with address fe80::50dd:c2ff:fedc:a881.
Sep 11 09:05:43 infix-00-00-00 avahi-daemon[3364]: New relevant interface br0.IPv6 for mDNS.
Sep 11 09:05:43 infix-00-00-00 avahi-daemon[3364]: Registering new address record for fe80::50dd:c2ff:fedc:a881 on br0.*.
Sep 11 09:05:44 infix-00-00-00 yanger[3853]: Command '['mctl', 'show', 'igmp', 'json']' returned non-zero exit status 1.
Sep 11 09:05:44 infix-00-00-00 statd[3288]: Error, running yanger
Sep 11 09:05:44 infix-00-00-00 statd[3288]: Traceback (most recent call last):
Sep 11 09:05:44 infix-00-00-00 statd[3288]:   File "/usr/libexec/statd/yanger", line 8, in <module>
Sep 11 09:05:44 infix-00-00-00 statd[3288]:     sys.exit(main())
Sep 11 09:05:44 infix-00-00-00 statd[3288]:              ^^^^^^
Sep 11 09:05:44 infix-00-00-00 statd[3288]:   File "/usr/lib/python3.11/site-packages/yanger/yanger.py", line 883, in main
Sep 11 09:05:44 infix-00-00-00 statd[3288]:   File "/usr/lib/python3.11/site-packages/yanger/yanger.py", line 577, in add_ip_link
Sep 11 09:05:44 infix-00-00-00 statd[3288]:   File "/usr/lib/python3.11/site-packages/yanger/yanger.py", line 531, in get_brport_multicast
Sep 11 09:05:44 infix-00-00-00 statd[3288]:   File "/usr/lib/python3.11/site-packages/yanger/yanger.py", line 128, in run_json_cmd
Sep 11 09:05:44 infix-00-00-00 statd[3288]:   File "/usr/lib/python3.11/subprocess.py", line 571, in run
Sep 11 09:05:44 infix-00-00-00 statd[3288]: subprocess.CalledProcessError: Command '['mctl', 'show', 'igmp', 'json']' returned non-zero exit status 1.
Sep 11 09:05:44 infix-00-00-00 yanger[3858]: Command '['mctl', '-p', 'show', 'igmp', 'json']' returned non-zero exit status 1.
Sep 11 09:05:44 infix-00-00-00 statd[3288]: Traceback (most recent call last):
Sep 11 09:05:44 infix-00-00-00 statd[3288]:   File "/usr/libexec/statd/yanger", line 8, in <module>
Sep 11 09:05:44 infix-00-00-00 statd[3288]:     sys.exit(main())
Sep 11 09:05:44 infix-00-00-00 statd[3288]:              ^^^^^^
Sep 11 09:05:44 infix-00-00-00 statd[3288]:   File "/usr/lib/python3.11/site-packages/yanger/yanger.py", line 891, in main
Sep 11 09:05:44 infix-00-00-00 statd[3288]:   File "/usr/lib/python3.11/site-packages/yanger/yanger.py", line 128, in run_json_cmd
Sep 11 09:05:44 infix-00-00-00 statd[3288]:   File "/usr/lib/python3.11/subprocess.py", line 571, in run
Sep 11 09:05:44 infix-00-00-00 statd[3288]: subprocess.CalledProcessError: Command '['mctl', '-p', 'show', 'igmp', 'json']' returned non-zero exit status 1.
Sep 11 09:05:44 infix-00-00-00 statd[3288]: Error, running yanger
Sep 11 09:05:45 infix-00-00-00 avahi-daemon[3364]: Leaving mDNS multicast group on interface br0.IPv6 with address fe80::50dd:c2ff:fedc:a881.
Sep 11 09:05:45 infix-00-00-00 avahi-daemon[3364]: Joining mDNS multicast group on interface br0.IPv6 with address fec0::ff:fe00:1.
Sep 11 09:05:45 infix-00-00-00 avahi-daemon[3364]: Registering new address record for fec0::ff:fe00:1 on br0.*.
Sep 11 09:05:45 infix-00-00-00 avahi-daemon[3364]: Withdrawing address record for fe80::50dd:c2ff:fedc:a881 on br0.
Sep 11 09:09:56 infix-00-00-00 kernel: EXT4-fs (vda): error count since last fsck: 1
Sep 11 09:09:56 infix-00-00-00 kernel: EXT4-fs (vda): initial error at time 1726045442: __ext4_new_inode:1278
Sep 11 09:09:56 infix-00-00-00 kernel: EXT4-fs (vda): last error at time 1726045442: __ext4_new_inode:1278
Sep 11 09:12:50 infix-00-00-00 klishd[3395]: user "admin" leaving sysrepo session.
troglobit commented 2 months ago

Reproduced on main @ 1f74ebf82:

admin@ix-00-00-00:/> configure 
admin@ix-00-00-00:/config/> edit interface br0
admin@ix-00-00-00:/config/interface/br0/> end
admin@ix-00-00-00:/config/> set interface e1 bridge-port bridge br0
admin@ix-00-00-00:/config/> leave
admin@ix-00-00-00:/> show interfaces 
INTERFACE       PROTOCOL   STATE       DATA                                     
lo              ethernet   UP          00:00:00:00:00:00                        
                ipv4                   127.0.0.1/8 (static)
                ipv6                   ::1/128 (static)