Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporary patch for incorrect test user key file ownership #1837

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

jefferbrecht
Copy link
Member

@jefferbrecht jefferbrecht commented Nov 27, 2024

Description

When we create test VMs, we include an SSH pubkey for a test user as metadata. The guest agent sees this and creates a system user (with a ~/.ssh/authorized_keys file holding the key we defined) accordingly. On some DLVM images, the ~/.ssh/authorized_keys file subsequently gets its ownership attributes corrupted during startup. This prevents us from being able to SSH into the VM for the remainder of the test.

This PR deploys a workaround that manually patches over the corruption at VM startup.

Related issue

b/380470389

How has this been tested?

Tests passed locally

Checklist:

  • Unit tests
    • Unit tests do not apply.
    • Unit tests have been added/modified and passed for this PR.
  • Integration tests
    • Integration tests do not apply.
    • Integration tests have been added/modified and passed for this PR.
  • Documentation
    • This PR introduces no user visible changes.
    • This PR introduces user visible changes and the corresponding documentation change has been made.
  • Minor version bump
    • This PR introduces no new features.
    • This PR introduces new features, and there is a separate PR to bump the minor version since the last release already.
    • This PR bumps the version.

@jefferbrecht jefferbrecht changed the title Workaround for b/380470389 Temporary patch for incorrect test user key file ownership Nov 27, 2024
When we create test VMs, we include an SSH pubkey for a test user as metadata.
The guest agent sees this and creates a system user (with a
`~/.ssh/authorized_keys` file holding the key we defined) accordingly. On some
DLVM images, the `~/.ssh/authorized_keys` file subsequently gets its ownership
attributes corrupted during startup. This prevents us from being able to SSH
into the VM for the remainder of the test.

This change deploys a workaround that manually patches over the corruption at
VM startup.
Copy link
Member

@igorpeshansky igorpeshansky left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:

@jefferbrecht jefferbrecht merged commit 703b46b into master Nov 28, 2024
29 of 65 checks passed
@jefferbrecht jefferbrecht deleted the jefferbrecht-dlvm-workaround branch November 28, 2024 14:41
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.

2 participants