[API] MAAS cli incorrect "Success" message

Bug #1750604 reported by Peter Sabaini
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Medium
Unassigned

Bug Description

Updating a deployed nodes' interface config via the maas CLI outputs a success message, but actually doesn't do anything.

If the operation did not succeed the CLI should throw an error, otherwise this can introduce hard to spot misconfiguration

Eg.:

$ maas maas-root interface update kahrsc 473 bond_mode=active-backup
Success.
Machine-readable output follows:
...
    "id": 473,
...
    "system_id": "kahrsc",
...
    "params": {
        "bond_xmit_hash_policy": "layer2",
        "bond_miimon": 100,
        "bond_mode": "balance-rr",
...

Maas 2.3.0-6434-gd354690-0ubuntu1~16.04.1

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Peter,

Is there any logs at all that would show why this failed to update?

The API outputs success to the *request* that it made to the server, but the "output" section should actually say whether there was a failure or not.

Changed in maas:
status: New → Incomplete
milestone: none → 2.4.0alpha2
importance: Undecided → Medium
tags: added: api internal
Revision history for this message
Peter Sabaini (peter-sabaini) wrote :

FAOD from bug #1703661 I was kinda assuming that updating an interface of a Deployed (ie. non-Ready / Broken / Alloc) was not supported. Therefore expecting an error to be thrown.

Fwiw, the only relevant log info signals success, from the regiond.log

2018-02-20 xxx regiond: [info] ::1 PUT /MAAS/api/2.0/nodes/kahrsc/interfaces/473/ HTTP/1.1 --> 200 OK (referrer: -; agent: Python-httplib2/0.9.1 (gzip))

Complete output from the command pastebinned here: https://pastebin.canonical.com/p/mYgbVTHtjK/

Exit code from the maas cli call - which incidentally for us would be the most important to have correct, as this is used in an automated context - is 0 btw.

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Updating an internet on a deployed node is supported on one circumstance:

1. If the user changes a NIC of a deployed system and wants to update the MAC/Name in MAAS, it can do so.

2. As far as the 'success', that's the API return of a query that was made successful. The return of the object, instead of a failure message, howeever, is the issue.

Changed in maas:
status: Incomplete → Triaged
Changed in maas:
milestone: 2.4.0alpha2 → 2.4.0beta1
Changed in maas:
milestone: 2.4.0beta1 → 2.4.0beta2
Changed in maas:
milestone: 2.4.0beta2 → 2.4.0beta3
Changed in maas:
milestone: 2.4.0beta3 → 2.4.0beta4
summary: - MAAS cli incorrect "Success" message
+ [API] MAAS cli incorrect "Success" message
tags: added: maas-cli
Changed in maas:
milestone: 2.4.0beta4 → 2.4.x
Revision history for this message
Adam Collard (adam-collard) wrote :

This bug has not seen any activity in the last 6 months, so it is being automatically closed.

If you are still experiencing this issue, please feel free to re-open.

MAAS Team

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.