Activity log for bug #2052834

Date Who What changed Old value New value Message
2024-02-09 19:48:01 Mark Cunningham bug added bug
2024-02-09 19:48:19 Mark Cunningham information type Proprietary Public
2024-03-04 10:56:23 Rowen Francis Ico Lirio landscape: assignee Rowen Francis Ico Lirio (rflirio12)
2024-05-30 15:35:55 Spencer Runde landscape: status New Fix Committed
2024-06-04 13:17:50 Ghadi Rahme bug task added landscape-client
2024-06-04 13:17:56 Ghadi Rahme landscape-client: assignee Ghadi Rahme (ghadi-rahme)
2024-06-04 13:20:13 Ghadi Rahme landscape-client: status New In Progress
2024-06-04 13:25:21 Ghadi Rahme bug task added landscape-client (Ubuntu)
2024-06-04 13:25:39 Ghadi Rahme landscape-client (Ubuntu): status New In Progress
2024-06-04 13:26:42 Ghadi Rahme nominated for series Ubuntu Mantic
2024-06-04 13:26:42 Ghadi Rahme bug task added landscape-client (Ubuntu Mantic)
2024-06-04 13:26:42 Ghadi Rahme nominated for series Ubuntu Jammy
2024-06-04 13:26:42 Ghadi Rahme bug task added landscape-client (Ubuntu Jammy)
2024-06-04 13:26:42 Ghadi Rahme nominated for series Ubuntu Focal
2024-06-04 13:26:42 Ghadi Rahme bug task added landscape-client (Ubuntu Focal)
2024-06-04 13:26:42 Ghadi Rahme nominated for series Ubuntu Oracular
2024-06-04 13:26:42 Ghadi Rahme bug task added landscape-client (Ubuntu Oracular)
2024-06-04 13:26:42 Ghadi Rahme nominated for series Ubuntu Noble
2024-06-04 13:26:42 Ghadi Rahme bug task added landscape-client (Ubuntu Noble)
2024-06-04 13:26:56 Ghadi Rahme landscape-client (Ubuntu Oracular): assignee Ghadi Rahme (ghadi-rahme)
2024-06-04 13:26:59 Ghadi Rahme landscape-client (Ubuntu Noble): assignee Ghadi Rahme (ghadi-rahme)
2024-06-04 13:27:00 Ghadi Rahme landscape-client (Ubuntu Mantic): assignee Ghadi Rahme (ghadi-rahme)
2024-06-04 13:27:02 Ghadi Rahme landscape-client (Ubuntu Jammy): assignee Ghadi Rahme (ghadi-rahme)
2024-06-04 13:27:03 Ghadi Rahme landscape-client (Ubuntu Focal): assignee Ghadi Rahme (ghadi-rahme)
2024-06-04 14:46:11 Ghadi Rahme description Customer has opened a case (00378390) indicating that when they use the lansdcape-api to get network info for client machines they do not get all interfaces returned by the API. For their specific use case they need to get all MAC addresses from the machine to add those to their VPN for access. They indicate that their wifi interface shows up in the web UI, but not in the API output. I was able to replicate this in 23.03+18 with my own laptop. Here are my results. Actual interfaces on machine, there are four, which should all be visible in Landscape. ip a | grep -E 'BROADCAST|ether|inet ' 2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 38:f3:ab:41:dd:0d brd ff:ff:ff:ff:ff:ff inet 192.168.1.176/24 brd 192.168.1.255 scope global dynamic noprefixroute enp0s31f6 3: enx803f5d0918d6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000 link/ether 80:3f:5d:09:18:d6 brd ff:ff:ff:ff:ff:ff 4: wlp0s20f3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether e0:2b:e9:bb:0f:6c brd ff:ff:ff:ff:ff:ff inet 192.168.1.143/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp0s20f3 5: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 52:54:00:e3:af:9a brd ff:ff:ff:ff:ff:ff inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0 From Web UI, I see three of four: Network: Model: Not available MAC: 80:3f:5d:09:18:d6 IP: Not available Model: Comet Lake PCH CNVi WiFi MAC: e0:2b:e9:bb:0f:6c IP: 192.168.1.143 Model: Ethernet Connection (11) I219-LM MAC: 38:f3:ab:41:dd:0d IP: 192.168.1.176 From API, I see a different three of four: landscape-api get-computers --with-network --query <hostname> 'network_devices': [{'broadcast_address': '192.168.1.255', 'duplex': True, 'interface': 'enp0s31f6', 'ip_address': '192.168.1.176', 'mac_address': '38:f3:ab:41:dd:0d', 'netmask': '255.255.255.0', 'speed': 1000}, {'broadcast_address': '192.168.122.255', 'duplex': False, 'interface': 'virbr0', 'ip_address': '192.168.122.1', 'mac_address': '52:54:00:e3:af:9a', 'netmask': '255.255.255.0', 'speed': 10000}, {'broadcast_address': '192.168.1.255', 'duplex': False, 'interface': 'wlp0s20f3', 'ip_address': '192.168.1.143', 'mac_address': 'e0:2b:e9:bb:0f:6c', 'netmask': '255.255.255.0', 'speed': -1}], I would expect all four interfaces to be visible, and clearly Landscape is aware of all four because if we combine the outputs above you can see all four, but each view Web / API only returns a different three of the four. Thank you @mdscunningham for opening the bug report. [Impact] Current versions of landscape client omit some network interfaces in their API response. While some interfaces should not be included such as loops and tap interfaces, others such as disconnected interfaces (no IP address or in the down state) should still be included as long as they have a valid MAC address. This patch makes sure that interfaces are not omitted from the API response based on their IP address or their current state. [Test Plan] 1- launch a ubuntu instance (lxc container, VM, bare metal) and make sure that the machine has access to at least two network interfaces. 2- Make sure one of the interfaces is connected and has a valid IP. 3- Also make sure at least one interface is not connected and has a valid MAC address. The interface can be in the down state or simply not configured with an IP. One easy way to achieve this is by running the following command: $ ip link set dev <interface> down 4- Install landscape-client on the machine and enroll it into the landscape server. 5- Wait a few minutes for the machine to enroll and for all information to be exchanged between the server and the client 6- Query the server with lanscape-api to fetch information about the currently connected clients: $ landscape-api get-computers --with-network --json 7- Prior to this patch, the interfaces in the down state or with no IP addresses will not show up in the API response. However after this patch these interfaces will show up with an IP address, broadcast address and netmask of 0.0.0.0. [Where problems could occur] * Some interfaces might still fail to show up. * Some interfaces that are not meant to show up might show up. [Original Description] Customer has opened a case (00378390) indicating that when they use the lansdcape-api to get network info for client machines they do not get all interfaces returned by the API. For their specific use case they need to get all MAC addresses from the machine to add those to their VPN for access. They indicate that their wifi interface shows up in the web UI, but not in the API output. I was able to replicate this in 23.03+18 with my own laptop. Here are my results. Actual interfaces on machine, there are four, which should all be visible in Landscape. ip a | grep -E 'BROADCAST|ether|inet ' 2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000     link/ether 38:f3:ab:41:dd:0d brd ff:ff:ff:ff:ff:ff     inet 192.168.1.176/24 brd 192.168.1.255 scope global dynamic noprefixroute enp0s31f6 3: enx803f5d0918d6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000     link/ether 80:3f:5d:09:18:d6 brd ff:ff:ff:ff:ff:ff 4: wlp0s20f3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000     link/ether e0:2b:e9:bb:0f:6c brd ff:ff:ff:ff:ff:ff     inet 192.168.1.143/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp0s20f3 5: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000     link/ether 52:54:00:e3:af:9a brd ff:ff:ff:ff:ff:ff     inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0 From Web UI, I see three of four: Network: Model: Not available MAC: 80:3f:5d:09:18:d6 IP: Not available Model: Comet Lake PCH CNVi WiFi MAC: e0:2b:e9:bb:0f:6c IP: 192.168.1.143 Model: Ethernet Connection (11) I219-LM MAC: 38:f3:ab:41:dd:0d IP: 192.168.1.176 From API, I see a different three of four: landscape-api get-computers --with-network --query <hostname>   'network_devices': [{'broadcast_address': '192.168.1.255',                        'duplex': True,                        'interface': 'enp0s31f6',                        'ip_address': '192.168.1.176',                        'mac_address': '38:f3:ab:41:dd:0d',                        'netmask': '255.255.255.0',                        'speed': 1000},                       {'broadcast_address': '192.168.122.255',                        'duplex': False,                        'interface': 'virbr0',                        'ip_address': '192.168.122.1',                        'mac_address': '52:54:00:e3:af:9a',                        'netmask': '255.255.255.0',                        'speed': 10000},                       {'broadcast_address': '192.168.1.255',                        'duplex': False,                        'interface': 'wlp0s20f3',                        'ip_address': '192.168.1.143',                        'mac_address': 'e0:2b:e9:bb:0f:6c',                        'netmask': '255.255.255.0',                        'speed': -1}], I would expect all four interfaces to be visible, and clearly Landscape is aware of all four because if we combine the outputs above you can see all four, but each view Web / API only returns a different three of the four.
2024-06-04 14:48:36 Ghadi Rahme attachment added oracular.debdiff https://bugs.launchpad.net/ubuntu/+source/landscape-client/+bug/2052834/+attachment/5785861/+files/oracular.debdiff
2024-06-04 14:48:56 Ghadi Rahme bug added subscriber Ubuntu Sponsors
2024-06-05 14:49:36 Simon Quigley removed subscriber Ubuntu Sponsors
2024-06-05 14:50:03 Simon Quigley landscape-client (Ubuntu Oracular): status In Progress Fix Committed
2024-06-15 00:17:48 Launchpad Janitor landscape-client (Ubuntu Oracular): status Fix Committed Fix Released
2024-06-20 08:56:56 Ghadi Rahme landscape-client (Ubuntu Oracular): status Fix Released Fix Committed