Interface link-subnet fails saying "subnet": "None found", however the subnet exists

Bug #1893135 reported by Vladimir Grevtsev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Status tracked in 3.6
3.3
Won't Fix
Low
Unassigned
3.4
Won't Fix
Low
Unassigned
3.5
Won't Fix
Low
Unassigned
3.6
Triaged
Low
Unassigned

Bug Description

2020-08-26-21:37:06 root ERROR [localhost] Command failed: maas root interface link-subnet 64fxmx 57 subnet=1 mode=auto default_gateway=True
2020-08-26-21:37:06 root ERROR [localhost] STDOUT follows:
{"subnet": ["None found with id=1.", "This field is required."], "default_gateway": ["Subnet is required when default_gateway is True."]}

However, this subnet ID is valid and exists:

$ maas root subnet read 1
Success.
Machine-readable output follows:
{
    "name": "oam",
    "description": "",
    "vlan": {
        "vid": 2101,
        "mtu": 1500,
        "dhcp_on": true,
        "external_dhcp": null,
        "relay_vlan": null,
        "fabric_id": 12,
        "id": 5001,
        "name": "untagged",
        "primary_rack": "h633nk",
        "space": "oam-space",
        "secondary_rack": "ewqr4n",
        "fabric": "default",
        "resource_uri": "/MAAS/api/2.0/vlans/5001/"
    },
    "cidr": "10.21.1.0/24",
    "rdns_mode": 2,
    "gateway_ip": "10.21.1.254",
    "dns_servers": [],
    "allow_dns": true,
    "allow_proxy": true,
    "active_discovery": false,
    "managed": true,
    "id": 1,
    "space": "oam-space",
    "resource_uri": "/MAAS/api/2.0/subnets/1/"
}

$ maas root interface read 64fxmx 57 | pastebinit
http://paste.ubuntu.com/p/NGGsqTzD2G/

$ maas root fabrics read | pastebinit
http://paste.ubuntu.com/p/mdHPt35jRb/

$ maas root subnets read | pastebinit
http://paste.ubuntu.com/p/nX9ZnYVgxc/

$ maas root machine read 64fxmx
https://pastebin.canonical.com/p/6FS79HKQhC/

$ dpkg -l | grep maas
ii maas-cli 2.8.1-8567-g.c4825ca06-0ubuntu1~18.04.1 all MAAS client and command-line interface
ii maas-common 2.8.1-8567-g.c4825ca06-0ubuntu1~18.04.1 all MAAS server common files
ii maas-dhcp 2.8.1-8567-g.c4825ca06-0ubuntu1~18.04.1 all MAAS DHCP server
ii maas-proxy 2.8.1-8567-g.c4825ca06-0ubuntu1~18.04.1 all MAAS Caching Proxy
ii maas-rack-controller 2.8.1-8567-g.c4825ca06-0ubuntu1~18.04.1 all Rack Controller for MAAS
ii maas-region-api 2.8.1-8567-g.c4825ca06-0ubuntu1~18.04.1 all Region controller API service for MAAS
ii maas-region-controller 2.8.1-8567-g.c4825ca06-0ubuntu1~18.04.1 all Region Controller for MAAS
ii python3-django-maas 2.8.1-8567-g.c4825ca06-0ubuntu1~18.04.1 all MAAS server Django web framework (Python 3)
ii python3-libmaas 0.6.1-6-g91e96e9-dirty~bionic-0ubuntu1 all MAAS asyncio client library (Python 3)
ii python3-maas-client 2.8.1-8567-g.c4825ca06-0ubuntu1~18.04.1 all MAAS python API client (Python 3)
ii python3-maas-provisioningserver 2.8.1-8567-g.c4825ca06-0ubuntu1~18.04.1 all MAAS server provisioning libraries (Python 3)

Any suggestions what could be wrong will be very appreciated.

Revision history for this message
Vladimir Grevtsev (vlgrevtsev) wrote :

Subscribing field-high as this is currently delaying ongoing customer delivery.

