Wrong metadata url in enlist cloud-config
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Committed
|
High
|
Anton Troyanov | ||
3.2 |
Fix Released
|
High
|
Anton Troyanov | ||
3.3 |
Fix Committed
|
High
|
Anton Troyanov | ||
3.4 |
Fix Released
|
High
|
Anton Troyanov |
Bug Description
Hello,
this is single host, rack+region scenario. Version 3.3.3. Metadata url is presented without a specific port and it's unreachable on default 80.
Steps to reproduce:
When visiting url passed on to kernel/initrd by bootloader:
http://
I receive following cloud-config script
#cloud-config
apt:
preserve_
primary:
- arches:
- amd64
- i386
uri: http://
- arches:
- default
uri: http://
proxy: http://
security:
- arches:
- amd64
- i386
uri: http://
- arches:
- default
uri: http://
sources_list: 'deb $PRIMARY $RELEASE universe restricted main multiverse
# deb-src $PRIMARY $RELEASE universe restricted main multiverse
deb $PRIMARY $RELEASE-updates universe restricted main multiverse
# deb-src $PRIMARY $RELEASE-updates universe restricted main multiverse
deb $PRIMARY $RELEASE-backports universe restricted main multiverse
# deb-src $PRIMARY $RELEASE-backports universe restricted main multiverse
deb $SECURITY $RELEASE-security universe restricted main multiverse
# deb-src $SECURITY $RELEASE-security universe restricted main multiverse
'
datasource:
MAAS:
metadata_url: http://
manage_etc_hosts: true
packages:
- python3-yaml
- python3-oauthlib
power_state:
condition: test ! -e /tmp/block-poweroff
delay: now
mode: poweroff
timeout: 1800
rsyslog:
remotes:
maas: 192.168.0.234:5247
Please note metadat_url not having a port specified. The enlistment process hangs during ephemeral image startup after
[ OK ] Reached target Host and Netowrka Name Lookups
and then typically times out but with no datasource configured and resulting in failed enlistment.
You can work it around by replacing default /etc/maas/
{{preseed_data}}
with
#cloud-config
apt:
preserve_
primary:
- arches:
- amd64
- i386
uri: http://
- arches:
- default
uri: http://
security:
- arches:
- amd64
- i386
uri: http://
- arches:
- default
uri: http://
sources_list: 'deb $PRIMARY $RELEASE main restricted multiverse universe
# deb-src $PRIMARY $RELEASE main restricted multiverse universe
deb $PRIMARY $RELEASE-updates main restricted multiverse universe
# deb-src $PRIMARY $RELEASE-updates main restricted multiverse universe
deb $PRIMARY $RELEASE-backports main restricted multiverse universe
# deb-src $PRIMARY $RELEASE-backports main restricted multiverse universe
deb $SECURITY $RELEASE-security main restricted multiverse universe
# deb-src $SECURITY $RELEASE-security main restricted multiverse universe
'
datasource:
MAAS:
metadata_url: http://
manage_etc_hosts: true
packages:
- python3-yaml
- python3-oauthlib
power_state:
condition: test ! -e /tmp/block-poweroff
delay: now
mode: poweroff
timeout: 1800
rsyslog:
remotes:
maas: 10.141.200.9:5247
Commisioning and deployment are not affected.
With regards
Michal K.
Related branches
- Anton Troyanov: Approve
- MAAS Lander: Approve
-
Diff: 16 lines (+2/-2)1 file modifiedsrc/provisioningserver/templates/http/rackd.nginx.conf.template (+2/-2)
- Anton Troyanov: Approve
- MAAS Lander: Approve
-
Diff: 16 lines (+2/-2)1 file modifiedsrc/provisioningserver/templates/http/rackd.nginx.conf.template (+2/-2)
- Anton Troyanov: Approve
- MAAS Lander: Approve
-
Diff: 16 lines (+2/-2)1 file modifiedsrc/provisioningserver/templates/http/rackd.nginx.conf.template (+2/-2)
- Alberto Donato: Approve
- MAAS Lander: Approve
-
Diff: 16 lines (+2/-2)1 file modifiedsrc/provisioningserver/templates/http/rackd.nginx.conf.template (+2/-2)
Changed in maas: | |
assignee: | nobody → Anton Troyanov (troyanov) |
Changed in maas: | |
status: | Triaged → Fix Committed |
Hello Michal!
Do you have MAAS running behind a loadbalancer or reverse proxy?
Or maybe your machine has multiple interfaces?
--- compose_ preseed. py:661
FTR
The function that templates this config starts here: src/maasserver/
def build_metadata_ url(request, route, rack_controller, node=None, extra=""): ller_host( request, node=node) .fqdn
request. build_absolute_ uri(route) + extra scheme} ://{host} :{RACK_ CONTROLLER_ PORT}{route} {extra} "
host = _get_rackcontro
if host is None and rack_controller is not None:
host = rack_controller
return (
if not host
else f"{request.
)