cloud-init icon indicating copy to clipboard operation
cloud-init copied to clipboard

Cloud-init status error

Open ayushagrawal338 opened this issue 1 year ago • 4 comments

Bug report

In my vm the script that I gave to the cloud-init file run successfully but still the when I am checking the status of cloud-init it is showing error. I have gone through the debugging process. I have gone through the debugging process that's been given on the cloud-init documentation page. when I am running the command: sudo cloud-init status --format json I am getting this as an response, here in the extended source I am getting status as error. { "boot_status_code": "enabled-by-generator", "datasource": "oracle", "detail": "DataSourceOracle", "errors": [], "extended_status": "error", "init": { "errors": [], "finished": 1732547547.5313206, "recoverable_errors": {}, "start": 1732547546.840897 }, "init-local": { "errors": [], "finished": 1732547545.630215, "recoverable_errors": {}, "start": 1732547545.3890238 }, "last_update": "Mon, 25 Nov 2024 15:16:40 +0000", "modules-config": { "errors": [], "finished": 1732547549.8567138, "recoverable_errors": {}, "start": 1732547549.4562278 }, "modules-final": { "errors": [], "finished": 1732547800.8979197, "recoverable_errors": {}, "start": 1732547550.2112055 }, "recoverable_errors": {}, "stage": null, "status": "error" } I collected logs as well and tried to grep if there were any failure or error but there were none. This is my output for result.json under folder /var/lib/cloud/data { "v1": { "datasource": "DataSourceOracle", "errors": [] } } Even phases seems to be all complete from the json: { "v1": { "datasource": "DataSourceOracle", "init": { "errors": [], "finished": 1732547547.5313206, "recoverable_errors": {}, "start": 1732547546.840897 }, "init-local": { "errors": [], "finished": 1732547545.630215, "recoverable_errors": {}, "start": 1732547545.3890238 }, "modules-config": { "errors": [], "finished": 1732547549.8567138, "recoverable_errors": {}, "start": 1732547549.4562278 }, "modules-final": { "errors": [], "finished": 1732547800.8979197, "recoverable_errors": {}, "start": 1732547550.2112055 }, "stage": null } }

Environment details

  • Cloud-init version: 23.4-7.0.1.el8_10.8 cat /etc/os-release NAME="Oracle Linux Server" VERSION="8.10" ID="ol" ID_LIKE="fedora" VARIANT="Server" VARIANT_ID="server" VERSION_ID="8.10" PLATFORM_ID="platform:el8" PRETTY_NAME="Oracle Linux Server 8.10" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:oracle:linux:8:10:server" HOME_URL="https://linux.oracle.com/" BUG_REPORT_URL="https://github.com/oracle/oracle-linux"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8" ORACLE_BUGZILLA_PRODUCT_VERSION=8.10 ORACLE_SUPPORT_PRODUCT="Oracle Linux" ORACLE_SUPPORT_PRODUCT_VERSION=8.10

ayushagrawal338 avatar Nov 26 '24 14:11 ayushagrawal338

@ayushagrawal338 , thanks for report. Can you also run cloud-init collect-logs and upload the results here?

TheRealFalcon avatar Nov 26 '24 14:11 TheRealFalcon

@ayushagrawal338 , thanks for report. Can you also run cloud-init collect-logs and upload the results here?

Attaching the logs. cloud-init.tar.gz @TheRealFalcon

ayushagrawal338 avatar Nov 26 '24 14:11 ayushagrawal338

Hey @ayushagrawal338,

What is starting cloud-init? Is it invoked by chef? Your logs suggest that only the first two stages ran, and that it was not started by systemd.

If I had to wager a guess, your cloud-init services are disabled, which means that the reported status of cloud-init will be an error.

What does the following command show?

systemctl "--property=ActiveState,UnitFileState,SubState,MainPID" status cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service

holmanb avatar Dec 02 '24 17:12 holmanb

hello @holmanb , Output : Screenshot 2024-12-11 at 1 56 37 PM

ayushagrawal338 avatar Dec 11 '24 08:12 ayushagrawal338