-
Notifications
You must be signed in to change notification settings - Fork 19
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
MSFT_DFSNamespaceRoot/MSFT_DFSNamespaceFolder: Support for modifying Namespace Root Targets and Folder Target 'State' #96
Comments
#97 Addresses this issue. For what it's worth, this issue and associated PR could easily be converted into a non-breaking change by not requiring |
Hi @thesmall - this is awesome! Thank you. I'll get onto the review this week. I'll get this PR through before I start the work to move this resource to the new continuous delivery release process. I'm wondering if we should make the State default to 'Online' as you say. The reason is that I think most people would want to create the Namespace as online and assume it was the default. I could be wrong - so happy for any other comments or thoughts. We should be OK with a BREAKING CHANGE though because when we move to the new CD process we'll be renaming all the resources from MSFT_ to DSC_. |
Hi @PlagueHO, it should be easy enough to convert the State parameter to be non-mandatory, if that's the route we want to take. I guess my thinking for having it be a mandatory parameter is that you should be explicitly thinking about whether Roots Targets and Folder Targets should be "Online" or "Offline". This is in line with the general premise that you always need to specify either 'Present' or 'Absent' for the At the end of the day, I don't have a strong opinion either way. Since you are a maintainer of the repo, I will defer to your preference. |
Hi @thesmall - I'm OK with making it mandatory. I don't have strong feelings either way. We haven't had any other community comments on this so I'm assuming no one else has a strong feeling either 😁 Ensure isn't always a mandatory parameter- in some resources it defaults. for example, WindowsFeature defaults to Ensure = 'Present' - as 95% of the time you're installing features rather than removing them. When I'm figuring out if a parameter should be mandatory, I usually use a few criteria:
Happy to stick with the parameter being mandatory. The examples and tests will need additional corrections to get them passing. |
That sounds fine to me. Those criteria also make sense. Regarding examples and tests: I am not so up to date on how to write/update relevant tests (pester and otherwise), though I have made some attempts in some un-pushed code I've got. Is that something you might be able to guide me on if I push up some commits? |
Details of the scenario you tried and the problem that is occurring
There is currently no way to provision a DFS Namespace Root Target or Folder Target in DFS in an Offline "State" (also defined as a target's "ReferralStatus")
Verbose logs showing the problem
This issue does not inherently manifest itself as an error. Its just currently not possible to specify a Root Target or Folder Target as being Offline. Resources defined with the current version of the DSC Resource are inherently "Online" if they are
present
. If they areabsent
, the resource is removed from the system entirely.Suggested solution to the issue
schema.mof
files for MSFT_DFSNamespaceRoot and MSFT_DFSNamespaceFolder to support a new required parameterState
which would define the resource as having a ReferralStatus/State of eitherOnline
orOffline
.State
, which would enable consumers of the DSC Resources to define DFS Namespace Root and Folder Targets with a State of "Offline".Note: The solution I am proposing would be considered a breaking change. It would define a new mandatory parameter.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
The operating system the target node is running
-->
Version and build of PowerShell the target node is running
Version of the DSC module that was used ('dev' if using current dev branch)
dev (4.4.0.0)
The text was updated successfully, but these errors were encountered: