Can Maas run without Internet

Hello All

I need to use maas for batch managed machine management (operating system installation) in a scenario where the internet cannot be connected

After the physical server was booted using PXE, it failed after entering the ubuntu interface.

Does anyone know how to add a server to MAAS for management without internet?

MaaS don’t need internet, it needs repositories for packages and images.
If you can provide those repositories internally then you’re good to go.

1 Like

See https://maas.io/docs/air-gapped-maas for docs which cover this very scenario

I have imported the image offline, and now I can enter the ubuntu 20.04 interface when I boot the HOST through PXE, and continue to output cloudinit logs

I think I should be missing a dep local repo.

If you mirror the entire ubutnu source to the local, it will be very large.

Can I only mirror the deb package that needs to be installed after PXE boot.

Where can I find this list of necessary deb packages?

I just checked the log again

I found the following logs under maas/rsyslog/maas-node/2021-03-16

I suspect that it is the ultimate cause of the unavailability.

2021-03-16T04:18:17+00:00 maas-enlisting-node dhclient[2474]: XMT: Solicit on eno4, interval 4410ms.
2021-03-16T04:18:17+00:00 maas-enlisting-node cloud-init[2345]: Finished 50-maas-01-commissioning: 0
2021-03-16T04:18:18+00:00 maas-enlisting-node dhclient[2447]: DHCPDISCOVER on eno4 to 255.255.255.255 port 67 interval 9 (xid=0x97138d61)
2021-03-16T04:18:18+00:00 maas-enlisting-node dhclient[2476]: XMT: Solicit on eno1, interval 7490ms.
2021-03-16T04:18:19+00:00 maas-enlisting-node cloud-init[2345]: Traceback (most recent call last):
2021-03-16T04:18:19+00:00 maas-enlisting-node cloud-init[2345]: File “/tmp/user_data.sh.LsJUJp/bin/maas-run-remote-scripts”, line 1755, in
2021-03-16T04:18:19+00:00 maas-enlisting-node cloud-init[2345]: main()
2021-03-16T04:18:19+00:00 maas-enlisting-node cloud-init[2345]: File “/tmp/user_data.sh.LsJUJp/bin/maas-run-remote-scripts”, line 1735, in main
2021-03-16T04:18:19+00:00 maas-enlisting-node cloud-init[2345]: fail_count = run_scripts_from_metadata(
2021-03-16T04:18:19+00:00 maas-enlisting-node cloud-init[2345]: File “/tmp/user_data.sh.LsJUJp/bin/maas-run-remote-scripts”, line 1501, in run_scripts_from_metadata
2021-03-16T04:18:19+00:00 maas-enlisting-node cloud-init[2345]: fail_count += run_scripts(
2021-03-16T04:18:19+00:00 maas-enlisting-node cloud-init[2345]: File “/tmp/user_data.sh.LsJUJp/bin/maas-run-remote-scripts”, line 1476, in run_scripts
2021-03-16T04:18:19+00:00 maas-enlisting-node cloud-init[2345]: fail_count = run_serial_scripts(
2021-03-16T04:18:19+00:00 maas-enlisting-node cloud-init[2345]: File “/tmp/user_data.sh.LsJUJp/bin/maas-run-remote-scripts”, line 1278, in run_serial_scripts
2021-03-16T04:18:19+00:00 maas-enlisting-node cloud-init[2345]: send_unsent_results(scripts)
2021-03-16T04:18:19+00:00 maas-enlisting-node cloud-init[2345]: File “/tmp/user_data.sh.LsJUJp/bin/maas-run-remote-scripts”, line 1233, in send_unsent_results
2021-03-16T04:18:19+00:00 maas-enlisting-node cloud-init[2345]: args[“runtime”] = unsent_script[“runtime”]
2021-03-16T04:18:19+00:00 maas-enlisting-node cloud-init[2345]: KeyError: ‘runtime’
2021-03-16T04:18:19+00:00 maas-enlisting-node cloud-init[2345]: Cloud-init v. 20.4.1-0ubuntu1~20.04.1 running ‘modules:final’ at Tue, 16 Mar 2021 04:17:34 +0000. Up 43.67 seconds.
2021-03-16T04:18:19+00:00 maas-enlisting-node cloud-init[2345]: 2021-03-16 04:18:19,261 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
2021-03-16T04:18:19+00:00 maas-enlisting-node cloud-init[2345]: 2021-03-16 04:18:19,262 - util.py[WARNING]: Running module scripts-user (<module ‘cloudinit.config.cc_scripts_user’ from ‘/usr/lib/python3/dist-packages/cloudinit/config/cc_scripts_user.py’>) failed
2021-03-16T04:18:19+00:00 maas-enlisting-node ec2:
2021-03-16T04:18:19+00:00 maas-enlisting-node ec2: #############################################################
2021-03-16T04:18:19+00:00 maas-enlisting-node ec2: -----BEGIN SSH HOST KEY FINGERPRINTS-----
2021-03-16T04:18:19+00:00 maas-enlisting-node ec2: 1024 SHA256:D5lp9c7rnrbyTMYZ9R4yPprjQKJPviE4G3f26vtx6UI root@maas-enlisting-node (DSA)
2021-03-16T04:18:19+00:00 maas-enlisting-node ec2: 256 SHA256:dpxpYNNMEHUz4lUsNXl4tVPlO11jgVP5hk5Xbvrr9wY root@maas-enlisting-node (ECDSA)
2021-03-16T04:18:19+00:00 maas-enlisting-node ec2: 256 SHA256:rrPpS3VW1QtHg6sKf1XSka4k/1XLEHMsNqieuDS4iUM root@maas-enlisting-node (ED25519)
2021-03-16T04:18:19+00:00 maas-enlisting-node ec2: 3072 SHA256:oKIwIXlwDxq/S3URj+kL854DrHZL3uLlXUrX18W38H8 root@maas-enlisting-node (RSA)
2021-03-16T04:18:19+00:00 maas-enlisting-node ec2: -----END SSH HOST KEY FINGERPRINTS-----
2021-03-16T04:18:19+00:00 maas-enlisting-node ec2: #############################################################
2021-03-16T04:18:19+00:00 maas-enlisting-node cloud-init[2345]: ci-info: no authorized SSH keys fingerprints found for user ubuntu.
2021-03-16T04:18:19+00:00 maas-enlisting-node cloud-init[2345]: Cloud-init v. 20.4.1-0ubuntu1~20.04.1 finished at Tue, 16 Mar 2021 04:18:19 +0000. Datasource DataSourceMAAS [http://192.168.31.200:5248/MAAS/metadata/]. Up 88.93 seconds
2021-03-16T04:18:19+00:00 maas-enlisting-node systemd[1]: cloud-final.service: Main process exited, code=exited, status=1/FAILURE
2021-03-16T04:18:19+00:00 maas-enlisting-node systemd[1]: cloud-final.service: Failed with result ‘exit-code’.
2021-03-16T04:18:19+00:00 maas-enlisting-node systemd[1]: Failed to start Execute cloud user/final scripts.
2021-03-16T04:18:19+00:00 maas-enlisting-node systemd[1]: Reached target Cloud-init target.
2021-03-16T04:18:19+00:00 maas-enlisting-node systemd[1]: Startup finished in 20.980s (kernel) + 1min 8.030s (userspace) = 1min 29.010

Make sure your MaaS Rack server and your deployed machine share a common network.
The PXE network must be configured on your deployed machine because it must be able to talk to the MaaS Rack server to get the cloud init commands.

The rack server is in the same network as the deployed machine.

As long as I delete the default route of the rack server (simulating maas cannot connect to the Internet), the above problem will be reproduced 100%.

Are you behind a proxy ?

If so, you must configure MaaS to use “peer” in the MaaS proxy configuration.

maas is not a proxy.

Maas is the same as the server that needs to be managed, and it cannot connect to the internet.

This is an isolated network environment, it cannot connect to any internet.

config.network.proxy=MAAS built-in.

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