Skip to content

tests: inject ntp configuration through smbios - #466

Open
Meulengracht wants to merge 10 commits into
canonical:mainfrom
Meulengracht:feature/ntp-injection
Open

tests: inject ntp configuration through smbios#466
Meulengracht wants to merge 10 commits into
canonical:mainfrom
Meulengracht:feature/ntp-injection

Conversation

@Meulengracht

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The implementation is coherent, with only a minor non-blocking fixed-string assertion issue.

Pull request overview

Injects backend-provided NTP configuration into nested Ubuntu Core VMs through SMBIOS credentials.

Changes:

  • Generates a tmpfiles.extra credential containing timesyncd configuration.
  • Verifies the injected NTP and fallback settings.
File summaries
File Description
tests/lib/nested.sh Adds SMBIOS credential injection to QEMU startup.
tests/spread/main/basic/task.yaml Validates the generated timesyncd configuration.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/spread/main/basic/task.yaml Outdated
Comment thread tests/lib/nested.sh Outdated
Comment thread tests/lib/nested.sh Outdated
Comment thread tests/lib/nested.sh Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The SMBIOS credential generation and conditional verification are consistent and scoped to configured backends.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Comment thread tests/spread/main/basic/task.yaml Outdated

execute_remote "systemctl status systemd-tmpfiles-setup.service || true"
execute_remote "sudo journalctl -b -u systemd-tmpfiles-setup.service --no-pager || true"
execute_remote "sudo journalctl -b -p warning..alert --no-pager | grep -i credential || true"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe list /run/credentials/@system

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the suggestion! I'm trying to figure out why the check fails in the test :/

Comment thread tests/spread/main/basic/task.yaml Outdated
. "$TESTSLIB/nested.sh"

execute_remote "systemctl status systemd-tmpfiles-setup.service || true"
execute_remote "sudo journalctl -b -u systemd-tmpfiles-setup.service --no-pager || true"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add systemd.log_level=debug in the kernel command line.

Comment thread tests/lib/nested.sh
cat > "$NTP_SOURCES_FILE" <<EOF
f+ /etc/chrony/sources.d/10-nested-ntp.sources 0644 - - - ~${NTP_SOURCES_FILE_BASE64}
EOF
NTP_SOURCES_FILE_BASE64=$(base64 -w0 "$NTP_SOURCES_FILE")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to overwrite the previous value set just a few lines above?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants