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

Add Windows RKE2 Registration Command #33625

Closed
luthermonson opened this issue Jul 14, 2021 · 17 comments
Closed

Add Windows RKE2 Registration Command #33625

luthermonson opened this issue Jul 14, 2021 · 17 comments
Assignees
Labels
area/capr/rke2 RKE2 Provisioning issues involving CAPR area/rke2 RKE2-related Issues area/windows
Milestone

Comments

@luthermonson
Copy link
Contributor

luthermonson commented Jul 14, 2021

We need to

  • auto add labels, add --label cattle.io/os=windows for windows
  • auto add labels, add --label cattle.io/os=linux for linux
  • add the install.ps1 to rancher and get the url working like the install.sh and pass that url back in the reg token
  • validate that node labels work in ps1 file and the xheader is properly sent to setup the node

during testing confirm that machine label selectors work for config and try to set kubelet-args etc. and see if the config propagates to the downstream node. if it doesn't work figure out why and create a new issue for it.

@sirredbeard
Copy link

Outstanding PR #33759

@slickwarren
Copy link
Contributor

on master-head (256a0eb) I ran into this issue when running the new windows registration command:

                                                                                                                                                                                                C:\Users\Administrator>                                                                                                 C:\Users\Administrator>curl.exe --insecure -fL https://<ip>/rke2-agent-install.ps1 -o install.ps1 && powershell.exe -ExecutionPolicy Bypass -Command "./install.ps1 -Server https://<ip> -Label 'cattle.io/os=windows' -Token <token> -Worker -CaChecksum --ca-checksum <checksum>"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13609    0 13609    0     0  13609      0 --:--:-- --:--:-- --:--:-- 45821
INFO: Using default agent configuration directory C:/etc/rancher/agent


    Directory: C:\etc\rancher


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----          8/5/2021  12:44 AM                agent
INFO: Using default agent var directory C:/etc/rancher/agent
Test-CaCheckSum : Value from https://<ip>cacerts does not look like an x509 certificate, exited with
At C:\Users\Administrator\install.ps1:411 char:9
+         Test-CaCheckSum
+         ~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Test-CaCheckSum

Test-CaCheckSum : Retrieved cacerts:
At C:\Users\Administrator\install.ps1:411 char:9
+         Test-CaCheckSum
+         ~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Test-CaCheckSum

-----BEGIN CERTIFICATE-----
<certificate>                                                      -
----END CERTIFICATE-----                                                                                                                                                                                                                       

C:\Users\Administrator>curl.exe --insecure -fL https:///rke2-agent-install.ps1 -o install.ps1 && powershell.exe -ExecutionPolicy Bypass -Command "./install.ps1 -Server https://<ip> -Label 'cattle.io/os=windows' -Token <token> -Worker -CaChecksum --ca-checksum <checksum>"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13609    0 13609    0     0  13609      0 --:--:-- --:--:-- --:--:-- 96517
INFO: Using default agent configuration directory C:/etc/rancher/agent
INFO: Using default agent var directory C:/etc/rancher/agent
Test-CaCheckSum : Value from https://<ip>/cacerts does not look like an x509 certificate, exited with
At C:\Users\Administrator\install.ps1:411 char:9
+         Test-CaCheckSum
+         ~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Test-CaCheckSum

Test-CaCheckSum : Retrieved cacerts:
At C:\Users\Administrator\install.ps1:411 char:9
+         Test-CaCheckSum
+         ~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Test-CaCheckSum

-----BEGIN CERTIFICATE-----
MIIBqDCCAU2gAwIBAgIBADAKBggqhkjOPQQDAjA7MRwwGgYDVQQKExNkeW5hbWlj
bGlzdGVuZXItb3JnMRswGQYDVQQDExJkeW5hbWljbGlzdGVuZXItY2EwHhcNMjEw
ODA0MjM0OTUzWhcNMzEwODAyMjM0OTUzWjA7MRwwGgYDVQQKExNkeW5hbWljbGlz
dGVuZXItb3JnMRswGQYDVQQDExJkeW5hbWljbGlzdGVuZXItY2EwWTATBgcqhkjO
PQIBBggqhkjOPQMBBwNCAAQP2GDxQVbwW2wFpzEBgDQt9FoiLE8zBfECopUZxMeL
5Ix9O6iuuyktUJjR9wAJ0uHhYOwgqASUVvgmA3RF6v2to0IwQDAOBgNVHQ8BAf8E
BAMCAqQwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUL11gAHx4qncxz3LtDWw/
aPI2oCkwCgYIKoZIzj0EAwIDSQAwRgIhAOy/O9fh8/17UE51ElEYGMHiYXn+Igum
/AaWFXc96ItCAiEA15SFD6uMxZd0vkS3gMvsSM0OCWu5f6Ai7/qdZ5EoYoo=
-----END CERTIFICATE-----

@phillipsj
Copy link
Contributor

I am not able to reproduce this on 2.6rc. Testing now with master-head.

@slickwarren
Copy link
Contributor

reopening for the above issue (after offline discussion)

@phillipsj
Copy link
Contributor

@slickwarren
Copy link
Contributor

blocked by #34282

@anupama2501
Copy link
Contributor

blocked #34408

@deniseschannon
Copy link

We should use this issue to track that the registration command is working as expected.

As part of the registration command, we need to verify that the labels are added to the kube nodes and machines.

The machine label selector was specifically tested with #33904 and no need to test separately.

@anupama2501
Copy link
Contributor

Verified on v2.6-head 2e55e84

labels --label 'cattle.io/os=linux' and -Label 'cattle.io/os=windows' are present in the registration command and once the nodes are registered, labels are seen on the nodes as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/capr/rke2 RKE2 Provisioning issues involving CAPR area/rke2 RKE2-related Issues area/windows
Projects
None yet
Development

No branches or pull requests

10 participants