tags: added: field-high
Revision history for this message
Jason Hobbs (jason-hobbs) wrote : Re: [Bug 1893135] Re: [2.8] interface link-subnet fails saying "subnet": "None found", however the subnet exists
Download full text (3.9 KiB)

It looks like that interface (57) is not on the vlan that subnet one is on.
The interface is on vlan 5019; the subnet is on vlan 5001. Try putting the
interface on the right vlan and then selecting that subnet.

On Wed, Aug 26, 2020 at 5:00 PM Vladimir Grevtsev <
<email address hidden>> wrote:

> Subscribing field-high as this is currently delaying ongoing customer
> delivery.
>
> ** Tags added: field-high
>
> --
> You received this bug notification because you are a member of Canonical
> Field High, which is subscribed to the bug report.
> https://bugs.launchpad.net/bugs/1893135
>
> Title:
> [2.8] interface link-subnet fails saying "subnet": "None found",
> however the subnet exists
>
> Status in MAAS:
> New
>
> Bug description:
> 2020-08-26-21:37:06 root ERROR [localhost] Command failed: maas root
> interface link-subnet 64fxmx 57 subnet=1 mode=auto default_gateway=True
> 2020-08-26-21:37:06 root ERROR [localhost] STDOUT follows:
> {"subnet": ["None found with id=1.", "This field is required."],
> "default_gateway": ["Subnet is required when default_gateway is True."]}
>
> However, this subnet ID is valid and exists:
>
> $ maas root subnet read 1
> Success.
> Machine-readable output follows:
> {
> "name": "oam",
> "description": "",
> "vlan": {
> "vid": 2101,
> "mtu": 1500,
> "dhcp_on": true,
> "external_dhcp": null,
> "relay_vlan": null,
> "fabric_id": 12,
> "id": 5001,
> "name": "untagged",
> "primary_rack": "h633nk",
> "space": "oam-space",
> "secondary_rack": "ewqr4n",
> "fabric": "default",
> "resource_uri": "/MAAS/api/2.0/vlans/5001/"
> },
> "cidr": "10.21.1.0/24",
> "rdns_mode": 2,
> "gateway_ip": "10.21.1.254",
> "dns_servers": [],
> "allow_dns": true,
> "allow_proxy": true,
> "active_discovery": false,
> "managed": true,
> "id": 1,
> "space": "oam-space",
> "resource_uri": "/MAAS/api/2.0/subnets/1/"
> }
>
> $ maas root interface read 64fxmx 57 | pastebinit
> http://paste.ubuntu.com/p/NGGsqTzD2G/
>
> $ maas root fabrics read | pastebinit
> http://paste.ubuntu.com/p/mdHPt35jRb/
>
> $ maas root subnets read | pastebinit
> http://paste.ubuntu.com/p/nX9ZnYVgxc/
>
> $ maas root machine read 64fxmx
> https://pastebin.canonical.com/p/6FS79HKQhC/
>
> $ dpkg -l | grep maas
> ii maas-cli
> 2.8.1-8567-g.c4825ca06-0ubuntu1~18.04.1 all MAAS client
> and command-line interface
> ii maas-common
> 2.8.1-8567-g.c4825ca06-0ubuntu1~18.04.1 all MAAS server
> common files
> ii maas-dhcp
> 2.8.1-8567-g.c4825ca06-0ubuntu1~18.04.1 all MAAS DHCP
> server
> ii maas-proxy
> 2.8.1-8567-g.c4825ca06-0ubuntu1~18.04.1 all MAAS Caching
> Proxy
> ii maas-rack-controller
> 2.8.1-8567-g.c4825ca06-0ubuntu1~18.04.1 all Rack
> Controller for MAAS
> ii maas-region-api
> 2.8.1-8567-g.c4825ca06-0ubuntu1~18.04.1 all Region
> controller API service for MAAS
> ii maas-region-controller
> 2.8...

Read more...

Revision history for this message
Vladimir Grevtsev (vlgrevtsev) wrote : Re: [2.8] interface link-subnet fails saying "subnet": "None found", however the subnet exists

So that's what was happening before:

2020-08-26-21:36:44 root INFO Setting up networking on '64fxmx'
2020-08-26-21:36:44 root DEBUG [localhost]: maas root machine restore-networking-configuration 64fxmx
2020-08-26-21:36:47 root DEBUG [localhost]: maas root machine read 64fxmx
2020-08-26-21:36:50 root DEBUG [localhost]: maas root interface unlink-subnet 64fxmx 50 id=38
2020-08-26-21:36:52 root DEBUG [localhost]: maas root machine details 64fxmx
2020-08-26-21:36:53 root DEBUG [localhost]: maas root interface update 64fxmx 50 name=eno1 vlan=5019
2020-08-26-21:36:55 root INFO Setting up interface 'eno1' (physical) on on '64fxmx'
2020-08-26-21:36:55 root DEBUG [localhost]: maas root interface update 64fxmx 51 name=eno2 vlan=5019
2020-08-26-21:36:57 root INFO Setting up interface 'eno2' (physical) on on '64fxmx'
2020-08-26-21:36:57 root DEBUG [localhost]: maas root interface update 64fxmx 52 name=eno3 vlan=5019
2020-08-26-21:36:58 root INFO Setting up interface 'eno3' (physical) on on '64fxmx'
2020-08-26-21:36:58 root DEBUG [localhost]: maas root interface update 64fxmx 53 name=eno4 vlan=5019
2020-08-26-21:37:00 root INFO Setting up interface 'eno4' (physical) on on '64fxmx'
2020-08-26-21:37:00 root DEBUG [localhost]: maas root interface update 64fxmx 54 name=enp175s0f0 vlan=5019
2020-08-26-21:37:01 root INFO Setting up interface 'enp175s0f0' (physical) on on '64fxmx'
2020-08-26-21:37:01 root DEBUG [localhost]: maas root interface update 64fxmx 55 name=enp175s0f1 vlan=5019
2020-08-26-21:37:03 root INFO Setting up interface 'enp175s0f1' (physical) on on '64fxmx'
2020-08-26-21:37:03 root DEBUG [localhost]: maas root interfaces create-bond 64fxmx parents=50 parents=52 mtu=1500 name=bondM vlan=5019 bond_downdelay=0 bond_lacp_rate=fast bond_miimon=100 bond_mode=802.3ad bond_xmit_hash_policy=layer3+4 mac_address=3c:ec:ef:19:eb:3e
2020-08-26-21:37:04 root INFO Setting up interface 'bondM' (bond) on on '64fxmx'
2020-08-26-21:37:04 root DEBUG [localhost]: maas root interface link-subnet 64fxmx 57 subnet=1 mode=auto default_gateway=True
2020-08-26-21:37:06 root ERROR [localhost] Command failed: maas root interface link-subnet 64fxmx 57 subnet=1 mode=auto default_gateway=True

Indeed VLAN 5019 was used instead of 5001 (which is expected), need to understand how it come... but in scope of this bug, probably, we should not say "None found" as this is confusing at least.

Revision history for this message
Vladimir Grevtsev (vlgrevtsev) wrote :

Removing field-high as workaround has been found.

tags: removed: field-high
Revision history for this message
Alberto Donato (ack) wrote :

We should indeed have a better messaging in this case

Changed in maas:
status: New → Triaged
importance: Undecided → Medium
milestone: none → next
Revision history for this message
Jerzy Husakowski (jhusakowski) wrote :

MAAS should give a better error message, something like "Subnet y not found on VLAN x", which was the issue the submitter encountered.

summary: - [2.8] interface link-subnet fails saying "subnet": "None found", however
- the subnet exists
+ Interface link-subnet fails saying "subnet": "None found", however the
+ subnet exists
Changed in maas:
importance: Medium → Low
milestone: next → 3.3.0
Changed in maas:
milestone: 3.3.0 → 3.4.0
Alberto Donato (ack)
Changed in maas:
milestone: 3.4.0 → 3.4.x
Changed in maas:
milestone: 3.4.x → 3.5.x
no longer affects: maas/3.3
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.