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

Fix gMSA setup on Windows #1576

Merged
merged 1 commit into from
Oct 30, 2024
Merged

Conversation

TinaMor
Copy link
Contributor

@TinaMor TinaMor commented Oct 7, 2024

PR Description

This PR resilves the following issues caused when trying to import registry keys from registerplugin.reg:

  1. Error opening the file. There may be a disk or file system error.
  2. Failed to open registry key

TL;DR

  1. The gMSA setup on WS2025 fails with the error: Error opening the file. There may be a disk or file system error.

    To resolve the issue, we now use an absolute path to the registerplugin.reg file since it is copied to the same location where the install-gmsa-keyvault-plugin.ps1 script is executed.

  2. reg.exe import fails with "Failed to open registry key"
    This happens when the registry keys already exist. To resolve this, we parse the registerplugin.reg file (downloaded from kubernetesartifacts.azureedge.net/ccgakvplugin) to identify all the registry keys that will be updated by importing registerplugin.reg, we transfer ownership to the user and then restore it to the original owner.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 7, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @TinaMor. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 7, 2024
@TinaMor
Copy link
Contributor Author

TinaMor commented Oct 7, 2024

/ok-to-test

@k8s-ci-robot
Copy link
Contributor

@TinaMor: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/ok-to-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@jsturtevant
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 7, 2024
@jsturtevant
Copy link
Contributor

/test pull-azure-sigs

@TinaMor
Copy link
Contributor Author

TinaMor commented Oct 14, 2024

/test pull-azure-sigs

1 similar comment
@jsturtevant
Copy link
Contributor

/test pull-azure-sigs

@TinaMor TinaMor force-pushed the tinamor/dev branch 3 times, most recently from cb4ec4f to 8185aef Compare October 16, 2024 11:58
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 17, 2024
@jsturtevant
Copy link
Contributor

@TinaMor could you rebase this?

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 18, 2024
@TinaMor
Copy link
Contributor Author

TinaMor commented Oct 18, 2024

/test pull-azure-sigs

1 similar comment
@TinaMor
Copy link
Contributor Author

TinaMor commented Oct 22, 2024

/test pull-azure-sigs

@TinaMor TinaMor marked this pull request as ready for review October 22, 2024 10:09
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 22, 2024
@jsturtevant
Copy link
Contributor

/test pull-azure-sigs

@TinaMor
Copy link
Contributor Author

TinaMor commented Oct 23, 2024

/test pull-azure-sigs

@jsturtevant
Copy link
Contributor

gmsa installer check worked. powershell timedout and should be resolved with #1619

@TinaMor
Copy link
Contributor Author

TinaMor commented Oct 25, 2024

/test pull-azure-sigs

@TinaMor TinaMor marked this pull request as draft October 25, 2024 09:55
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 25, 2024
@TinaMor TinaMor marked this pull request as ready for review October 25, 2024 11:08
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 25, 2024
@TinaMor
Copy link
Contributor Author

TinaMor commented Oct 28, 2024

/test pull-azure-sigs

Edit: sig-windows-2025-containerd: SUCCESS

Copy link
Contributor

@mboersma mboersma left a comment

Choose a reason for hiding this comment

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

/lgtm
/assign @jsturtevant

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 30, 2024
@jsturtevant
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jsturtevant

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 30, 2024
@k8s-ci-robot k8s-ci-robot merged commit e040550 into kubernetes-sigs:main Oct 30, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants