Cannot deploy from the cli when "Allow DNS resolution" is set on minimal subnet

Bug #2017504 reported by Liam Young
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Alberto Donato

Bug Description

I'm using snap version/build 3.3.2-13177-g.a73a6e2bd

In my deployment I could not deploy servers from the cli, but using
the web interface was fine.

I tracked the issue down to the call to get_curtin_merged_config
*1. It which in turn includes a call to reduce_routable_address_map which
contains an assert statement which is the source of the error *2.

I eventually found that disabling allow_dns on one of the subnets
attached to guest (and the rack controller) fixed the issue.

I have a raised a separate bug to cover the fact that assertion
errors generally are not being surfaced to the user properly. I think this
bug should cover the fact that a guest cannot be booted from the
CLI in this circumstance.

# maas admin machine deploy kgr4kk distro_series=ubuntu/jammy --debug
400 Bad Request

       Connection: keep-alive
   Content-Length: 26
     Content-Type: text/plain; charset=utf-8
             Date: Mon, 24 Apr 2023 08:59:43 GMT
           Server: nginx/1.18.0 (Ubuntu)
           Status: 400
             Vary: Cookie
  X-Frame-Options: DENY

Failed to render preseed:
#

NOTE: Nothing follows the "Failed to render preseed"

# maas admin subnet update "fd42:5eda:f578:7bba::/64" allow_dns=false
Success.
Machine-readable output follows:
{
    "name": "fd42:5eda:f578:7bba::/64",
    "description": "",
    "vlan": {
        "vid": 0,
        "mtu": 1500,
        "dhcp_on": false,
        "external_dhcp": null,
        "relay_vlan": null,
        "secondary_rack": null,
        "id": 5003,
        "fabric": "fabric-2",
        "fabric_id": 2,
        "primary_rack": null,
        "space": "undefined",
        "name": "untagged",
        "resource_uri": "/MAAS/api/2.0/vlans/5003/"
    },
    "cidr": "fd42:5eda:f578:7bba::/64",
    "rdns_mode": 2,
    "gateway_ip": "",
    "dns_servers": [],
    "allow_dns": false,
    "allow_proxy": true,
    "active_discovery": false,
    "managed": true,
    "disabled_boot_architectures": [],
    "id": 5,
    "space": "undefined",
    "resource_uri": "/MAAS/api/2.0/subnets/5/"
}
# maas admin machine deploy kgr4kk distro_series=ubuntu/jammy --debug
200 OK

Logs from immeditaly after the initial failure:

The log messages are:

==> maas.log <==
2023-04-24T08:45:23.221516+00:00 maas maas.rpc.rackcontrollers: message repeated 2 times: [ [info] Existing rack controller 'maas' running version 3.3.2-13177-g.a73a6e2bd has connected to region 'maas'.]
2023-04-24T08:46:41.122016+00:00 maas maas.api: [info] Request from user admin to acquire machine: microk8s07.maas (kgr4kk)
2023-04-24T08:46:41.140294+00:00 maas maas.node: [info] microk8s07: Status transition from READY to ALLOCATED
2023-04-24T08:46:41.155743+00:00 maas maas.node: [info] microk8s07: allocated to user admin

==> regiond.log <==
2023-04-24 08:46:41 maasserver.preseed: [warn] WARNING: '/snap/maas/27109/etc/maas/preseeds/curtin_userdata' contains deprecated preseed variables. Please remove: main_archive_directory, ports_archive_directory

Note: The symptoms are very similar to https://discourse.maas.io/t/deploy-over-api-fails-to-render-preseed/6134

*1 https://git.launchpad.net/maas/tree/src/maasserver/api/machines.py?h=3.3.2#n878
*2 https://git.launchpad.net/maas/tree/src/maasserver/routablepairs.py?h=3.3.2#n116

Related branches

Revision history for this message
Liam Young (gnuoy) wrote :

fwiw I raised https://bugs.launchpad.net/maas/+bug/2017503 to cover improving the handling of the error messages

Alberto Donato (ack)
Changed in maas:
milestone: none → 3.4.0
importance: Undecided → High
status: New → Triaged
Alberto Donato (ack)
Changed in maas:
assignee: nobody → Alberto Donato (ack)
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Alberto Donato (ack)
Changed in maas:
milestone: 3.4.0 → 3.4.0-beta1
Alberto Donato (ack)
Changed in maas:
status: Fix Committed → Fix Released
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.