"auto assign" on unmanaged subnet used the gateway IP for the node

Bug #1546301 reported by Andreas Hasenack
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Unassigned
1.9
Fix Committed
High
Unassigned

Bug Description

maas 1.9.0+bzr4533-0ubuntu1~trusty1

On a node with two nics, I chose an unmanaged subnet for the second nic and selected "auto assign". After deployment, that nic got the same IP as the subnet's gateway. See attached screenshot.

Here, with the node still deployed:
andreas@nsn7:~$ maas admin-atlas subnet statistics subnet-13 include_ranges=true
Success.
Machine-readable output follows:
{
    "total_addresses": 254,
    "usage_string": "0%",
    "num_available": 253,
    "ranges": [
        {
            "start": "10.96.130.1",
            "end": "10.96.130.1",
            "purpose": [
                "assigned-ip"
            ],
            "num_addresses": 1
        },
        {
            "start": "10.96.130.2",
            "end": "10.96.130.254",
            "purpose": [
                "unused"
            ],
            "num_addresses": 253
        }
    ],
    "largest_available": 253,
    "num_unavailable": 1,
    "usage": 0.003937007874015748,
    "inefficiency_string": "TBD",
    "available_string": "100%"
}

Same call with the node released:
andreas@nsn7:~$ maas admin-atlas subnet statistics subnet-13 include_ranges=true
Success.
Machine-readable output follows:
{
    "total_addresses": 254,
    "usage_string": "0%",
    "num_available": 254,
    "ranges": [
        {
            "start": "10.96.130.1",
            "end": "10.96.130.254",
            "purpose": [
                "unused"
            ],
            "num_addresses": 254
        }
    ],
    "largest_available": 254,
    "num_unavailable": 0,
    "usage": 0.0,
    "inefficiency_string": "TBD",
    "available_string": "100%"
}

Tags: landscape
Revision history for this message
Andreas Hasenack (ahasenack) wrote :
no longer affects: maas/2.0
Changed in maas:
milestone: none → 2.0.0
importance: Undecided → High
tags: added: landscape
Changed in maas:
status: New → Invalid
importance: High → Undecided
milestone: 2.0.0 → none
tags: added: kanban-cross-team
Revision history for this message
Mike Pontillo (mpontillo) wrote :

This does not affect MAAS 2.0, as IP allocation has been completely rewritten.

This bug occurs because the Subnet calls out to each NodeGroupInterface to determine if dynamic ranges, static ranges, cluster IP addresses, gateway IP addresses, and DNS server are reserved on the subnet.

In the case of an unmanaged subnet *without* a corresponding NodeGroupInterface, the code improperly skips values that can be determined by looking at the subnet alone (that is, gateway IP and DNS servers). These should be returned directly from the Subnet rather than going to the NodeGroupInterface.

Changed in maas:
status: Invalid → Fix Committed
importance: Undecided → High
milestone: none → 2.0.0
tags: removed: kanban-cross-team
no longer affects: maas/1.10
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.