-
Notifications
You must be signed in to change notification settings - Fork 342
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
[BUG] Join fails when using custom CA certs #7453
Comments
Does your custom cert have the management VIP added to its CN or SAN? This sounds very similar to https://docs.harvesterhci.io/v1.4/install/index/#fail-to-join-nodes-using-fqdn-to-a-cluster-which-has-custom-ssl-certificate-configured. |
It does.
|
The problem appears to be that that an incorrect CA cert is being used in Mine shows the default "dynamiclistener" CA cert when it should be my custom cert I specified:
In my experience, when deploying Rancher with custom CA certs outside of harvester, the certs at the Rancher endpoint /cacerts are used for connecting to Rancher. We tested this on 1.3.2 and certificate-authority-data was the same, but worked and harvester node joins perfectly. Now on 1.4, it seems to be stricter and giving an error. If we edit the rancher2-connection-info directly, the join succeeds, so somewhere the custom CA cert is not getting picked up. |
@nnewc - thanks for reporting - I can reproduce this, I'll adjust the labels 😄 |
Thanks @irishgordo. I'm not sure how those labels got added. 😄 I also tried the recommendation to install certs manually per this doc and that didn't seem to make any difference. |
rancher v2.9.x seems to have made a change to enable strict tls verification when setting In harvester v1.4.x installs the rancher-system-agent definition contains an extra variable Harvester v1.4.0 uses rancher v2.9.2 for provisioning the local cluster, which is why we are setting this error.
The behaviour is controller by a combination of a rancher setting https://github.com/rancher/rancher/blob/v2.9.2/pkg/settings/setting.go#L63 Or by defining Since the embedded rancher only manages the local cluster we can easily disable the Current work around is to
post this change subsequent nodes should join harvester cluster successfully. @bk201 @innobead we need to include a fix for this in v1.5.0 and likely backport to v1.4.2 |
we can also change the behaviour via https://github.com/rancher/rancher/blob/main/chart/values.yaml#L43 |
Could this be supported by setting privateCA and providing the CA as the secret I'm pretty sure rancher will handle getting the custom CA to the agents if this is set. |
@nnewc that change needs setting |
@ibrokethecloud makes sense. Also, we would definitely like to see this backported to 1.4.2 if possible. Let me know if there is anything I can do to push this along. |
@khushboo-rancher @irishgordo do we have a test plan that joins nodes with self-sign certificates? |
@bk201 tentatively, something like this: |
It might not be directly related, but seeing the FWIW, the relevant part in the Rancher doc is at https://ranchermanager.docs.rancher.com/getting-started/installation-and-upgrade/installation-references/tls-settings#agent-tls-enforcement |
added |
Pre Ready-For-Testing Checklist
|
Automation e2e test issue: harvester/tests#1858 |
Can this be backported into v1.3 as well? |
Describe the bug
After setting a custom CA certificate, additional Harvester nodes fail to join.
To Reproduce
system_settings.ssl-certificates
andsystem_settings.additional-ca
system_settings.additional-ca
on join configExpected behavior
Additional harvester nodes join with custom CA certificates.
Environment
Additional context
Custom CA's seem to be added to OS root store, because curl works correctly:
The text was updated successfully, but these errors were encountered: