-
Notifications
You must be signed in to change notification settings - Fork 54
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
xCluster: add Nodes parameter (enables cluster creation with several nodes) #177
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #177 +/- ##
===================================
- Coverage 100% 96% -4%
===================================
Files 8 8
Lines 486 500 +14
===================================
- Hits 486 482 -4
- Misses 0 18 +18 |
Great work on this one! This looks good. It doesn't break the previous behavior. I'm good with this change. Please continue with the task list. 😄 Reviewed 1 of 1 files at r1. DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 46 at r1 (raw file):
This parameter is not needed here since it is non-mandatory and not used in the Get-TargetResource function. DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 202 at r1 (raw file):
If DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 249 at r1 (raw file):
Would you mind renaming this variable to DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 258 at r1 (raw file):
In Test-TargetResource break was used to exit the foreach-loop. Is that appropriate here too? DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 379 at r1 (raw file):
Would you mind renaming this variable to Comments from Reviewable |
Review status: 0 of 3 files reviewed at latest revision, 5 unresolved discussions, some commit checks failed. DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 46 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 202 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 249 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 258 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
I don't think so, because we need to go through all of the nodes in the Set DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 379 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Comments from Reviewable |
I addressed your points, updated the mof file, fixed some styling errors and added a unit test. |
DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 258 at r1 (raw file): Previously, woodp (Pedro Wood) wrote…
You are right, now is done Comments from Reviewable |
Review status: 0 of 3 files reviewed at latest revision, 5 unresolved discussions. DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 258 at r1 (raw file): Previously, woodp (Pedro Wood) wrote…
Done. Comments from Reviewable |
Sorry for being away so long for this PR. It has been a lot of work at the day job and maintaining in other resources modules. But I will focus on getting this through now. 😄 Found a few more review comments for this one. Reviewed 2 of 3 files at r2, 1 of 1 files at r3. a discussion (no related file): https://ci.appveyor.com/project/PowerShell/xfailovercluster/build/1.6.342.0#L474 DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 222 at r3 (raw file):
Please change this to named arguments Also see other comment for renaming this function. DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 222 at r3 (raw file):
Please rename this to use camelCase syntax ( DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 233 at r3 (raw file):
Please add a space between the DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 365 at r3 (raw file):
Please add a space between the DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 376 at r3 (raw file):
Should this be DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 383 at r3 (raw file):
Please add a space between the DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 530 at r3 (raw file):
Could we use the Verb-Noun syntax for this? So for this function name it would be DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 543 at r3 (raw file):
Please add a space between the Comments from Reviewable |
I did a typo that could have been seen as strange, what I meant to say in previous review comment was that I will focus on getting this through now. Let me know if you need any help 😄 |
DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 376 at r3 (raw file): Previously, johlju (Johan Ljunggren) wrote…
not sure about this one Comments from Reviewable |
Review status: 1 of 3 files reviewed at latest revision, 9 unresolved discussions. DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 222 at r3 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 222 at r3 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 233 at r3 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 365 at r3 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 383 at r3 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 530 at r3 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 543 at r3 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Comments from Reviewable |
Reviewed 2 of 2 files at r4. DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 376 at r3 (raw file): Previously, woodp (Pedro Wood) wrote…
LGTM. This is good as-is. Was me looking at it wrongly. Thanks for correcting me. Tests/Unit/MSFT_xCluster.Tests.ps1, line 322 at r2 (raw file):
I liked this
Comments from Reviewable |
Review status: 2 of 3 files reviewed at latest revision, 3 unresolved discussions. DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 376 at r3 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Comments from Reviewable |
Review status: 2 of 3 files reviewed at latest revision, 2 unresolved discussions. Tests/Unit/MSFT_xCluster.Tests.ps1, line 322 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Comments from Reviewable |
a discussion (no related file): Previously, johlju (Johan Ljunggren) wrote…
done Comments from Reviewable |
Tests/Unit/MSFT_xCluster.Tests.ps1, line 322 at r2 (raw file): Previously, woodp (Pedro Wood) wrote…
Done. Comments from Reviewable |
Reviewed 1 of 1 files at r5. a discussion (no related file): See other comment of renaming a discussion (no related file): DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 83 at r5 (raw file):
We should return the existing node names in the property See other comment of renaming DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 98 at r5 (raw file):
I suggest we rename this to DSCResources/MSFT_xCluster/MSFT_xCluster.psm1, line 539 at r5 (raw file):
A question. It is not really clear in the code that $Nodes will always default to Would it work to add If wer add the value as default value to the Comments from Reviewable |
Labeling this PR as abandoned since it has gone 14 days or more since the last update. An abandoned PR can be continued by another contributor. The abandoned label will be removed if work on the PR is taken up again. |
a discussion (no related file): Previously, johlju (Johan Ljunggren) wrote…
I'm not being able to figure out why these 2 tests fail. For the first one I always get an exception, if I add the filter for the GetClusterNode mock, I get "StubNotImplemented" otherwise I get an exception without any info at all. Is very difficult with only this info to know why it fails. Also don't seem to get how the mocks/stubs work. |
The Stubs are used to have something to attach the mock to. A unit test should not need the actual module with the cmdlets installed, instead those are replaced by stubs (empty functions except for the throw you are seeing) so that when using So in your case, when you get StubNotImplemented the mock is not called. Did this help you? Let me know if you need more information. |
Labeling this pull request (PR) as abandoned since it has gone 14 days or more since the last update. An abandoned PR can be continued by another contributor. The abandoned label will be removed if work on this PR is taken up again. |
Closing this PR due to inactivity. If there are someone who wants to work on this issue or PR please open a new PR. |
Pull Request (PR) description
Adds a "Nodes" string array parameter, specifying node names that will be added to the cluster along with the local computer at creation time (i.e passed to the New-Cluster command).
This Pull Request (PR) fixes the following issues:
#148, #157
The motivation behind this PR is that I was unable to join a secondary node to the cluster, tried both from the secondary node and from the primary node. The only way I had to achieve a cluster with more than one node was to specify all the nodes in the creation (using New-Cluster command and passing all the nodes into the -Node parameter).
Task list:
Will complete the task list if this PR makes sense to the owners.
This change is