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

hack/local-up-cluster.sh: Remove old dynamic certs #116385

Merged
merged 1 commit into from Apr 13, 2023

Conversation

rata
Copy link
Member

@rata rata commented Mar 8, 2023

hack/local-up-cluster.sh: Remove old dynamic certs

When running this script more than once on Debian and Ubuntu, we fail to
chown -R the CERT_DIR due to this file owned by root and the CERT_DIR
owned by the unprivileged user running the script.

Let's remove the file, that is something we can always do, before
generating the certs. This fixes the problem on Debian and Ubuntu local
setups.

Signed-off-by: Rodrigo Campos rodrigoca@microsoft.com

What type of PR is this?

/kind bug

What this PR does / why we need it:

Fixes local setups with local-up-cluster.sh

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Please note this is already done for the kubelet, it was just missing in the api server:

sudo rm -fr "/var/lib/kubelet/pki" "${CERT_DIR}/kubelet-rotated.kubeconfig"

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 8, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-priority Indicates a PR lacks a `priority/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 8, 2023
@rata
Copy link
Member Author

rata commented Mar 14, 2023

/retest

2 similar comments
@rata
Copy link
Member Author

rata commented Mar 14, 2023

/retest

@rata
Copy link
Member Author

rata commented Mar 16, 2023

/retest

@rata
Copy link
Member Author

rata commented Mar 16, 2023

The failure seem completely unrelated, but quite persistent :-(

@rata
Copy link
Member Author

rata commented Mar 17, 2023

/retest

@rata
Copy link
Member Author

rata commented Apr 5, 2023

Ok, so I did a revert of my commit and pushed again. The diff on the PR is absolutely zero, but tests still fail.... :-/

@rata
Copy link
Member Author

rata commented Apr 5, 2023

I've changed it to only run plain sudo if the command fails, so it should leave the CI path completely untouched too.

@rata
Copy link
Member Author

rata commented Apr 5, 2023

/retest

@rata
Copy link
Member Author

rata commented Apr 5, 2023

It seems all are green now, but pull-kubernetes-local-e2e is stalled for almost 2h now. Pushing to restart it

@rata
Copy link
Member Author

rata commented Apr 6, 2023

/retest

@rata rata force-pushed the rata/local-up-chown branch 3 times, most recently from a9f8d7b to 0cecd4e Compare April 11, 2023 18:07
When running this script more than once on Debian and Ubuntu, we fail to
chown -R the CERT_DIR due to this file owned by root and the CERT_DIR
owned by the unprivileged user running the script.

Let's remove the file, that is something we can always do, before
generating the certs. This fixes the problem on Debian and Ubuntu local
setups.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
@rata
Copy link
Member Author

rata commented Apr 11, 2023

/retest

@rata
Copy link
Member Author

rata commented Apr 12, 2023

/retest

@dims
Copy link
Member

dims commented Apr 12, 2023

@rata it's not your change breaking this CI job. it's been broken for a bit of time. will try to carve out time to fix it.

/skip
/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 12, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 6d8dc1c44ba60ba248af9948941ba0f66c4ad380

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, rata

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 Apr 12, 2023
@k8s-ci-robot
Copy link
Contributor

@rata: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-local-e2e d212041 link false /test pull-kubernetes-local-e2e

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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/test-infra repository. I understand the commands that are listed here.

@pacoxu
Copy link
Member

pacoxu commented Apr 13, 2023

/sig node
as for kubelet related script😂?

/retest

@k8s-ci-robot k8s-ci-robot added sig/node Categorizes an issue or PR as relevant to SIG Node. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 13, 2023
@k8s-ci-robot k8s-ci-robot merged commit aab9a7c into kubernetes:master Apr 13, 2023
12 of 13 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone Apr 13, 2023
@rata rata deleted the rata/local-up-chown branch April 13, 2023 08:54
@rata rata changed the title hack/local-up-cluster.sh: Always sudo chown the certs dir hack/local-up-cluster.sh: Remove old dynamic certs Apr 13, 2023
@rata
Copy link
Member Author

rata commented Apr 13, 2023

Thanks! Just updated the PR title and description to match what was merged (the initial PR was slightly different, I tried this alternative after opening the PR, and the alternative was better as it matches what we already do for other components in the script)

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. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants