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

revert data_changed guard on create_kubeconfig #41

Merged
merged 1 commit into from Jul 25, 2019
Merged

Conversation

kwmonroe
Copy link
Member

This partially reverts #33. @joedborg hit an issue where the k8s master would write kubeconfig before the kubeapi-load-balancer joined. This caused server: $master:6443 to be written to the config file. Since we weren't checking for server in data_changed's config_matrix, we never re-wrote an accurate config that included the load balancer's ip.

server isn't the only problem -- we would have also missed any changes to ca_crt and client_pass because the conf.read() happens before any of these changed values get written, which would make data_changed False and cause us to return early.

For now, we'll keep the part of #33 that logs the write to disk (versus a more expensive status_set on every hook).

To fully fix the spirit of https://bugs.launchpad.net/charm-kubernetes-master/+bug/1822021, we'll need to implement a helper that can compare what's on disk to what would be written to disk, and write a new config when the 2 differ.

@kwmonroe kwmonroe requested a review from joedborg July 25, 2019 17:04
Copy link
Contributor

@joedborg joedborg left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@kwmonroe kwmonroe merged commit fe4499d into master Jul 25, 2019
@kwmonroe kwmonroe deleted the revert-33 branch July 25, 2019 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants