xsos
xsos copied to clipboard
xsos --ipv6 doesn't produce expected content
Cloned the latest code just to make sure not caused by outdated source code:
$ xsos -h | grep -E 'Version|ipv6'
-6, --ipv6 parse ip addr output for IPv6 addresses instead of IPv4
Version info: xsos v0.7.28 last mod 2022-01-21
So the help implies that passing -6 or --ipv6 will generate output for IPv6 addresses as opposed to v4, but instead you get nothing of the sort. Consider the following (I scrubbed the content because it has come from a customer's server):
$ xsos --scrub --ip . IP4 Interface Master IF MAC Address MTU State IPv4 Address ========= ========= ================= ====== ===== ================== lo - - 65536 up ⣿⣿⣿.⣿⣿⣿.⣿⣿⣿.⣿⣿⣿/⣿⣿ ens192 - ⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿ 1500 up ⣿⣿⣿.⣿⣿⣿.⣿⣿⣿.⣿⣿⣿/⣿⣿ ens224 - ⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿ 1500 up ⣿⣿⣿.⣿⣿⣿.⣿⣿⣿.⣿⣿⣿/⣿⣿
IP6 Interface Master IF MAC Address MTU State IPv6 Address Scope ========= ========= ================= ====== ===== =========================================== ===== lo - - 65536 up - - ens192 - ⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿ 1500 up - - ens224 - ⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿ 1500 up - -
$ xsos --scrub --ipv6 . OS Hostname: SCRUBBED Distro: [redhat-release] Red Hat Enterprise Linux Server release 7.9 (Maipo) [os-release] Red Hat Enterprise Linux Server 7.9 (Maipo) 7.9 (Maipo) RHN: serverURL = SCRUBBED enableProxy = 0 RHSM: hostname = SCRUBBED proxy_hostname = YUM: 4 enabled plugins: langpacks, product-id, search-disabled-repos, subscription-manager SELinux: disabled (default disabled) Arch: mach=x86_64 cpu=x86_64 platform=x86_64 Kernel: Booted kernel: 3.10.0-1160.42.2.el7.x86_64 GRUB default: 3.10.0-1160.42.2.el7.x86_64 Build version: Linux version 3.10.0-1160.42.2.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Tue Aug 31 20:15:00 UTC 2021 Booted kernel cmdline:
GRUB default kernel cmdline:
root=/dev/mapper/vg00-lv_root ro nomodeset vga=normal vmwgfx.enable_fbdev=0 crashkernel=auto rd.lvm.lv=vg00/lv_root rd.lvm.lv=vg00/swap rhgb quiet audit=1
transparent_hugepage=never LANG=en_US.UTF-8
Taint-check: 12289 (see https://access.redhat.com/solutions/40594)
0 PROPRIETARY_MODULE: Proprietary module has been loaded
12 OOT_MODULE: Out-of-tree module has been loaded
13 UNSIGNED_MODULE: Unsigned module has been loaded
- - - - - - - - - - - - - - - - - - -
Sys time: Thu Feb 3 20:08:31 CET 2022 Boot time: Sun Dec 12 21:40:17 CET 2021 (epoch: 1639341617) Time Zone: Europe/Brussels Uptime: 52 days, 22:28, 2 users LoadAvg: [4 CPU] 3.15 (79%), 1.57 (39%), 0.83 (21%) /proc/stat: procs_running: 8 procs_blocked: 1 processes [Since boot]: 65257276 cpu [Utilization since boot]: us 5%, ni 0%, sys 2%, idle 92%, iowait 0%, irq 0%, sftirq 0%, steal 0%
sed: -e expression #1, char 40: unterminated `s' command
I suspect it has to do with this "sed" error at the bottom. I avoided trying to insert this second output as "code" because it contains grave accents and that seems to mess up the post's formatting.
/SenseiC
Sidebar - I've always wondered why the --ipv6 | -6 options exist since the --ip | -i option outputs the IPv6 information already. I had expected the --ipv6 | -6 options to, in effect, toggle the --ip | -i options' output to display IPv6 addresses instead of IPv4.
On a related note (I believe)... something else definitely amiss with the IPv6 output...
Looking at sos_commands/networking/ip_-d_address from my SOS Report I see:
$ grep virbr0 -A99 sos_commands/networking/ip_-d_address
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:85:77:e9 brd ff:ff:ff:ff:ff:ff promiscuity 0
bridge forward_delay 200 hello_time 200 max_age 2000 ageing_time 30000 stp_state 1 priority 32768 vlan_filtering 0 vlan_protocol 802.1Q bridge_id 8000.52:54:0:85:77:e9 designated_root 8000.52:54:0:85:77:e9 root_port 0 root_path_cost 0 topology_change 0 topology_change_detected 0 hello_timer 1.03 tcn_timer 0.00 topology_change_timer 0.00 gc_timer 260.63 vlan_default_pvid 1 vlan_stats_enabled 0 group_fwd_mask 0 group_address 01:80:c2:00:00:00 mcast_snooping 1 mcast_router 1 mcast_query_use_ifaddr 0 mcast_querier 0 mcast_hash_elasticity 4 mcast_hash_max 512 mcast_last_member_count 2 mcast_startup_query_count 2 mcast_last_member_interval 100 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 mcast_startup_query_interval 3125 mcast_stats_enabled 0 mcast_igmp_version 2 mcast_mld_version 1 nf_call_iptables 0 nf_call_ip6tables 0 nf_call_arptables 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN group default qlen 1000
link/ether 52:54:00:85:77:e9 brd ff:ff:ff:ff:ff:ff promiscuity 1
tun
bridge_slave state disabled priority 32 cost 100 hairpin off guard off root_block off fastleave off learning on flood on port_id 0x8001 port_no 0x1 designated_port 32769 designated_cost 0 designated_bridge 8000.52:54:0:85:77:e9 designated_root 8000.52:54:0:85:77:e9 hold_timer 0.00 message_age_timer 0.00 forward_delay_timer 0.00 topology_change_ack 0 config_pending 0 proxy_arp off proxy_arp_wifi off mcast_router 1 mcast_fast_leave off mcast_flood on numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
Note this has no IPv6 address, i.e. this expression at line 2530 should return false:
2529 # If $i has an ipv6 address, time to figure out what it is
2530 if grep -q "inet6" <<<"${iface_input[$i]}"; then
Neither virbr0 and virbr0-nic have inet6 text:
$ grep virbr0 -A99 sos_commands/networking/ip_-d_address | grep inet6 -c 0
and yet they both appear in the IPv6 output...
$ xsos -i --scrub . IP4 Interface Master IF MAC Address MTU State IPv4 Address ========= ========= ================= ====== ===== ================== lo - - 65536 up ⣿⣿⣿.⣿⣿⣿.⣿⣿⣿.⣿⣿⣿/⣿⣿ ens192 - ⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿ 1500 up ⣿⣿⣿.⣿⣿⣿.⣿⣿⣿.⣿⣿⣿/⣿⣿ virbr0 - ⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿ 1500 up ⣿⣿⣿.⣿⣿⣿.⣿⣿⣿.⣿⣿⣿/⣿⣿ virbr0-nic virbr0 ⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿ 1500 DOWN -
IP6 Interface Master IF MAC Address MTU State IPv6 Address Scope ========= ========= ================= ====== ===== =========================================== ===== lo - - 65536 up ⣿⣿⣿⣿:⣿⣿⣿⣿:⣿⣿⣿⣿:⣿⣿⣿⣿:⣿⣿⣿⣿:⣿⣿⣿⣿:⣿⣿⣿⣿:⣿⣿⣿⣿/⣿⣿⣿ host ens192 - ⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿ 1500 up ⣿⣿⣿⣿:⣿⣿⣿⣿:⣿⣿⣿⣿:⣿⣿⣿⣿:⣿⣿⣿⣿:⣿⣿⣿⣿:⣿⣿⣿⣿:⣿⣿⣿⣿/⣿⣿⣿ link virbr0 - ⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿ 1500 up - - virbr0-nic virbr0 ⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿:⣿⣿ 1500 DOWN - -