Comment 8 for bug 2045582

Revision history for this message
Chris Patterson (cjp256) wrote : Re: sru cloud-init (23.4 update) Focal, Jammy, and Lunar, Mantic

Request to pause SRU to reconsider impact of changes to exit code for cloud-init status --wait​.

In the cases where there are recoverable warnings/errors, users checking status by exit code will start failing without changes on their end to accommodate the new behavior. We suspect this will be an issue for deployments where some of the warnings/errors are considered "normal".

Consider a customer using the Ubuntu minimal images (on Azure) which is currently missing "eject" and an error is being emitted. I believe if cloud-init 23.4 rolls out as-is, the status checks will start failing 100% of the time.

```
cpatterson@temp-vm-cpatterson-eastus-t20240105174837:~$ cloud-init status --wait

status: done
cpatterson@temp-vm-cpatterson-eastus-t20240105174837:~$ echo $?
2
cpatterson@temp-vm-cpatterson-eastus-t20240105174837:~$ cloud-init --version
/usr/bin/cloud-init 23.4-0ubuntu1~22.04.1
cpatterson@temp-vm-cpatterson-eastus-t20240105174837:~$ cloud-init status --wait --format json
{
  "_schema_version": "1",
  "boot_status_code": "enabled-by-generator",
  "datasource": "azure",
  "detail": "DataSourceAzure [seed=/dev/sr0]",
  "errors": [],
  "extended_status": "degraded done",
  "init": {
    "errors": [],
    "finished": 1704494973.501599,
    "recoverable_errors": {},
    "start": 1704494969.534187
  },
  "init-local": {
    "errors": [],
    "finished": 1704494968.0249393,
    "recoverable_errors": {
      "ERROR": [
        "Failed ejecting the provisioning iso: Unexpected error while running command.\nCommand: ['eject', '/dev/sr0']\nExit code: -\nReason: [Errno 2] No such file or directory: b'eject'\nStdout: -\nStderr: -"
      ]
    },
    "start": 1704494956.9926035
  },
  "last_update": "Fri, 05 Jan 2024 22:49:35 +0000",
  "modules-config": {
    "errors": [],
    "finished": 1704494975.1977916,
    "recoverable_errors": {},
    "start": 1704494974.6474068
  },
  "modules-final": {
    "errors": [],
    "finished": 1704494975.8049285,
    "recoverable_errors": {},
    "start": 1704494975.5019412
  },
  "recoverable_errors": {
    "ERROR": [
      "Failed ejecting the provisioning iso: Unexpected error while running command.\nCommand: ['eject', '/dev/sr0']\nExit code: -\nReason: [Errno 2] No such file or directory: b'eject'\nStdout: -\nStderr: -"
    ]
  },
  "schemas": {
    "1": {
      "boot_status_code": "enabled-by-generator",
      "datasource": "azure",
      "detail": "DataSourceAzure [seed=/dev/sr0]",
      "errors": [],
      "extended_status": "degraded done",
      "init": {
        "errors": [],
        "finished": 1704494973.501599,
        "recoverable_errors": {},
        "start": 1704494969.534187
      },
      "init-local": {
        "errors": [],
        "finished": 1704494968.0249393,
        "recoverable_errors": {
          "ERROR": [
            "Failed ejecting the provisioning iso: Unexpected error while running command.\nCommand: ['eject', '/dev/sr0']\nExit code: -\nReason: [Errno 2] No such file or directory: b'eject'\nStdout: -\nStderr: -"
          ]
        },
        "start": 1704494956.9926035
      },
      "last_update": "Fri, 05 Jan 2024 22:49:35 +0000",
      "modules-config": {
        "errors": [],
        "finished": 1704494975.1977916,
        "recoverable_errors": {},
        "start": 1704494974.6474068
      },
      "modules-final": {
        "errors": [],
        "finished": 1704494975.8049285,
        "recoverable_errors": {},
        "start": 1704494975.5019412
      },
      "recoverable_errors": {
        "ERROR": [
          "Failed ejecting the provisioning iso: Unexpected error while running command.\nCommand: ['eject', '/dev/sr0']\nExit code: -\nReason: [Errno 2] No such file or directory: b'eject'\nStdout: -\nStderr: -"
        ]
      },
      "stage": null,
      "status": "done"
    }
  },
  "stage": null,
  "status": "done"
}
```