-
Notifications
You must be signed in to change notification settings - Fork 52
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
xDiskAccessPath fails test for disk and accesspath after disk format and folder creation. #121
Comments
Thanks for raising this @positivism1. I've come across similar problems to this when mounting disks. It seems that sometimes there is a delay after a disk is formatted before it becomes fully available. Can you confirm a few things for me? Which version of xStorage are you using? Could you try adding an xWaitForDisk step after the xDisk step? E.g. xDisk Disk1{
DiskID = "1"
DriveLetter = 'E'
FSLabel = "TestAPI_E"
FSFormat="NTFS"
}
xWaitForDisk WaitForDisk1{
DiskID = "1"
} This may help, but I'll see if I can replicate the issue and get a better resolution. |
Version number of this module.ModuleVersion = '3.2.0.0' The configuration works really well if applied a second time. I have tried adding the Wait, but with the same result. Configuration:
Result:
|
Thanks for this @positivism1 - I'm planning on spending some time working on issues with this resource over the next week or two and I'll see if I can replicate this one and fix it for you. Sorry about the time taken to look into this. |
@PlagueHO I've had this problem too, and it seemed to be a timing issue. When running it a second time right after the folder creations it still failed (and third, fourth), but after an arbitrary amount of time, a re-run worked and configured the folder mounts. There seems to be some background 'disk refresh' process that 'helps'. I tried doing a 'Update-Disk' for the disk that the folders where created on, but this didn't affect it. |
Thanks @VistraX - I think you're right. I've not run into this problem in this resource but I have run across it with other disk automation processes in PowerShell. What we need to be able to do is trigger the disk subsystems to refresh fully before returning the from the Set-TargetResource. I'll make a new version this weekend with some calls to additional functions (such as Get-PSDrive) to see if we can some how trigger the refresh. I might need a hand testing this as I've actually not been able to replicate the issue on any of my VM's/machines. |
Yep. Get-PSDrive is required if the drive fails to appear in the FileSystem PSPRovider. I wrote this Script resource to fix it temporarily.
I'm happy to try get the xDiskAccessPath to do the Get-PSDrive. Within the Set-TargetResource check if Get-PSDrive can find the correct FileSystem name based on the Disk letter provided by the AccessPath? |
Hi @positivism1 - definitely! If you want to have a go at this and submit a PR for it then I'd be really happy to help you get it merged (e.g. update the tests, CHANGELOG.MD etc). We're always grateful for the assistance! 😁 |
Pull requests submitted.... Let me know what else needs to happen, Its my first day :-) |
Hi @positivism1 - I couldn't find your PR, but I eventually tracked it down. You've actually issued the PR to your own repo 😀 - you'll want to submit the PR to this one (a.k.a. the upstream fork). e.g. submit the PR to But we're very grateful for the help and I'll definitely help you through the process as everyone has had a "first day" 😁 So no worries if something isn't quite right - that is what a code review is for and I'll help you through the process. |
P.S. when you've submitted the PR to this repo it'll show up here (DOH! I actually pasted your PR address in here by accident first 😁): |
Alright, let me try this again.. haha |
I've also run into this issue and will try to pick up where positivism1 left off. |
Hello Everyone, what is the ETA for this fix? |
Any updates on this one? |
Hi @aleksbor - I'm planning on grabbing this one this week. Aim for end of this week. |
DiskAccessPath Add Disk Subsystem Refresh before set - Fixes #121
xDiskAccessPath:
xDiskAccessPath fails the disk and access path test when the Disk and Folder are created within the same configuration.
Configuration AccessPath
{
Node 'TestAPI' {
}
Name Value
PSVersion 5.1.14393.1480
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.1480
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
The text was updated successfully, but these errors were encountered: