-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Also add labels to Hetzner Server from NodeTemplate #109
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could it be, that you forgot to commit/push the changes in the template? Since the setLabels function needs to be called somewhere and I think that was from the template. But maybe I'm also wrong.
The ui-driver-hetzner/component/template.hbs Line 100 in 1d338fc
We also have to call super on the NodeDriver to set the labels in rancher/k8s as well.
I had to basically set rancher to TRACE since there is no documentation on the custom-node-drivers whatsoever. Took me way to long to find all source code and figure stuff out. |
thanks for the explanation, merged! |
Hi there, I just tried including the server label option in my setup as well. So I'm using the latest (3.2) version, which includes According to your code @mxschmitt , it seems that you're setting all provided labels as serverLabels. Or am I mistaken about that part?
I tried setting a label via the labels section in the Node Template GUI. |
No you are right, we use all k8s labels we set for the nodes and set them on the virtual servers at Hetzner. It seems that the set Labels function is called even without sepcifying any labels. In my tests there always was one so I haven't tested it without any labels, my bad. In the meantime, you can just specify any label and the setup should work fine. @KochMario |
I think I figured out the issue. Creating an entirely new cluster from scratch with the newly added Node Templates does work though. The provided labels are being correctly applied to the created Hetzner Servers. It's definitely kind of a bummer that the version upgrade effectively corrupted the cluster, but since we're still in trial & setup mode it's not that big of a deal for us. |
is it possible to make it not a breaking change? maybe pass empty ones by default @NotANormalNerd |
I am really sorry for that. Maybe we can have versioned UIs? So that we don't break existing installations? @KochMario Again I am sorry, should have checked that. But the old templates should work without problems. The driver is called with the HetznerConfig that is saved in Rancher, which should not have |
I have the same problem, but in a production setup. Do I have any chance to solve the problem? It appears that the existing cluster is using the old driver and only new clusters use the upgraded driver. |
I'm afraid I don't know of any other solution than setting up a fresh cluster. Maybe you could try duplicating your existing cluster and only once everything is up and running switching the DNS records (so you have limited / no downtime)? |
@notitiatech @KochMario A solution for you. You can clone the repository, checkout the commit before we changed stuff, follow the https://github.com/mxschmitt/ui-driver-hetzner#building and deploy that 'dist' to a webserver of your choice that is reachable by your rancher instance. On the other hand I don't understand what the problem is with upgrading the driver, also we already fixed that problem as far as I know. So you probably have another problem altogether. Best regards, |
lets maybe revert that change so the customers can continue to use this ui driver? @NotANormalNerd |
@mxschmitt That probably would break our setup somehow, we could at least not update any node templates in the forseeable future since we rely on the hetzner labels for load balancing. You would also have to roll forward and empty or the delete the I also haven't seen any "debug" of what actually broke, just Don't get me wrong, I actually believe this could have something to do with the UI driver, but I don't see a reason why the UI driver should roll anywhere. Also All in all it would be a good idea to version the releases here, so situations like this can be avoided. It comes down to Linus Torvalds "Don't break userspace" vs Zuckerbergs "Move fast and break things" |
@NotANormalNerd I replaced the URL of the driver with the new one Rancher Version: 2.5.1 |
@notitiatech Can you go into your rancher installation and activate debug logging? https://rancher.com/docs/rancher/v2.x/en/troubleshooting/logging/ Then start a new node and see what the debug log is? Specifically it should be something along Also on your text the error is |
@NotANormalNerd the error message differs from deployment to deployment. Rancher logs: 2021/03/03 15:50:59 [INFO] Creating jail for c-pm7c9 |
It seems you are still running the 2.0.0 release of the Hetzner Driver, since it does not provide the When you change the |
@NotANormalNerd this is exactly what I thought/said.
yes As I said deploying a new Cluster works as expected. |
Okay, there is something I can't wrap my head around and this is clearly off-topic here, as this is not the fault of the UI Component here: You tell me: You have one rancher instance, which uses different versions of a node driver on different clusters created in the same rancher instance? Even tough you only have one hetzner node driver and this is a global rancher object? |
@NotANormalNerd yes it probably looks like this. I have one Rancher instance with one Hetzner-driver as a global object. Using it in the existing cluster failed with the mentioned errors. Using it with a new cluster works. |
Well I guess you probably should open an issue at https://github.com/rancher/rancher or go ask on their slack. Because this is clearly not a problem with this UI Component. I also advise you to update your rancher instance to 2.5.5 just to make sure, that's not a bug already fixed. |
# 1.0.0 (2022-06-01) ### Bug Fixes * adjusted due new Rancher version ([f51fff4](f51fff4)) * hetznerConfig networks=NotNullable (fix: [mxschmitt#48](https://github.com/markusheinemann/ui-driver-hetzner/issues/48)) ([mxschmitt#49](https://github.com/markusheinemann/ui-driver-hetzner/issues/49)) ([1ff0c49](1ff0c49)) * remove the serverLabels config if we don't set any labels ([mxschmitt#111](https://github.com/markusheinemann/ui-driver-hetzner/issues/111)) ([55886d7](55886d7)) * typo ([6a9f7c8](6a9f7c8)) ### Features * add firewall support ([mxschmitt#115](https://github.com/markusheinemann/ui-driver-hetzner/issues/115)) ([4ce4c87](4ce4c87)) * also add labels to Hetzner Server from NodeTemplate ([mxschmitt#109](https://github.com/markusheinemann/ui-driver-hetzner/issues/109)) ([988200f](988200f)) * bump docker-machine-driver to 2.0.0 ([deb05e6](deb05e6)) * implement possibility to add additional ssh keys ([mxschmitt#108](https://github.com/markusheinemann/ui-driver-hetzner/issues/108)) ([8697b94](8697b94)) * Networks Feature (fix: [mxschmitt#37](https://github.com/markusheinemann/ui-driver-hetzner/issues/37)) ([mxschmitt#38](https://github.com/markusheinemann/ui-driver-hetzner/issues/38)) ([1e5e569](1e5e569)) * private network support ([mxschmitt#83](https://github.com/markusheinemann/ui-driver-hetzner/issues/83)) ([424f834](424f834))
# 1.0.0 (2022-06-01) ### Bug Fixes * adjusted due new Rancher version ([f51fff4](f51fff4)) * hetznerConfig networks=NotNullable (fix: [mxschmitt#48](https://github.com/markusheinemann/ui-driver-hetzner/issues/48)) ([mxschmitt#49](https://github.com/markusheinemann/ui-driver-hetzner/issues/49)) ([1ff0c49](1ff0c49)) * remove the serverLabels config if we don't set any labels ([mxschmitt#111](https://github.com/markusheinemann/ui-driver-hetzner/issues/111)) ([55886d7](55886d7)) * typo ([6a9f7c8](6a9f7c8)) ### Features * add firewall support ([mxschmitt#115](https://github.com/markusheinemann/ui-driver-hetzner/issues/115)) ([4ce4c87](4ce4c87)) * also add labels to Hetzner Server from NodeTemplate ([mxschmitt#109](https://github.com/markusheinemann/ui-driver-hetzner/issues/109)) ([988200f](988200f)) * bump docker-machine-driver to 2.0.0 ([deb05e6](deb05e6)) * implement possibility to add additional ssh keys ([mxschmitt#108](https://github.com/markusheinemann/ui-driver-hetzner/issues/108)) ([8697b94](8697b94)) * Networks Feature (fix: [mxschmitt#37](https://github.com/markusheinemann/ui-driver-hetzner/issues/37)) ([mxschmitt#38](https://github.com/markusheinemann/ui-driver-hetzner/issues/38)) ([1e5e569](1e5e569)) * private network support ([mxschmitt#83](https://github.com/markusheinemann/ui-driver-hetzner/issues/83)) ([424f834](424f834))
# 1.0.0 (2022-06-01) ### Bug Fixes * adjusted due new Rancher version ([f51fff4](f51fff4)) * hetznerConfig networks=NotNullable (fix: [mxschmitt#48](https://github.com/markusheinemann/ui-driver-hetzner/issues/48)) ([mxschmitt#49](https://github.com/markusheinemann/ui-driver-hetzner/issues/49)) ([1ff0c49](1ff0c49)) * remove the serverLabels config if we don't set any labels ([mxschmitt#111](https://github.com/markusheinemann/ui-driver-hetzner/issues/111)) ([55886d7](55886d7)) * typo ([6a9f7c8](6a9f7c8)) ### Features * add firewall support ([mxschmitt#115](https://github.com/markusheinemann/ui-driver-hetzner/issues/115)) ([4ce4c87](4ce4c87)) * also add labels to Hetzner Server from NodeTemplate ([mxschmitt#109](https://github.com/markusheinemann/ui-driver-hetzner/issues/109)) ([988200f](988200f)) * bump docker-machine-driver to 2.0.0 ([deb05e6](deb05e6)) * implement possibility to add additional ssh keys ([mxschmitt#108](https://github.com/markusheinemann/ui-driver-hetzner/issues/108)) ([8697b94](8697b94)) * Networks Feature (fix: [mxschmitt#37](https://github.com/markusheinemann/ui-driver-hetzner/issues/37)) ([mxschmitt#38](https://github.com/markusheinemann/ui-driver-hetzner/issues/38)) ([1e5e569](1e5e569)) * private network support ([mxschmitt#83](https://github.com/markusheinemann/ui-driver-hetzner/issues/83)) ([424f834](424f834))
Add the Labels defined by the Node Templates to Hetzner servers, which add the possibilities to use label selectors for load Balancers as requested in #100