MAAS 2.6.2 ignored my /etc/maas/preseeds/enlist_userdata

Hi guys!

I have problem after upgrade to 2.6.2 MAAS.

We have MAAS cluster of 2 VMs, which have one region and one rack on each.
After upgrade to 2.6.2 version we have troubles with running enlist_userdata scripts. Earlier we use it to determine server hostname and discover it on MAAS by right hostname from Jira API.

Now, when enlisting new machine, we watching to logs and can’t find any tracks of running enlist_userdata. No effect.

3 quessions:

  1. why it can happen?
  2. what’s way to debug enlist_userdata running?
  3. how disable poweoff after enlist finish?

Thanks!

root@maas1:/root # ls -la /etc/maas/preseeds
total 56
drwxr-xr-x 2 root root 4096 Jan 15 18:07 .
drwxr-xr-x 4 root root 4096 Dec 30 15:43 ..
-rw-r--r-- 1 root root   17 Dec 20 13:34 commissioning                                                                                                                                                 90,3-17       36%
-rw-r--r-- 1 root root   17 Dec 20 13:34 curtin
-rw-r--r-- 1 root root 8842 Dec 30 15:44 curtin_userdata
-rw-r--r-- 1 root root  254 Dec 20 13:34 curtin_userdata_centos
-rw-r--r-- 1 root root  254 Dec 20 13:34 curtin_userdata_custom
-rw-r--r-- 1 root root  254 Dec 20 13:34 curtin_userdata_suse
-rw-r--r-- 1 root root  305 Dec 20 13:34 curtin_userdata_windows
-rw-r--r-- 1 root root    17 Dec 20 13:34 enlist
-rw-r--r-- 1 root root 5048 Jan 15 15:47 enlist_userdata
1 Like

Hi @kingil ,

same here did you find any solution.

Thanks in advance,
Best Stefan

I also hit this problem. From source code it seems that enlist_userdata functionality has been removed from MaaS 2.5:frowning:
You can check it for yourself by comparing the preseed.py code:
https://github.com/maas/maas/blob/2.4/src/maasserver/preseed.py
https://github.com/maas/maas/blob/2.5/src/maasserver/preseed.py

This function, which used to handle enlist_userdata template, is no longer present in MaaS 2.5:
def get_enlist_userdata(rack_controller=None, default_region_ip=None):

Relevant commit:

commit 5d47f8c7af7f32d1c5ef3a08fd0e869a6d8b7e52
Author: Lee Trager lee.trager@canonical.com
Date: Thu Jun 14 20:53:07 2018 +0000

Run commissioning during enlistment.

The commissioning userdata template has been updated to enlist machines when
run during enlistment. /etc/maas/preseeds/enlist_userdata has been removed.

Unfortunately MaaS documentation does not track this important change and still describes enlist_userdata: https://maas.io/docs/custom-node-setup-preseed

Solution: from MaaS 2.5 upwards instead of customising “/etc/maas/preseeds/enlist_userdata”, one should customise “/usr/lib/python3/dist-packages/metadataserver/user_data/templates/enlistment.template”. At least it worked for me.
Anyone has a better solution?

1 Like

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