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
update windows uninstall and install scripts #1872
update windows uninstall and install scripts #1872
Conversation
I have a few more testing scenarios that I would like to run through prior to merging but every test that I have run so far has the updated scripts working as expected. |
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.
There's at least two issues with installing via commit:
- Random bracket that shouldn't exist on line 163 in install.ps1
- Something wrong with checksums.
See error when using this install script:
PS C:\Users\Administrator> ./install.ps1 -Commit 9517e166151f202814d5a8856ab038ec53f43d4a
[INFO] Windows feature: 'Containers' is installed. Installation will proceed.
Using stable channel of rke2 for installation
[INFO] using commit 9517e166151f202814d5a8856ab038ec53f43d4a} as release
Get-AirgapChecksums : A parameter cannot be found that matches parameter name 'Uri'.
At C:\Users\Administrator\install.ps1:567 char:41
+ ... _EXPECTED = Get-AirgapChecksums -CommitHash $Commit -StorageUrl $STOR ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-AirgapChecksums], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Get-AirgapChecksums
@rancher-max the errant bracket has been removed and this should also fix the checksum issue as the commitHash was being passed with the |
4e8481c
to
7a512d7
Compare
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.
LGTM!
I gave it a try, but still get the checksum error 🤔
Looking into the parameters, I found one passing
Changing that to This seems to occur on line 426: This then appears to work without compilation errors, but gives an error at the end:
|
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.
LGTM!
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.
LGTM
Codecov Report
@@ Coverage Diff @@
## master #1872 +/- ##
=========================================
+ Coverage 8.58% 8.59% +0.01%
=========================================
Files 21 21
Lines 1887 1884 -3
=========================================
Hits 162 162
+ Misses 1698 1695 -3
Partials 27 27
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
bc6f61c
to
462d4c0
Compare
2ddbe08
to
136430f
Compare
136430f
to
5915f7f
Compare
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.
LGTM
Proposed Changes
Update Windows uninstall and install scripts:
CATTLE_AGENT_BIN_PREFIX, CATTLE_AGENT_VAR_DIR, CATTLE_AGENT_CONFIG_DIR
during uninstallv3/connect/config-yaml
endpoint as the content can take longer than expected to generateCATTLE_AGENT_VAR_DIR
now defaults toC:/var/lib/rancher/agent
instead ofC:/etc/rancher/agent
CATTLE_AGENT_BIN_PREFIX
env var as it exist in system agent install script. defaults toC:/usr/local
CATTLE_AGENT_VAR_DIR
,CATTLE_AGENT_CONFIG_DIR
,CATTLE_AGENT_BIN_PREFIX
as machine env varsDocs should be updated to reflect a few new env vars in the install script and what they do/how to use them
Types of Changes
bug fixes and expanding the functionality of the install and uninstall scripts
Verification
the updated scripts were used on Windows rke2 agent nodes in custom clusters to verify they worked.
Linked Issues
#1873
#1890