ListOperations does not list failed operations

Bug #1926496 reported by Jeff Pihach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Ian Booth

Bug Description

Using Juju 2.9 when an operation fails to be executed it does not appear in the `ListOperations` API call even though it's assigned an operation id. I would have expected that all operations are shown.

{
  "type": "Action",
  "request": "EnqueueOperation",
  "version": 6,
  "params": {
    "actions": [
      {
        "name": "create-pool",
        "receiver": "unit-ceph-mon-0",
        "parameters": {
          "allow-ec-overwrites": "",
          "app-name": "",
          "erasure-profile-name": "",
          "name": "new-pool",
          "percent-data": "",
          "pool-type": "",
          "profile-name": "",
          "replicas": ""
        }
      }
    ]
  },
  "request-id": 2
}

{
  "request-id": 2,
  "response": {
    "operation": "operation-3",
    "actions": [
      {
        "error": {
          "message": "validation failed: (root).percent-data : must be of type integer, given \"\"; (root).pool-type : must match one of the enum values [\"replicated\",\"erasure\",\"erasure-coded\"], given \"\"; (root).replicas : must be of type integer, given \"\"; (root).allow-ec-overwrites : must be of type boolean, given \"\"",
          "code": ""
        },
        "result": ""
      }
    ]
  }
}

{
  "type": "Action",
  "request": "ListOperations",
  "version": 6,
  "params": {},
  "request-id": 2
}

Revision history for this message
Ian Booth (wallyworld) wrote :

When validation of action parameters fails, no action is queued up to run.
The list-operations command works by gathering all actions and grouping them according to their parent operation. This is because the overall operation status can depend on the status of the individual actions. So if no action got queued, the current logic will not show that operation.

This does need a tweak to improve the behaviour.

Changed in juju:
milestone: none → 2.9.1
milestone: 2.9.1 → 2.8.11
assignee: nobody → Ian Booth (wallyworld)
importance: Undecided → High
status: New → Triaged
Revision history for this message
Ian Booth (wallyworld) wrote :
Changed in juju:
status: Triaged → In Progress
Ian Booth (wallyworld)
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
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.