Post Deployment Problem

Hi All - I will try and give as much detail as possible here.

My setup is this. KVM server hosting MaaS VM and VM’s to be deployed. MaaS VM has 2 NICs on the following subnets - 192.168.1.0/24 (the main subnet that all other VMs and desktops live) which is a bridged network, and 192.168.2.0/24 (the MaaS deployment subnet) which is an Isolated network that allows MaaS to issue DHCP leases.

When I create a new VM Im putting the NIC into the Isolated network - and I am able to commission and deploy Ubuntu to the VM with no problems at all. However, once the VM is done deploying, I power off the VM and switch the NIC back into the bridged network - and thats when the trouble begins. The VM boots but hangs/freezes during the boot process. It looks like its trying to reach out to the MaaS server on the isolated network for some reason?

Any help in getting this resolved would be greatly appreciated!

If it help - this is what shows up on the deployed VM’s logs when trying to boot back into the bridged network:

023-10-13 01:41:31,741 - handlers.py[WARNING]: Failed posting event: {“name”: “init-network/check-cache”, “description”: “attempting to read from cache [trust]”, “event_type”: “start”, “origin”: “cloudinit”, “timestamp”: 1697161161.5931878}. This was caused by: HTTPConnectionPool(host=‘192.168.2.1’, port=5248): Max retries exceeded with url: /MAAS/metadata/status/qphc73 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fbffdbbd5d0>, ‘Connection to 192.168.2.1 timed out. (connect timeout=None)’))
2023-10-13 01:41:31,743 - handlers.py[WARNING]: Failed posting event: {“name”: “init-network/activate-datasource”, “description”: “activating datasource”, “event_type”: “start”, “origin”: “cloudinit”, “timestamp”: 1697161161.7719352}. This was caused by: HTTPConnectionPool(host=‘192.168.2.1’, port=5248): Max retries exceeded with url: /MAAS/metadata/status/qphc73 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fbffdbbe1a0>, ‘Connection to 192.168.2.1 timed out. (connect timeout=None)’))
2023-10-13 01:42:03,245 - handlers.py[WARNING]: Failed posting event: {“name”: “init-network/activate-datasource”, “description”: “activating datasource”, “event_type”: “finish”, “origin”: “cloudinit”, “timestamp”: 1697161161.7783277, “result”: “SUCCESS”}. This was caused by: HTTPConnectionPool(host=‘192.168.2.1’, port=5248): Max retries exceeded with url: /MAAS/metadata/status/qphc73 (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7fbffdbebc70>: Failed to establish a new connection: [Errno 101] Network is unreachable’))
Cloud-init v. 23.1.1-0ubuntu0~22.04.1 running ‘init-local’ at Fri, 13 Oct 2023 01:42:53 +0000. Up 6.43 seconds.
2023-10-13 01:42:53,834 - handlers.py[WARNING]: Failed posting event: {“name”: “init-local/check-cache”, “description”: “attempting to read from cache [trust]”, “event_type”: “start”, “origin”: “cloudinit”, “timestamp”: 1697161373.77282}. This was caused by: HTTPConnectionPool(host=‘192.168.2.1’, port=5248): Max retries exceeded with url: /MAAS/metadata/status/qphc73 (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f05faa10b80>: Failed to establish a new connection: [Errno 101] Network is unreachable’))
2023-10-13 01:42:53,836 - handlers.py[WARNING]: Failed posting event: {“name”: “init-local/check-cache”, “description”: “restored from cache: DataSourceMAAS [http://192.168.2.1:5248/MAAS/metadata/]”, “event_type”: “finish”, “origin”: “cloudinit”, “timestamp”: 1697161373.7980063, “result”: “SUCCESS”}. This was caused by: HTTPConnectionPool(host=‘192.168.2.1’, port=5248): Max retries exceeded with url: /MAAS/metadata/status/qphc73 (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f05faa10070>: Failed to establish a new connection: [Errno 101] Network is unreachable’))
2023-10-13 01:42:53,942 - handlers.py[WARNING]: Failed posting event: {“name”: “init-local”, “description”: “searching for local datasources”, “event_type”: “finish”, “origin”: “cloudinit”, “timestamp”: 1697161373.9402113, “result”: “SUCCESS”}. This was caused by: HTTPConnectionPool(host=‘192.168.2.1’, port=5248): Max retries exceeded with url: /MAAS/metadata/status/qphc73 (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f05fa09ec80>: Failed to establish a new connection: [Errno 101] Network is unreachable’))
2023-10-13 01:42:53,956 - handlers.py[WARNING]: Multiple consecutive failures in WebHookHandler. Cancelling all queued events.
Cloud-init v. 23.1.1-0ubuntu0~22.04.1 running ‘init’ at Fri, 13 Oct 2023 01:42:56 +0000. Up 8.56 seconds.
ci-info: ++++++++++++++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++++++++++++
ci-info: ±-------±-----±---------------------------±--------------±-------±------------------+
ci-info: | Device | Up | Address | Mask | Scope | Hw-Address |
ci-info: ±-------±-----±---------------------------±--------------±-------±------------------+
ci-info: | enp1s0 | True | 192.168.2.102 | 255.255.255.0 | global | 52:54:00:9b:2b:07 |
ci-info: | enp1s0 | True | fe80::5054:ff:fe9b:2b07/64 | . | link | 52:54:00:9b:2b:07 |
ci-info: | lo | True | 127.0.0.1 | 255.0.0.0 | host | . |
ci-info: | lo | True | ::1/128 | . | host | . |
ci-info: ±-------±-----±---------------------------±--------------±-------±------------------+
ci-info: ++++++++++++++++++++++++++++Route IPv4 info++++++++++++++++++++++++++++
ci-info: ±------±------------±--------±----------------±----------±------+
ci-info: | Route | Destination | Gateway | Genmask | Interface | Flags |
ci-info: ±------±------------±--------±----------------±----------±------+
ci-info: | 0 | 192.168.2.0 | 0.0.0.0 | 255.255.255.0 | enp1s0 | U |
ci-info: | 1 | 192.168.2.1 | 0.0.0.0 | 255.255.255.255 | enp1s0 | UH |
ci-info: ±------±------------±--------±----------------±----------±------+
ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++
ci-info: ±------±------------±--------±----------±------+
ci-info: | Route | Destination | Gateway | Interface | Flags |
ci-info: ±------±------------±--------±----------±------+
ci-info: | 1 | fe80::/64 | :: | enp1s0 | U |
ci-info: | 3 | local | :: | enp1s0 | U |
ci-info: | 4 | multicast | :: | enp1s0 | U |
ci-info: ±------±------------±--------±----------±------+

Hi @anyname58

MAAS doesn’t support scenario, when you move machine to a new subnet.

Thanks for the heads up troyanov. I do have a follow up question - as I have googled and not found a solution.

Do you have a recommendation for those trying to get this going in a homelab setup where we DHCP is already being supplied by the ISP router? Unfortunately this router does not support VLANs and I have not been able to find a way to get the router to forward just the PXE requests.

Thanks again!