error from create_kubeconfig when kubectl snap is refreshed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Kubernetes Control Plane Charm |
Triaged
|
Low
|
Unassigned |
Bug Description
After a recent "juju config k-c-p channel=1.27/edge", i noticed an error in my non-leader k-c-p unit (log with context attached):
------
2023-02-17 23:07:23 INFO unit.kubernetes
2023-02-17 23:07:23 ERROR unit.kubernetes
...
FileNotFoundError: [Errno 2] No such file or directory: 'kubectl'
------
It looks like we were trying to build a kubeconfig in setup_non_
------
commands:
- kubectl
snap-id: ZgG2URycDgvxSVs
tracking: 1.27/edge
refresh-date: 9 days ago, at 23:07 UTC
------
This is also the same time that snapd reported no snap updates were available:
------
/var/log/
/var/log/
/var/log/
------
It appears even though there was no update, kubectl was unavailable at 23:07:23. Perhaps the 'current' link or snap mount goes away briefly during a refresh?
We should find a way to make kubectl calls from k-c-p more resilient.
Changed in charm-kubernetes-master: | |
importance: | Medium → Low |
milestone: | 1.27 → none |
This is noticeable when retry-hooks is false in model-config. The workaround is to `juju resolved` the unit as the binary is only unavailable momentarily, but it'd be great to not have to do that.