[2.0a4] duplicate ipranges cuase dhcpd Configuration file errors

Bug #1564971 reported by John George
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Jeffrey C Jones

Bug Description

Duplicate iprange entries were added with:
    'maas _maas ipranges create type=dynamic start_ip=10.245.208.150 end_ip=10.245.208.250'

[
    {
        "comment": "",
        "end_ip": "10.245.208.250",
        "start_ip": "10.245.208.150",
        "id": 1,
        "subnet": {
            "dns_servers": [],
            "name": "10.245.208.0/20",
            "gateway_ip": "10.245.208.5",
            "space": "space-0",
            "cidr": "10.245.208.0/20",
            "resource_uri": "/MAAS/api/2.0/subnets/1/",
            "vlan": {
                "fabric": "fabric-0",
                "primary_rack": "4y3h7n",
                "dhcp_on": true,
                "id": 1,
                "name": "untagged",
                "secondary_rack": null,
                "mtu": 1500,
                "resource_uri": "/MAAS/api/2.0/vlans/1/",
                "vid": 0
            },
            "rdns_mode": 2,
            "id": 1
        },
        "resource_uri": "/MAAS/api/2.0/ipranges/1/",
        "type": "dynamic",
        "user": {
            "username": "root",
            "email": "ubuntu@localhost",
            "is_superuser": true
        }
    },
    {
        "comment": "",
        "end_ip": "10.245.208.250",
        "start_ip": "10.245.208.150",
        "id": 2,
        "subnet": {
            "dns_servers": [],
            "name": "10.245.208.0/20",
            "gateway_ip": "10.245.208.5",
            "space": "space-0",
            "cidr": "10.245.208.0/20",
            "resource_uri": "/MAAS/api/2.0/subnets/1/",
            "vlan": {
                "fabric": "fabric-0",
                "primary_rack": "4y3h7n",
                "dhcp_on": true,
                "id": 1,
                "name": "untagged",
                "secondary_rack": null,
                "mtu": 1500,
                "resource_uri": "/MAAS/api/2.0/vlans/1/",
                "vid": 0
            },
            "rdns_mode": 2,
            "id": 1
        },
        "resource_uri": "/MAAS/api/2.0/ipranges/2/",
        "type": "dynamic",
        "user": {
            "username": "root",
            "email": "ubuntu@localhost",
            "is_superuser": true
        }
    },
]

Subsequently MAAS added duplicate entries to /var/lib/maas/dhcpd.conf and dhcpd failed to start.

Tags: cdo-qa

Related branches

Changed in maas:
milestone: none → 2.0.0
importance: Undecided → Critical
summary: - duplicate ipranges cuase dhcpd Configuration file errors
+ [2.0a4] duplicate ipranges cuase dhcpd Configuration file errors
Changed in maas:
status: New → Triaged
Changed in maas:
assignee: nobody → Jeffrey C Jones (trapnine)
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
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.