-
Notifications
You must be signed in to change notification settings - Fork 49
Missing dependency between DNS entries being created and running bootkube? #109
Comments
I think option number two ( lokomotive/pkg/platform/packet/packet.go Lines 151 to 154 in 878b482
Therefore, if the provider is not manual, this race can exist. If the provider is manual, the dns resources are created first: lokomotive/pkg/platform/packet/packet.go Lines 158 to 167 in 878b482
Then, if all went fine, applies the rest: lokomotive/pkg/platform/packet/packet.go Lines 175 to 176 in 878b482
I'd like to confirm my understanding is correct with someone. @invidian ? @mauriciovasquezbernal ? |
Actually, no, it affects both cases as the null resource is only created first. Sorry for the confusion (it's late, so maybe this message is wrong too :-P) |
@rata I cannot find the GitHub reference to the discussion, but we discussed that with @mauriciovasquezbernal and we came to the conclusion, that I think with BTW, did you hit some issue because of this setup? Other thing is, I'd say it's rather low priority at the moment. |
Hi @rata, thanks for pointing this out. As confirmed by @invidian, we were aware of this at the moment of the implementation: kinvolk-archives/lokomotive-kubernetes#137 (comment). We did some tests and found that it should not be a problem for bootkube as it waits some time for the entries to be ready (I did a manual experiment delaying the creation of DNS entries for 5 minutes and it was fine). I think it could be one of the things to improve when implementing the custom DNS support for all platforms. |
Ohh, thanks for the context!
No, just need to change code that was doing the DNS manual implementation and thought: "hmm, this is broken or working by chance..." and opened the issue :-)
Yeah, sure. Just want to keep track of the bugs we found. Won't solve it now unless is easier for what I need to do to solve :)
Ohh, I see. Thanks a lot for the context and the links! Makes sense |
Closing since it didn't cause issues. |
On Packet (it might apply to other platforms) bootkube depends on this to start:
lokomotive/assets/lokomotive-kubernetes/packet/flatcar-linux/kubernetes/ssh.tf
Lines 91 to 94 in 878b482
The DNS entries are created outside of the terraform module here:
lokomotive/pkg/platform/packet/template.go
Lines 190 to 200 in 878b482
While it is likely that the DNS entries are created before bootkube starts, as there is no dependency between them, I think it might happen that terraform starts bootkube before DNS entries are created. This might happen, for example, as terraform batches resource creation and DNS entries are delayed until other resources (let's say starting bootkube) is created.
I'm unsure of the effect of bootkube being started before DNS entries are created OR updated (if you are running a test cluster with the same name, DNS entries might just need to be updated). In the best case, this is not an issue (although I doubt
bootkube start
will finish correctly without being able to form the etcd cluster and, thus, starting the API server). But this might as well be an issue.I'd like to check if this is an issue at all, first. But if it is, here are some ideas:
The text was updated successfully, but these errors were encountered: