Importing custom boot images is broken in MAAS 1.10.

Bug #1546274 reported by Rod Smith
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Lee Trager

Bug Description

I've tried importing custom images with MAAS 1.10 (version information below) with the following commands:

$ sudo maas-region-admin apikey --username rodsmith
qUf4nh7bcnKDhhuaum:hSQyL5GFz9DpY5yCrj:gtChb22JDfxP8ydx6k8WdwfaLpmrebeq
$ maas login admin http://172.24.124.1/MAAS/api/1.0 qUf4nh7bcnKDhhuaum:hSQyL5GFz9DpY5yCrj:gtChb22JDfxP8ydx6k8WdwfaLpmrebeq
$ maas admin boot-resources create name=u1510_amd64 title="Ubuntu 15.10 (AMD64)" architecture=amd64/generic content@=/home/rodsmith/ubuntu-15.10-server-amd64-curtin.tar.gz
usage: /usr/lib/python3/dist-packages/maascli/__main__.py [-h] COMMAND ...

optional arguments:
  -h, --help show this help message and exit

drill down:
  COMMAND
    login Log in to a remote API, and remember its description and
              credentials.
    refresh Refresh the API descriptions of all profiles.
    logout Log out of a remote API, purging any stored credentials.
    list List remote APIs that have been logged-in to.
    admin Interact with http://172.24.124.1/MAAS/api/1.0/

http://maas.ubuntu.com/

the JSON object must be str, not 'bytes'

This sequence worked in MAAS 1.9, but appears to be broken in 1.10 -- or has the syntax for adding custom images changed with 1.10?

Here's my 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.10.0+bzr4578-0ubuntu2 all MAAS server all-in-one metapackage
ii maas-cert-server 0.2.13-0~43~ubuntu15.10.1 all Ubuntu certification support files for MAAS server
ii maas-cli 1.10.0+bzr4578-0ubuntu2 all MAAS command line API tool
ii maas-cluster-controller 1.10.0+bzr4578-0ubuntu2 all MAAS server cluster controller
ii maas-common 1.10.0+bzr4578-0ubuntu2 all MAAS server common files
ii maas-dhcp 1.10.0+bzr4578-0ubuntu2 all MAAS DHCP server
ii maas-dns 1.10.0+bzr4578-0ubuntu2 all MAAS DNS server
ii maas-proxy 1.10.0+bzr4578-0ubuntu2 all MAAS Caching Proxy
ii maas-region-controller 1.10.0+bzr4578-0ubuntu2 all MAAS server complete region controller
ii maas-region-controller-min 1.10.0+bzr4578-0ubuntu2 all MAAS Server minimum region controller
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 1.10.0+bzr4578-0ubuntu2 all MAAS server Django web framework (Python 3)
ii python3-maas-client 1.10.0+bzr4578-0ubuntu2 all MAAS python API client (Python 3)
ii python3-maas-provisioningserver 1.10.0+bzr4578-0ubuntu2 all MAAS server provisioning libraries (Python 3)

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

Related branches

Revision history for this message
Rod Smith (rodsmith) wrote :
Changed in maas:
status: New → Triaged
importance: Undecided → Critical
milestone: none → 2.0.0
tags: added: python3
Revision history for this message
Marc-Andre Gatien (m-gatien) wrote :

patched :

line 134 :

from :
data = json.loads(content)
to:
data = json.loads(content.decode('utf-8'))

Jeff Lane  (bladernr)
tags: added: hwcert-server
Revision history for this message
Marc-Andre Gatien (m-gatien) wrote :

Here's the patch attached.

Revision history for this message
Jeff Lane  (bladernr) wrote :

This is also affecting 2.0. I can at least see the custom images on the images tab, but I am not able to choose "Custom" when trying to deploy a node.

Revision history for this message
Jeff Lane  (bladernr) wrote :

FWIW, I applied Marc-Andre's patch to my running 2.0 system. The images do now appear (I had to re-import them all) when I attempt a deployment.

However, I noticed that there are now 3 "Customs" and one "Ubuntu" in the first dropdown box. Attached a screenshot of that...

But all images appear in the Images dropdown for Custom. I have not tried a deployment just yet, will do that next.

Revision history for this message
Jeff Lane  (bladernr) wrote :

The number of "customs" changes from time to time, sometimes I've seen two, sometimes as many as 8. Last time I looked it was two, but earlier today it was 3 or 4.

Revision history for this message
Rod Smith (rodsmith) wrote :

Jeff, the duplication of "custom" in the dropdown box is a separate issue from the inability to import images; I've seen that in the past, well before I encountered any problem importing custom images. It's definitely a bug, but it's a very minor one. I recommend filing a separate bug report about it.

no longer affects: maas/1.10
Changed in maas:
assignee: nobody → Lee Trager (ltrager)
status: Triaged → In Progress
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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