maas-enlist script hard codes the path to the maas server

Bug #1034228 reported by Julian Edwards
6
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${mac}&hostname=${hostname}&architecture=${arch}&after_commissioning_action=0" \
            "${serverurl}"/MAAS/api/1.0/nodes/

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

Changed in maas:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Andres Rodriguez (andreserl) wrote :

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.

Changed in maas-enlist (Ubuntu):
assignee: nobody → Andres Rodriguez (andreserl)
Revision history for this message
Julian Edwards (julian-edwards) wrote :

Fantastic thanks Andres.

Changed in maas-enlist (Ubuntu):
status: New → Fix Committed
Changed in maas:
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package maas-enlist - 0.4+bzr29-0ubuntu1

---------------
maas-enlist (0.4+bzr29-0ubuntu1) quantal; urgency=low

  * bin/maas-enlist: Do not hardcode API path URL. If none is given use
    a default, otherwise use the one given with serverurl (LP: #1034228)
 -- Andres Rodriguez <email address hidden> Thu, 12 Jul 2012 14:32:03 -0400

Changed in maas-enlist (Ubuntu):
status: Fix Committed → Fix Released
Changed in maas:
status: Fix Committed → Fix Released
Revision history for this message
Julian Edwards (julian-edwards) wrote :

This is not yet fixed in MAAS, the preseed template "enlist_userdata" needs changing.

Changed in maas-enlist (Ubuntu):
status: Fix Released → Triaged
status: Triaged → Fix Released
Changed in maas:
status: Fix Released → Triaged
Changed in maas:
status: Triaged → Fix Released
assignee: nobody → Julian Edwards (julian-edwards)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.