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

[1.1.x] Fix Citadel using in-memory cert without writing to secret issue. #14510

Merged
merged 1 commit into from
Jun 2, 2019

Conversation

myidpt
Copy link
Contributor

@myidpt myidpt commented Jun 1, 2019

Fix on 1.1 for #14512.
Integration test done by: #14513

@istio-testing
Copy link
Collaborator

🤔 🐛 You appear to be fixing a bug in Go code, yet your PR doesn't include updates to any test files. Did you forget to add a test?

Courtesy of your friendly test nag.

1 similar comment
@istio-testing
Copy link
Collaborator

🤔 🐛 You appear to be fixing a bug in Go code, yet your PR doesn't include updates to any test files. Did you forget to add a test?

Courtesy of your friendly test nag.

@istio-testing
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: myidpt

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

@myidpt
Copy link
Contributor Author

myidpt commented Jun 1, 2019

/test e2e-mixer-no_auth

@myidpt myidpt changed the title Fix Citadel using in-memory cert without writing to secret issue. [1.1.x] Fix Citadel using in-memory cert without writing to secret issue. Jun 2, 2019
@myidpt
Copy link
Contributor Author

myidpt commented Jun 2, 2019

/test e2e-mixer-no_auth

@istio-testing
Copy link
Collaborator

@myidpt: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
prow/istio-pilot-multicluster-e2e.sh 4f1e543 link /test istio-pilot-multicluster-e2e
prow/e2e-mixer-no_auth.sh 4f1e543 link /test e2e-mixer-no_auth

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.

@duderino duderino merged commit b26ac29 into istio:release-1.1 Jun 2, 2019
@duderino
Copy link
Contributor

duderino commented Jun 2, 2019

prow/e2e-mixer-no_auth.sh is a known failure unrelated to this change

secret := BuildSecret("", CASecret, namespace, nil, nil, nil, pemCert, pemKey, istioCASecretType)
if _, err = client.Secrets(namespace).Create(secret); err != nil {
log.Errorf("Failed to write secret to CA (error: %s). This CA will not persist when restart.", err)
log.Errorf("Failed to write secret to CA (error: %s). Abort.", err)
return nil, fmt.Errorf("failed to create CA due to secret write error")
Copy link
Contributor

Choose a reason for hiding this comment

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

What will happen here? The Citadel process will exit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's correct. The process will exit if the CA-root secret already exists and Citadel tries to overwrite it. In this case, the Citadel will be restarted by Kubelet, to read the CA-root secret again.

I think this is good and safe enough for this fix. We may implement retries in the future if necessary.

@wenchenglu
Copy link
Contributor

I agree this is the safest change for now while fixing this issue.

Oliver, could you file a github issue for feature improvement to add retry on network timeout? and assign an owner and make sure we keep track of that

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.

5 participants