API succeeds if invalid parameter is passed

Bug #1785690 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Low
Unassigned

Bug Description

I passed an invalid parameter over the API and it succeeded without showing me an error.

In this case, the resource_pool parameter doesn't exist, but the operation succeeded.

ubuntu@maas00:~$ maas admin machine update k8s4kq resource_pool=test-pool
Success.
Machine-readable output follows:
{
    "volume_groups": [],
    "cpu_speed": 2300,
    "storage": 120034.123776,
    "status_message": "",
    "zone": {
        "name": "test1",
        "description": "",
        "id": 1,
        "resource_uri": "/MAAS/api/2.0/zones/test1/"
    },
    "tag_names": [],
    "status_action": "",

Tags: cli
Changed in maas:
milestone: none → 2.5.0alpha2
importance: Undecided → High
status: New → Triaged
description: updated
Changed in maas:
milestone: 2.5.0alpha2 → 2.5.0beta1
Changed in maas:
assignee: nobody → Mike Pontillo (mpontillo)
tags: added: api
Revision history for this message
Mike Pontillo (mpontillo) wrote :

This is a large API design change that would need to be discussed further before implementing.

Each API endpoint differs in how it accepts parameters (some are tightly coupled to Django forms, and some aren't, for example).

Implementing it generally may also cause forward-compatibility problems (such as if we support a new optional parameter in MAAS 2.6, and API clients make use of it before it is available).

Finally, this is a risky change to treat as a bug fix, since it would touch the entire surface of the API.

Thus, marking this 'Opinion' until we discuss further.

Changed in maas:
status: Triaged → Opinion
Changed in maas:
milestone: 2.5.0beta1 → 2.5.0beta2
Changed in maas:
milestone: 2.5.0beta2 → 2.5.0rc1
Changed in maas:
milestone: 2.5.0rc1 → 2.5.x
Alberto Donato (ack)
Changed in maas:
status: Opinion → Triaged
importance: High → Low
assignee: Mike Pontillo (mpontillo) → nobody
milestone: 2.5.x → none
summary: - [2.5, API] API succeeds if invalid parameter is passed
+ API succeeds if invalid parameter is passed
tags: added: cli
removed: api
Revision history for this message
Jerzy Husakowski (jhusakowski) wrote :

CLI improvement request moved to internal backlog for further prioritisation (Internal ref. PF-3912)

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