cloudbase / cloudbase-init

Cross-platform instance initialization
http://openstack.org
Apache License 2.0
432 stars 153 forks source link

Error getting metadata with MAAS 401 Unauthorized #119

Open tandrez opened 1 year ago

tandrez commented 1 year ago

Hi,

I'm using Canonical MAAS to deploy Windows 11 and 2022 on baremetal desktops and servers respectively. At the end of the deployment, the machine boots successfully in Windows and I can login without problem. The problem is that the machine hangs in the "Deploying" state in MAAS and eventually change to "Failed deployment" after the deployment timeout (30min). I have figured out that the issue concerns Cloudbase-Init. The logs indicate that it cannot retrieve the metadata from MAAS with an HTTP error 401 Unauthorized (please see log exctract below).

cloudbase-init-unattend.log:

2023-05-25 12:47:32.318 3456 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.osutils.windows.WindowsUtils' load_class C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\utils\classloader.py:27
2023-05-25 12:47:32.818 3456 DEBUG cloudbaseinit.osutils.windows [-] Checking if service exists: cloudbase-init check_service_exists C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\osutils\windows.py:1097
2023-05-25 12:47:32.818 3456 DEBUG cloudbaseinit.osutils.windows [-] Getting service username: cloudbase-init get_service_username C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\osutils\windows.py:1230
2023-05-25 12:47:32.818 3456 DEBUG cloudbaseinit.osutils.windows [-] Resetting password for service user: .\cloudbase-init reset_service_password C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\osutils\windows.py:1253
2023-05-25 12:47:32.833 3456 DEBUG cloudbaseinit.osutils.windows [-] Setting service credentials: cloudbase-init set_service_credentials C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\osutils\windows.py:1213
2023-05-25 12:47:32.849 3456 DEBUG cloudbaseinit.init [-] No need to respawn process. Current user: WINDOWS-2022$. Service user: cloudbase-init _reset_service_password_and_respawn C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\init.py:137
2023-05-25 12:47:32.865 3456 INFO cloudbaseinit.init [-] Cloudbase-Init version: 1.1.4
2023-05-25 12:47:32.865 3456 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.plugins.common.mtu.MTUPlugin' load_class C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\utils\classloader.py:27
2023-05-25 12:47:32.880 3456 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin' load_class C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\utils\classloader.py:27
2023-05-25 12:47:32.896 3456 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin' load_class C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\utils\classloader.py:27
2023-05-25 12:47:32.911 3456 INFO cloudbaseinit.init [-] Executing plugins for stage 'PRE_NETWORKING':
2023-05-25 12:47:32.911 3456 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.plugins.common.mtu.MTUPlugin' load_class C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\utils\classloader.py:27
2023-05-25 12:47:32.911 3456 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin' load_class C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\utils\classloader.py:27
2023-05-25 12:47:32.911 3456 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin' load_class C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\utils\classloader.py:27
2023-05-25 12:47:32.911 3456 INFO cloudbaseinit.init [-] Executing plugins for stage 'PRE_METADATA_DISCOVERY':
2023-05-25 12:47:32.911 3456 INFO cloudbaseinit.init [-] Executing plugin 'MTUPlugin'
2023-05-25 12:47:32.911 3456 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.osutils.windows.WindowsUtils' load_class C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\utils\classloader.py:27
2023-05-25 12:47:42.956 3456 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.metadata.services.maasservice.MaaSHttpService' load_class C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\utils\classloader.py:27
2023-05-25 12:47:43.112 3456 WARNING oslo_config.cfg [-] Deprecated: Option "maas_metadata_url" from group "DEFAULT" is deprecated. Use option "metadata_base_url" from group "maas".
2023-05-25 12:47:43.112 3456 DEBUG cloudbaseinit.metadata.services.maasservice [-] Getting authorization headers for http://<MAAS_IP_ADDRESS>:5248/MAAS/metadata/2012-03-01/meta-data/. _get_oauth_headers C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\maasservice.py:89
2023-05-25 12:47:43.112 3456 WARNING oslo_config.cfg [-] Deprecated: Option "maas_oauth_consumer_key" from group "DEFAULT" is deprecated. Use option "oauth_consumer_key" from group "maas".
2023-05-25 12:47:43.112 3456 WARNING oslo_config.cfg [-] Deprecated: Option "maas_oauth_consumer_secret" from group "DEFAULT" is deprecated. Use option "oauth_consumer_secret" from group "maas".
2023-05-25 12:47:43.112 3456 WARNING oslo_config.cfg [-] Deprecated: Option "maas_oauth_token_key" from group "DEFAULT" is deprecated. Use option "oauth_token_key" from group "maas".
2023-05-25 12:47:43.112 3456 WARNING oslo_config.cfg [-] Deprecated: Option "maas_oauth_token_secret" from group "DEFAULT" is deprecated. Use option "oauth_token_secret" from group "maas".
2023-05-25 12:47:43.112 3456 DEBUG cloudbaseinit.metadata.services.base [-] Executing http request GET at http://<MAAS_IP_ADDRESS>:5248/MAAS/metadata/2012-03-01/meta-data/ _http_request C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\base.py:315
2023-05-25 12:47:43.128 3456 DEBUG urllib3.connectionpool [-] Starting new HTTP connection (1): <MAAS_IP_ADDRESS>:5248 _new_conn C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\urllib3\connectionpool.py:228
2023-05-25 12:47:43.143 3456 DEBUG urllib3.connectionpool [-] http://<MAAS_IP_ADDRESS>:5248 "GET /MAAS/metadata/2012-03-01/meta-data/ HTTP/1.1" 401 121 _make_request C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\urllib3\connectionpool.py:456
2023-05-25 12:47:47.158 3456 DEBUG cloudbaseinit.metadata.services.maasservice [-] Getting authorization headers for http://<MAAS_IP_ADDRESS>:5248/MAAS/metadata/2012-03-01/meta-data/. _get_oauth_headers C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\maasservice.py:89
2023-05-25 12:47:47.158 3456 DEBUG cloudbaseinit.metadata.services.base [-] Executing http request GET at http://<MAAS_IP_ADDRESS>:5248/MAAS/metadata/2012-03-01/meta-data/ _http_request C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\base.py:315
2023-05-25 12:47:47.158 3456 DEBUG urllib3.connectionpool [-] Starting new HTTP connection (1): <MAAS_IP_ADDRESS>:5248 _new_conn C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\urllib3\connectionpool.py:228
2023-05-25 12:47:47.174 3456 DEBUG urllib3.connectionpool [-] http://<MAAS_IP_ADDRESS>:5248 "GET /MAAS/metadata/2012-03-01/meta-data/ HTTP/1.1" 401 121 _make_request C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\urllib3\connectionpool.py:456
2023-05-25 12:47:51.189 3456 DEBUG cloudbaseinit.metadata.services.maasservice [-] Getting authorization headers for http://<MAAS_IP_ADDRESS>:5248/MAAS/metadata/2012-03-01/meta-data/. _get_oauth_headers C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\maasservice.py:89
2023-05-25 12:47:51.189 3456 DEBUG cloudbaseinit.metadata.services.base [-] Executing http request GET at http://<MAAS_IP_ADDRESS>:5248/MAAS/metadata/2012-03-01/meta-data/ _http_request C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\base.py:315
2023-05-25 12:47:51.189 3456 DEBUG urllib3.connectionpool [-] Starting new HTTP connection (1): <MAAS_IP_ADDRESS>:5248 _new_conn C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\urllib3\connectionpool.py:228
2023-05-25 12:47:51.204 3456 DEBUG urllib3.connectionpool [-] http://<MAAS_IP_ADDRESS>:5248 "GET /MAAS/metadata/2012-03-01/meta-data/ HTTP/1.1" 401 121 _make_request C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\urllib3\connectionpool.py:456
[... X retries]
2023-05-25 12:54:21.925 3456 DEBUG cloudbaseinit.metadata.services.maasservice [-] Getting authorization headers for http://<MAAS_IP_ADDRESS>:5248/MAAS/metadata/2012-03-01/meta-data/. _get_oauth_headers C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\maasservice.py:89
2023-05-25 12:54:21.925 3456 DEBUG cloudbaseinit.metadata.services.base [-] Executing http request GET at http://<MAAS_IP_ADDRESS>:5248/MAAS/metadata/2012-03-01/meta-data/ _http_request C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\base.py:315
2023-05-25 12:54:21.925 3456 DEBUG urllib3.connectionpool [-] Starting new HTTP connection (1): <MAAS_IP_ADDRESS>:5248 _new_conn C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\urllib3\connectionpool.py:228
2023-05-25 12:54:21.941 3456 DEBUG urllib3.connectionpool [-] http://<MAAS_IP_ADDRESS>:5248 "GET /MAAS/metadata/2012-03-01/meta-data/ HTTP/1.1" 401 121 _make_request C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\urllib3\connectionpool.py:456
2023-05-25 12:54:25.955 3456 DEBUG cloudbaseinit.metadata.services.maasservice [-] Getting authorization headers for http://<MAAS_IP_ADDRESS>:5248/MAAS/metadata/2012-03-01/meta-data/. _get_oauth_headers C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\maasservice.py:89
2023-05-25 12:54:25.955 3456 DEBUG cloudbaseinit.metadata.services.base [-] Executing http request GET at http://<MAAS_IP_ADDRESS>:5248/MAAS/metadata/2012-03-01/meta-data/ _http_request C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\base.py:315
2023-05-25 12:54:25.955 3456 DEBUG urllib3.connectionpool [-] Starting new HTTP connection (1): <MAAS_IP_ADDRESS>:5248 _new_conn C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\urllib3\connectionpool.py:228
2023-05-25 12:54:25.971 3456 DEBUG urllib3.connectionpool [-] http://<MAAS_IP_ADDRESS>:5248 "GET /MAAS/metadata/2012-03-01/meta-data/ HTTP/1.1" 401 121 _make_request C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\urllib3\connectionpool.py:456
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice [-] 401 Client Error: Unauthorized for url: http://<MAAS_IP_ADDRESS>:5248/MAAS/metadata/2012-03-01/meta-data/: requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: http://<MAAS_IP_ADDRESS>:5248/MAAS/metadata/2012-03-01/meta-data/
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice Traceback (most recent call last):
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice   File "C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\maasservice.py", line 80, in load
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice     self._get_cache_data('%s/meta-data/' % self._metadata_version)
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice   File "C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\base.py", line 77, in _get_cache_data
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice     data = self._exec_with_retry(lambda: self._get_data(path))
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice   File "C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\base.py", line 60, in _exec_with_retry
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice     return action()
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice   File "C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\base.py", line 77, in <lambda>
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice     data = self._exec_with_retry(lambda: self._get_data(path))
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice   File "C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\base.py", line 325, in _get_data
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice     response = self._http_request(path)
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice   File "C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\maasservice.py", line 107, in _http_request
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice     return super(MaaSHttpService, self)._http_request(url, data, headers,
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice   File "C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\base.py", line 319, in _http_request
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice     response.raise_for_status()
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice   File "C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\requests\models.py", line 1021, in raise_for_status
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice     raise HTTPError(http_error_msg, response=self)
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: http://<MAAS_IP_ADDRESS>:5248/MAAS/metadata/2012-03-01/meta-data/
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.metadata.services.maasservice 
2023-05-25 12:54:25.971 3456 DEBUG cloudbaseinit.metadata.services.maasservice [-] Metadata not found at URL 'http://<MAAS_IP_ADDRESS>:5248/MAAS/metadata/' load C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\maasservice.py:84
2023-05-25 12:54:25.971 3456 ERROR cloudbaseinit.init [-] No metadata service found: cloudbaseinit.exception.MetadataNotFoundException: No available service found
2023-05-25 12:54:25.971 3456 INFO cloudbaseinit.init [-] Plugins execution done

cloudbase-init-unattend.conf:

[DEFAULT]
config_drive_raw_hhd=true
config_drive_cdrom=true
config_drive_vfat=true
bsdtar_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\bsdtar.exe
mtools_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\
verbose=true
debug=true
log_dir=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\log\
log_file=cloudbase-init-unattend.log
default_log_levels=comtypes=INFO,suds=INFO,iso8601=WARN,requests=WARN
logging_serial_port_settings=
mtu_use_dhcp_config=true
ntp_use_dhcp_config=true
local_scripts_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\LocalScripts\
check_latest_version=false
metadata_services=cloudbaseinit.metadata.services.configdrive.ConfigDriveService,cloudbaseinit.metadata.services.httpservice.HttpService,cloudbaseinit.metadata.services.ec2service.EC2Service,cloudbaseinit.metadata.services.maasservice.MaaSHttpService
plugins=cloudbaseinit.plugins.common.mtu.MTUPlugin,cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin,cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin
allow_reboot=false
stop_service_on_exit=false
retry_count=100

metadata_services=cloudbaseinit.metadata.services.maasservice.MaaSHttpService
maas_metadata_url=http://<MAAS_IP_ADDRESS>:5248/MAAS/metadata/
maas_oauth_consumer_key=<AUTO_GENERATED>
maas_oauth_consumer_secret=''
maas_oauth_token_key=<AUTO_GENERATED>
maas_oauth_token_secret=<AUTO_GENERATED>

The thing is that I can access the metadata URL with a web browser on the machine without error (HTTP 200) and when I manually start the cloudbase-init service on the machine, it works (the machine reboots and change to "Deployed" state in MAAS if I do it before the deployment timeout expiration).

I have tried increasing the retry_count parameter to 100 in case the network was not ready but it does not solve the problem.

Link to the thread in MAAS Discourse with more history: Need help to deploy Windows 11 custom image

Any help would be greatly appreciated.

ab17182 commented 12 months ago

Hi tandrez, funnily enough, I just started playing with MAAS this weekend and got to the same point where a W11 VM gets built fine but ends in a "Failed deployment" state:

image

I used this as a guide: https://github.com/canonical/packer-maas/blob/d16375241ed5b8f196e3b35f1e4e5c0b9bec41f3/windows10/README.md

I never did create a cloudbase-init-unattend.conf file because the walk-through in the above never mentions it but I saw that you did. Where does that file need to reside? Also, did you use the same guide above or did you use something else? Only reason I ask is because it seems like the information is really sparse. I decided that I'd start putting a Terraform template together that'd build the VM that the MAAS rack+region server be installed on in Proxmox and use Ansible to automate the installation of MAAS and then look to see if I can automate the building of a WIndows Imaging environment using Ansible+Packer and then share it with everyone. Basically it'd be the equivalent of "Kubespray" for MAAS. All people would do is provide their own Windows ISO and it'd just add to MAAS with it ready to be deployed without a failed deployment state at the end. It's a real shame the product doesn't just do this out of the box.

I saw this was posted on June 27th so quite some time had passed. Hopefully you read this and can get back to me to let me know whether you fixed it or still have issues.

ader1990 commented 12 months ago

Hello,

You can try the Windows image build using this powershell only project -> https://github.com/cloudbase/windows-imaging-tools/blob/master/Examples/create-windows-online-cloud-image.ps1.

From the logs @tandrez, it seems that the Curtin hooks do not replace the placeholder values to correct values.

Thanks.

ab17182 commented 12 months ago

Thanks much Adrian! Will give this a whirl today. So I'd run this workflow on a Windows host instead of what I was previously using (a Linux host with Packer), correct?

ader1990 commented 12 months ago

Thanks much Adrian! Will give this a whirl today. So I'd run this workflow on a Windows host instead of what I was previously using (a Linux host with Packer), correct?

I would first check that curting hooks got the correct information and set the correct information in the cloudbase-init config files. Last time I checked, these curtin hooks worked fine also https://github.com/cloudbase/windows-curtin-hooks/tree/master/curtin.

Maybe this information can be helpful to check whether the MAAS image creation was correct: https://github.com/cloudbase/windows-imaging-tools/issues/370#issuecomment-1337736690

ab17182 commented 12 months ago

Ah, ok, so yes... I have the same curtin hooks your link (just did a diff compare): image

Here's the cloudbase output from these curtin config/cloudbase install: https://gist.github.com/ab17182/7f7da8f8a1de995267883a63318c9289

Weird thing is that the walkthrough I had creates "defaultuser" and "defaultpassword" for the user but there's no reference to that account in the cloudbase logs.

None-the-less, I'll start from scratch using your PS1 scripting toolset and see how I get along. I am hoping I won't have to sit there and pick this all apart. Everything I've seen to date has been just either a hodge-podge of disparate tools resulting in inconsistent results or something that almost works but requires tinkering/tweaking to get working. In looking at your link you've provided, it looks like this might be the easiest to use and I'm hoping will provide the desired state at the end.

ader1990 commented 12 months ago

Ah, ok, so yes... I have the same curtin hooks your link (just did a diff compare): image

Here's the cloudbase output from these curtin config/cloudbase install: https://gist.github.com/ab17182/7f7da8f8a1de995267883a63318c9289

Weird thing is that the walkthrough I had creates "defaultuser" and "defaultpassword" for the user but there's no reference to that account in the cloudbase logs.

None-the-less, I'll start from scratch using your PS1 scripting toolset and see how I get along. I am hoping I won't have to sit there and pick this all apart. Everything I've seen to date has been just either a hodge-podge of disparate tools resulting in inconsistent results or something that almost works but requires tinkering/tweaking to get working. In looking at your link you've provided, it looks like this might be the easiest to use and I'm hoping will provide the desired state at the end.

both cloudbase-init.conf and cloudbase-init-unattend.conf look to be wrong, those two should have been updated by the curtin hooks with the proper metadata from MAAS.

ab17182 commented 12 months ago

There's 3 files in there and I'm thinking I need to modify curtin-hook, right? Am I supposed to populate something in that file (or more than that file) or is MAAS supposed to automagically pass this information at first boot? I'm thinking it's the former since it's not working at the moment. That wasn't outlined/documented in the link I used so this is new info.