Bug: MaaS API ignores osystem and distro parameters

MAAS version: 2.9.2 (9165-g.c3e7848d1)

Also logged here but not sure if that’s the right place (no interactions): https://bugs.launchpad.net/maas/+bug/1923315

I am trying to call the MAAS API to deploy an OS to a system, but regardless of what I use as the “osystem” and “distro” params, the server appears to ignore them and report that the selected deployment OS is Ubuntu, which of course doesn’t support VMFS6.

The API POST request is:

http://{{maas-url}}/MAAS/api/2.0/machines/{{system_id}}/?op=deploy&osystem=esxi&distro=7.0&user_data={{user_data}}

The response body is:
{"storage": ["Mount the root '/' filesystem to be able to deploy this node.", "This node cannot be deployed because the selected deployment OS, ubuntu, does not support VMFS6."]}

If I do a GET on api/2.0/boot-resources/ the response includes the following item:
{
“id”: 29,
“type”: “Uploaded”,
“name”: “esxi/7.0”,
“architecture”: “amd64/generic”,
“resource_uri”: “/MAAS/api/2.0/boot-resources/29/”,
“subarches”: “generic”,
“title”: “ESXi 7.0”
}

Other POST requests like op=release have worked fine.

I have tried with another non-Ubuntu OS and get the same result.

http://{{maas-url}}/MAAS/api/2.0/machines/8qtcnf/?op=deploy&osystem=centos&distro=centos70

returns the following (noting that it refers to ubuntu as the selected deployment OS):

{
  "storage": [
    "Mount the root '/' filesystem to be able to deploy this node.",
    "This node cannot be deployed because the selected deployment OS, ubuntu, does not support VMFS6."
  ]
}

If I use a flat storage layout on that machine instead of VMFS6, the deploy call works, but deploys Ubuntu…

OK, couple of things have changed since I opened this.

Firstly, I re-read the main API docs and realised that I needed to pass the parameters as multipart/form-data. I did that but still had the same problem.

Secondly, I noticed that the “distro” parameter needed to be “distro_series”. Not sure if I just missed that when I looked before or it changed, or I was looking at an old version of the doc but whatever.

So using http://{{maas-url}}/MAAS/api/2.0/machines/8qtcnf/?op=deploy as the URL for the POST request, with the following form-data worked fine.

KEY VALUE
osystem esxi
distro_series 7.0

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.