Setting default_distro_series via "maas" command doesn't work

Bug #1470591 reported by Rod Smith on 2015-07-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
High
Blake Rouse
1.8
High
Blake Rouse

Bug Description

I haven't been able to set the default_distro_series via the "maas" command line. I suspect the cause is that the set_config command for this option requires input of the form "{os}/{series}" (as in "ubuntu/trusty" or "custom/u14.04.2_amd64"); but the {os} is actually set via the separate default_osystem option. For instance, let's start with the default configuration:

$ maas admin maas get-config name=default_osystem
Success.
Machine-readable output follows:
"ubuntu"
$ maas admin maas get-config name=default_distro_series
Success.
Machine-readable output follows:
"trusty"

Checking the web UI, an undeployed node's page includes:

Operating System
    Ubuntu 14.04 LTS "Trusty Tahr"

Now try setting the default distribution to a custom image that was previously imported:

$ maas admin maas set-config name=default_osystem value="custom"
Success.
Machine-readable output follows:
OK
$ maas admin maas set-config name=default_distro_series value="u14.04.2_amd64"
{"default_distro_series": ["'u14.04.2_amd64' is not a valid release. It should be one of: 'ubuntu/precise', 'ubuntu/trusty', 'custom/u14.04_amd64', 'custom/u14.04.1_amd64', 'custom/u14.04.2_amd64'."]}

Following the directions and adding "custom/" to the specification seems to work:

$ maas admin maas set-config name=default_distro_series value="custom/u14.04.2_amd64"
Success.
Machine-readable output follows:
OK

Checking the result with get_config, though, shows that "custom/" is present in the string when it (or "ubuntu/") hadn't been before changing the setting:

$ maas admin maas get-config name=default_distro_series
Success.
Machine-readable output follows:
"custom/u14.04.2_amd64"

(When setting the default_distro_series via the web UI, "custom/" is missing from the output of this command.)

Furthermore, the web UI now shows a confused default OS for an undeployed node, with a doubling-up of "custom/":

Operating System
    custom/custom/u14.04.2_amd64

An attempt to deploy the node shows OS dropdowns of "Custom" and "Ubuntu 14.04 GA (amd64)" -- note that the latter is a description associated with a DIFFERENT custom image than u14.04.2_amd64 -- namely, u14.04_amd64, on my system. Leaving those as-is results in a deployment of the u14.04_amd64 image, not the u14.04.2_amd64 image. I've also seen a completely failed deployment once or twice, but have been unable to pin down the precise circumstances to re-create that problem.

Similar results obtain when trying to set a different standard MAAS boot image (default_osystem of "ubuntu" with default_distro_series set to "precise" vs. "ubuntu/precise", for instance); however, in this case the web UI seems to "translate" the names correctly for deployment, so a deployment with the defaults will succeed to the intended version, at least in my brief testing. (The web UI does show an OS of "ubuntu/ubuntu/precise", though.)

I'm attaching my /var/log/maas directory tree as a tarball.

Here's my MAAS version information:

$ dpkg -l '*maas*'|cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================================================-===================================================-============-===============================================================================
ii maas 1.8.0+bzr4001-0ubuntu2~trusty1 all MAAS server all-in-one metapackage
ii maas-cert-server 0.1.2-0~22~ubuntu14.04.1 all Ubuntu certification support files for MAAS server
ii maas-cli 1.8.0+bzr4001-0ubuntu2~trusty1 all MAAS command line API tool
ii maas-cluster-controller 1.8.0+bzr4001-0ubuntu2~trusty1 all MAAS server cluster controller
ii maas-common 1.8.0+bzr4001-0ubuntu2~trusty1 all MAAS server common files
ii maas-dhcp 1.8.0+bzr4001-0ubuntu2~trusty1 all MAAS DHCP server
ii maas-dns 1.8.0+bzr4001-0ubuntu2~trusty1 all MAAS DNS server
ii maas-proxy 1.8.0+bzr4001-0ubuntu2~trusty1 all MAAS Caching Proxy
ii maas-region-controller 1.8.0+bzr4001-0ubuntu2~trusty1 all MAAS server complete region controller
ii maas-region-controller-min 1.8.0+bzr4001-0ubuntu2~trusty1 all MAAS Server minimum region controller
ii python-django-maas 1.8.0+bzr4001-0ubuntu2~trusty1 all MAAS server Django web framework
ii python-maas-client 1.8.0+bzr4001-0ubuntu2~trusty1 all MAAS python API client
ii python-maas-provisioningserver 1.8.0+bzr4001-0ubuntu2~trusty1 all MAAS server provisioning libraries

Related branches

Rod Smith (rodsmith) wrote :
Changed in maas:
status: New → In Progress
importance: Undecided → High
milestone: none → 1.8.1
assignee: nobody → Blake Rouse (blake-rouse)
milestone: 1.8.1 → 1.9.0
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers