api_url regexp wrong during enlist/commission

Bug #1756127 reported by Martin Hellström
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Low
Unassigned
2.3
Fix Released
Low
Unassigned

Bug Description

In the python3-django-maas v 2.3.0-6434 on xenial the regexp for api_url in src/metadataserver/user_data/templates/snippets/maas_enlist.sh is wrong on line 234. It fails to match on uppercase. So for instance if the maas url is http:/maas-server.maas.local/MAAS/api/2.0/machines/ it will fail because MAAS is in uppercase.

Our fix for this is to change the regexp to '(^[a-z]+://|^)[a-zA-Z0-9\.\/\-]+($|\/$)' which will match for uppercase as well.

Output from dpkg -l '*maas*'

||/ Name Version Architecture Description
+++-===============================-====================================-============-=================================================
ii maas 2.3.0-6434-gd354690-0ubuntu1~16.04.1 all "Metal as a Service" is a physical cloud and IPAM
ii maas-cli 2.3.0-6434-gd354690-0ubuntu1~16.04.1 all MAAS client and command-line interface
un maas-cluster-controller <none> <none> (no description available)
ii maas-common 2.3.0-6434-gd354690-0ubuntu1~16.04.1 all MAAS server common files
ii maas-dhcp 2.3.0-6434-gd354690-0ubuntu1~16.04.1 all MAAS DHCP server
ii maas-dns 2.3.0-6434-gd354690-0ubuntu1~16.04.1 all MAAS DNS server
ii maas-proxy 2.3.0-6434-gd354690-0ubuntu1~16.04.1 all MAAS Caching Proxy
ii maas-rack-controller 2.3.0-6434-gd354690-0ubuntu1~16.04.1 all Rack Controller for MAAS
ii maas-region-api 2.3.0-6434-gd354690-0ubuntu1~16.04.1 all Region controller API service for MAAS
ii maas-region-controller 2.3.0-6434-gd354690-0ubuntu1~16.04.1 all Region Controller for MAAS
un maas-region-controller-min <none> <none> (no description available)
un python-django-maas <none> <none> (no description available)
un python-maas-client <none> <none> (no description available)
un python-maas-provisioningserver <none> <none> (no description available)
ii python3-django-maas 2.3.0-6434-gd354690-0ubuntu1~16.04.1 all MAAS server Django web framework (Python 3)
ii python3-maas-client 2.3.0-6434-gd354690-0ubuntu1~16.04.1 all MAAS python API client (Python 3)
ii python3-maas-provisioningserver 2.3.0-6434-gd354690-0ubuntu1~16.04.1 all MAAS server provisioning libraries (Python 3)

Related branches

Changed in maas:
importance: Undecided → Low
status: New → Triaged
milestone: none → 2.4.0beta1
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Thanks for the bug report. I've made a PR for 2.4, and will backport to 2.3. It will be available in the next release. (2.3.2)

Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
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.