Skip to content

feat(api): support phone-home for #cloud-config-archive user-data - #5094

Draft
goncalo-rodrigues wants to merge 1 commit into
NVIDIA:mainfrom
ori-edge:feat/phonehome-cloud-config-archive
Draft

feat(api): support phone-home for #cloud-config-archive user-data#5094
goncalo-rodrigues wants to merge 1 commit into
NVIDIA:mainfrom
ori-edge:feat/phonehome-cloud-config-archive

Conversation

@goncalo-rodrigues

@goncalo-rodrigues goncalo-rodrigues commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Enabling phone-home previously required the user-data document root to be a #cloud-config mapping. A #cloud-config-archive (a YAML sequence) was rejected with "userData ... must be valid cloud-init YAML to enable phone home", even though cloud-init merges each archive part independently.

Additionally, the check for the cloud config type was very lenient, allowing things like

#!/bin/bash
export FOO: bar

to fail silently, as they are valid YAML maps. This is now fixed so that #!/bin/bash scripts and phoneHomeEnabled cannot be used simultaneously.

This was tested in our own hardware.

Related issues

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

@copy-pr-bot

copy-pr-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: ac7d3605-1468-43b9-a100-2e481b5bc796

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@thossain-nv thossain-nv added the rest-api Add this label when an issue or PR concerns NICo REST API label Aug 18, 2026 — with ChatGPT Codex Connector
Enabling phone-home previously required the user-data document root to be
a #cloud-config mapping. A #cloud-config-archive (a YAML sequence) was
rejected with "userData ... must be valid cloud-init YAML to enable phone
home", even though cloud-init merges each archive part independently.

Deliver phone-home as its own archive part instead:

- Classify user-data by its cloud-init header: a #cloud-config mapping
  (header-less is still accepted and the header added on output) or a
  #cloud-config-archive sequence. A list without the archive header, or a
  map carrying a different header (e.g. a #!/bin/bash script that happens
  to parse as a map), is rejected rather than silently mangled.
- Insert appends a dedicated text/cloud-config entry whose content is
  built by the existing #cloud-config insertion path, so both formats
  share one source of truth for the phone-home block.
- Remove strips phone-home from each cloud-config entry, dropping entries
  left empty and leaving unrelated parts untouched.
- The archive header comment is preserved, and re-enabling stays
  idempotent, matching the #cloud-config behaviour.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: goncalo-rodrigues <goncalo.rodrigues@ori.co>
@goncalo-rodrigues
goncalo-rodrigues force-pushed the feat/phonehome-cloud-config-archive branch from a8a05db to 7916cb9 Compare August 18, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rest-api Add this label when an issue or PR concerns NICo REST API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants