Command line dhcp snippet error

Hi all,

I’m trying what I think is a pretty straightforward cli command to add a machine specific dhcp snippet to set a fixed IP address. The doc here - CLI DHCP snippet management (deb/2.9/UI) - is the most recent I can find and suggests that a node specific snippet may be added like this:

“maas $PROFILE dhcpsnippets create name=$DHCP_SNIPPET_NAME
value=$DHCP_CONFIG description=$DHCP_SNIPPET_DESCRIPTION
node=$NODE_ID”

when I execute this with my values, however, I get an error (values sanitised):

maas admin dhcpsnippets create name=“Hostname” value=“hardware ethernet 12:23:34:45:56:67;fixed-address 111.111.111.11;” description=“static ip for node” node=“fkdd” -k

‘ScriptSet’ object has no attribute ‘filters’

It work if I leave out the node, but that gives me a global snippet. If I give an invalid node, I get the expected error - {“node”: [“Select a valid choice. fkdd is not one of the available choices.”]}"

Is my command syntax bad or is there something else going on?

Apologies if I’m missing something obvious, and thanks in advance for any pointers …

Jeff

@jeffberrymrc, “fkdd” doesn’t look like a valid system ID. are you sure you got that part right?

My apologies, that’s a sanitised id - I suppose the real one isn’t giving too much away - node=“fky3qb” is the actual value.

Jeff

no, those are totally randomized. okay, let me try it on this end and see what i get.

I forgot to mention - MAAS : 3.3.5

1 Like

A couple more things - I’m guessing the error was occurring because of a bad DHCP configuration, which is completely my fault.

The error message wasn’t much help in tracking that down, but that’s not really a technical problem.