Skip to content
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

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

Closed
jovatn opened this issue Sep 11, 2024 · 1 comment · Fixed by #620
Closed

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

jovatn opened this issue Sep 11, 2024 · 1 comment · Fixed by #620
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jovatn
Copy link
Contributor

jovatn commented Sep 11, 2024

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.
@jovatn jovatn added bug Something isn't working triage Pending investigation & classification (CCB) labels Sep 11, 2024
@troglobit troglobit added this to the Infix v24.09 milestone Sep 11, 2024
@troglobit troglobit removed the triage Pending investigation & classification (CCB) label Sep 11, 2024
@troglobit
Copy link
Contributor

troglobit commented Sep 11, 2024

Reproduced on main @ 1f74ebf:

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)

@troglobit troglobit self-assigned this Sep 12, 2024
@troglobit troglobit changed the title CLI 'show interface' does not show bridge and associated ethernet interface (qemu.sh on v24.08.0) CLI 'show interface' no longer show bridge and its ports Sep 12, 2024
troglobit added a commit that referenced this issue Sep 12, 2024
When multicast snooping is disabled on a bridge, mctl will exit with a
non-zero return code.  Default to {} for these cases so that the bridge
and its ports are properly returned by yanger.

Fixes #618

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@troglobit troglobit linked a pull request Sep 12, 2024 that will close this issue
13 tasks
troglobit added a commit that referenced this issue Sep 13, 2024
When multicast snooping is disabled on a bridge, mctl will exit with a
non-zero return code.  Default to {} for these cases so that the bridge
and its ports are properly returned by yanger.

Fixes #618

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
axkar added a commit to addiva-elektronik/infix that referenced this issue Sep 26, 2024
The test ensures that all interface types can be successfully created
and retrieved from the operational datastore. It also functions as a
regression test for issue kernelkit#618 and will apply to all future interface
variants.

Fixes kernelkit#622
axkar added a commit to addiva-elektronik/infix that referenced this issue Sep 27, 2024
The test ensures that all interface types can be successfully created
and retrieved from the operational datastore. It also functions as a
regression test for issue kernelkit#618 and will apply to all future interface
variants.

Fixes kernelkit#622
axkar added a commit to addiva-elektronik/infix that referenced this issue Sep 27, 2024
The test ensures that all interface types can be successfully created
and retrieved from the operational datastore. It also functions as a
regression test for issue kernelkit#618 and will apply to all future interface
variants.

Fixes kernelkit#622
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants