[doc] commission does not fail NEW nodes

Bug #1812896 reported by khb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Medium
Bill Wear

Bug Description

MAAS 2.5 documentation says: "A machine in the 'ready', 'declared' or 'failed test' state may initiate a commissioning cycle where it is checked out and tested in preparation for transitioning to the 'ready' state. If it is already in the 'ready' state this is considered a re-commissioning process which is useful if commissioning tests were changed after it previously commissioned."
======================
But both the CLI and the restful API are allowing "NEW" as well, in both MAAS 2.4 and 2.5

Unclear if this is "just" a documentation issue, or if there is a failure to enforce a constraint. Personally, I don't see why NEW isn't listed as a valid state for this API.

steps:

1) locate a node in the NEW state (say s3aq7d)
2) Use API to commission

POST /MAAS/api/2.0/machines/s3aq7d/?format=json& op=commission HTTP/1.1
Host: 100.80.70.8:5240
Accept: application/json
cache-control: no-cache
Postman-Token: 19c486d8-cd2f-4503-b7b9-e60b0f09d364

3) Observe success

Tags: api doc
Revision history for this message
khb (khbkhb) wrote :

and MAAS 2.3
MAAS version: 2.3.5 (6511-gf466fdb-0ubuntu1)

Revision history for this message
Lee Trager (ltrager) wrote :

This is a documentation issue. A machine must be commissioned before it can be used. A NEW machine means commissioning hasn't been run or in 2.5+ it has been run but hasn't been accepted by an administrator.

Changed in maas:
status: New → Triaged
milestone: none → 2.5.2
milestone: 2.5.2 → 2.5.1
summary: - commission does not fail NEW nodes
+ [doc] commission does not fail NEW nodes
Changed in maas:
milestone: 2.5.1 → 2.5.2
Changed in maas:
milestone: 2.5.2 → 2.5.3
Changed in maas:
milestone: 2.5.3 → 2.5.4
Changed in maas:
milestone: 2.5.4 → none
Revision history for this message
Bill Wear (billwear) wrote :

This whole confusion of how MAAS actually processes nodes in various states versus the policy that the documentation lays out is annoying me as an "unclear thing." When 2.9 pops out, I'm going to test it, figure out what MAAS actually does, and document that, possibly with guidance on what's recommended, but with accuracy about what will work.

Changed in maas:
importance: Undecided → Medium
assignee: nobody → Bill Wear (billwear)
Bill Wear (billwear)
Changed in maas:
milestone: none → 2.9.x
Revision history for this message
Bill Wear (billwear) wrote :

After looking through the 2.5 documentation, I cannot find a passage which matches what's been quoted above. Please provide a URL to the page where this error occurs. The remainder of the MAAS documentation (2.6++) seems to be relatively okay on this point. Marking incomplete.

Changed in maas:
status: Triaged → Incomplete
Revision history for this message
khb (khbkhb) wrote :

Don't have the time or patience to track down 2.5. The documentation in this area continues to evolve, so. https://maas.io/docs/concepts-and-terms#heading--controllers "Commission
This action commissions a node, changing a node’s status from ‘New’ to ‘Commissioning’ to ‘Ready’."

Of course, taken by itself this could be read as the older documentation that New->Commission->Ready means has to start with New. But later it speaks of the need to recommission if/when networking or storage changes are made. In fact, what I believe is intended, is that Commission is allowed from (New|Ready|Failed ....). Would it kill us to simply have a formal state diagram somewhere?

Revision history for this message
Bill Wear (billwear) wrote : Re: [Bug 1812896] Re: [doc] commission does not fail NEW nodes

No, a formal state diagram is a good idea, and it's on the list. It's just
a long list.

On Thu, Dec 10, 2020 at 12:40 PM khb <email address hidden> wrote:

> Don't have the time or patience to track down 2.5. The documentation in
> this area continues to evolve, so.
> https://maas.io/docs/concepts-and-terms#heading--controllers "Commission
> This action commissions a node, changing a node’s status from ‘New’ to
> ‘Commissioning’ to ‘Ready’."
>
> Of course, taken by itself this could be read as the older documentation
> that New->Commission->Ready means has to start with New. But later it
> speaks of the need to recommission if/when networking or storage changes
> are made. In fact, what I believe is intended, is that Commission is
> allowed from (New|Ready|Failed ....). Would it kill us to simply have a
> formal state diagram somewhere?
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1812896
>
> Title:
> [doc] commission does not fail NEW nodes
>
> Status in MAAS:
> Incomplete
>
> Bug description:
> MAAS 2.5 documentation says: "A machine in the 'ready', 'declared' or
> 'failed test' state may initiate a commissioning cycle where it is checked
> out and tested in preparation for transitioning to the 'ready' state. If it
> is already in the 'ready' state this is considered a re-commissioning
> process which is useful if commissioning tests were changed after it
> previously commissioned."
> ======================
> But both the CLI and the restful API are allowing "NEW" as well, in both
> MAAS 2.4 and 2.5
>
> Unclear if this is "just" a documentation issue, or if there is a
> failure to enforce a constraint. Personally, I don't see why NEW isn't
> listed as a valid state for this API.
>
> steps:
>
> 1) locate a node in the NEW state (say s3aq7d)
> 2) Use API to commission
>
> POST /MAAS/api/2.0/machines/s3aq7d/?format=json&amp; op=commission
> HTTP/1.1
> Host: 100.80.70.8:5240
> Accept: application/json
> cache-control: no-cache
> Postman-Token: 19c486d8-cd2f-4503-b7b9-e60b0f09d364
>
> 3) Observe success
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/maas/+bug/1812896/+subscriptions
>

--
Bill Wear, MAAS Developer Advocate

Changed in maas:
milestone: 2.9.2 → 2.9.x
Changed in maas:
status: Incomplete → Triaged
Revision history for this message
Bill Wear (billwear) wrote :

State diagram completed and added to documentation. This is fixed.

Changed in maas:
status: Triaged → Fix Released
Changed in maas:
milestone: 2.9.x → none
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.