microsoft / microsoft/MSLab

Adaption of scenario scripts for 1-node clusters

Open
#534 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
1.3k
Forks
304
PR merge metrics
No merged PRs in 30d

Description

As Microsoft now supports 1-node clusters for AZSHCI and WS2022, I experimented a bit with the cluster scenario scripts for 1-node environments. I got various errors about non-existent host names.

Reason: Most scenario scripts initially define a variable for the names of the cluster nodes and implicitly assume that this results in a PowerShell array (e.g. $servers = "...", "..."). This works if you assign more than one hostname. However, if only 1 hostname is specified, PowerShell only creates a string variable - i.e. no array. If later the script references a single element (e.g. $server[0]), the result is an invalid hostname.

The remedy is simple: The variable for the host names should be set explicitly as an array type (e.g. [array] $servers="...").

However, this would mean that most of the scenario scripts would have to be adjusted and re-released. I would therefore suggest that an appropriate note be included in the MSLab readme page and the adjustments made in the scenario scripts when they are released as such.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the scenario scripts for variables that hold cluster host names, then check the MSLab readme for the documented one-node guidance. Reproduce the reported invalid-hostname behavior with a one-node AZSHCI or WS2022 cluster and verify that the affected scenarios work with one hostname as well as multiple hostnames.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.