DHCP snippet configuration was disappeared when I disable the dhcp snippet.

I met strange behavior about the dhcp snippet of MAAS. Do you have any knowledge about this?

MAAS version

MAAS 3.5 (installed by snap)

Condition

I’ve been using the dhcp snippet feature of MAAS. It works correct on my environment.

I always set it by web UI.

This is a sample of my configuration. I masked hostname, mac address, ip address.

default-lease-time 14400;
max-lease-time 14400;
 host foo {
   hardware ethernet XX:XX:XX:XX:XX:XX;
   fixed-address 192.168.10.10;
 }

 host bar {
   hardware ethernet XX:XX:XX:XX:XX:XX;
   fixed-address 192.168.10.11;
 }

Issue

I disabled the dhcp snippet by CLI for some reason.

$ sudo maas ubuntu dhcpsnippet update 2 enabled=false

As a result, I was able to disable the dhcp snippet.

But, the dhcp snippet configuration was changed as following. I confirmed this by web UI.

212

Hostnames, mac addresses, and ip addresses were written in the configuration before I disabled the dhcp snippet by CLI.
However, the dhcp snippet configuration was just “212” after executing CLI.

Information

About “212”

I found that “212” was a history id of the dhcp snippet.

ID:212 has correct dhcp snippet configuration in “value”. But the latest ID(216)'s value is just “212”.

$ sudo maas ubuntu dhcpsnippet read 2
{
[...]
    "history": [
[...]        
        {
            "id": 216,
            "value": "212",
            "created": "Tue, 26 Aug 2025 01:02:49 -0000"
        },
        {
            "id": 212,
            "value": "default-lease-time 14400;\nmax-lease-time 14400;\n\n[...]",
            "created": "Tue, 12 Aug 2025 07:33:50 -0000"
        },

Restore

I copied the dhcp snippet configuration from ID:212’s value. And I replaced “\n” to line break.

And I pasted the configuration to the dhcp snippet by web UI.

As a result, dhcp worked.

P.S.

The dhcp snippet configuration was not changed when I disabled the dhcp snippet by web UI.

Hi,

Does anyone have any information?

Could you open a bug on launchpad and follow the structure proposed in the form?

OK, I got it. I’ll open a form after this.

I opned the following bu report. So I’d like to close this ticket.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.