maas-enlist fails if $serverurl contains dashes

Bug #1387281 reported by Tomohiro ishihara
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
maas-enlist (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

line 184-187 in /etc/maas/templates/commissioning-user-data/snippets :

if echo "$serverurl" | egrep -q '(^[a-z]+://|^)[a-z0-9\.]+($|/$)'; then
 api_url="MAAS/api/1.0/nodes/"
else
 api_url=`echo $serverurl | sed 's#^\(\|[a-z]\+://\)[a-zA-Z0-9\.]\+\(\|\:[0-9]\+\)/##'`
fi

-----

DNS host name could contain '-'(hyphen), so you should use

[a-zA-Z0-9\.\-]

insted of

[a-zA-Z0-9\.]

Tags: patch
Revision history for this message
Tomohiro ishihara (sho-r) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "maas_enlist.sh.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in maas-enlist (Ubuntu):
status: New → Confirmed
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.