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

install.ps1 references $suffix before its defined. #6852

Open
bendemott opened this issue Sep 21, 2024 · 1 comment
Open

install.ps1 references $suffix before its defined. #6852

bendemott opened this issue Sep 21, 2024 · 1 comment
Assignees
Labels
area/windows kind/bug Something isn't working

Comments

@bendemott
Copy link

bendemott commented Sep 21, 2024

Environmental Info:
RKE2 Version: master / 1.31

Node(s) CPU architecture, OS, and Version:

Probably ALL

  • Windows Server 2019 Standard Edition
  • Intel x86/64 architecture

Cluster Configuration:

Describe the bug:
If you install rke2 without the Containers feature for windows installed you'll get the following error:

[ERROR] Windows feature: 'Containers' is not installed. Please run: Install-WindowsFeature -Name Containers
Confirm-WindowsFeatures : The variable '$suffix' cannot be retrieved because it has not been set.
At C:\Users\Administrator\install.ps1:670 char:1
+ Confirm-WindowsFeatures -RequiredFeatures @("Containers")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (suffix:String) [Confirm-WindowsFeatures], RuntimeException
    + FullyQualifiedErrorId : VariableIsUndefined,Confirm-WindowsFeatures

This is because the Powershell script install.ps1 uses the variable $suffix without initializing it here

Steps To Reproduce:

  • Ensure windows feature Container is not present
  • run ./install.ps1

Expected behavior:
Error message should print without powershell InvalidOperation error.

Actual behavior:
powershell InvalidOperation error.

Additional context / logs:
None

Copy link
Contributor

github-actions bot commented Nov 6, 2024

This repository uses a bot to automatically label issues which have not had any activity (commit/comment/label) for 45 days. This helps us manage the community issues better. If the issue is still relevant, please add a comment to the issue so the bot can remove the label and we know it is still valid. If it is no longer relevant (or possibly fixed in the latest release), the bot will automatically close the issue in 14 days. Thank you for your contributions.

@brandond brandond added area/windows kind/bug Something isn't working and removed status/stale labels Nov 6, 2024
@dereknola dereknola self-assigned this Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/windows kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants