maas-enlist script hard codes the path to the maas server
Bug #1034228 reported by
Julian Edwards
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Julian Edwards | ||
maas-enlist (Ubuntu) |
Fix Released
|
Undecided
|
Andres Rodriguez |
Bug Description
curl \
--data "op=new$
Currently serverurl is actually a just host name. MAAS should pass the full string to the enlistment URL and maas-enlist should not hard code it because this will not work in a demo environment as it stands.
Related branches
lp:~julian-edwards/maas/enlistment-preseed-fix
- Jeroen T. Vermeulen (community): Approve
-
Diff: 46 lines (+5/-4)3 files modifiedcontrib/preseeds_v2/enlist_userdata (+2/-2)
src/maasserver/preseed.py (+1/-0)
src/maasserver/tests/test_preseed.py (+2/-2)
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → Critical |
Changed in maas-enlist (Ubuntu): | |
status: | New → Fix Committed |
Changed in maas: | |
status: | Triaged → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
Changed in maas: | |
status: | Triaged → Fix Released |
assignee: | nobody → Julian Edwards (julian-edwards) |
To post a comment you must log in.
The reason why the API path was hardcoded is because maas-enlist was intended to be used against a MAAS server deployed from the Debian package. This meant that the API path would not change. Other reasons are because in the preseed (in cobbler world) we were only able to send the IP address of the MAAS server. Finally, for simplicity reasons (and manual enlistment) it was decided to only pass the hostname/ip address when enlistment.
Now, based on the discussion on IRC and to maintain backward compatibility, the new approach will be:
1. If maas-enlist gets passed only the 'hostname/ip address' of the MAAS server, then it will automatically add '/MAAS/ api/1.0/ nodes' as default API path.
2. If maas-enlist gets passed a URL with the API path, it will override the default value and the URL will be used instead.
By doing so, we ensure that we maintain backwards compatibility.
I'm more than happy to fix this. I have assigned this to me.