-
Notifications
You must be signed in to change notification settings - Fork 225
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
SqlSetup: Cannot find newly mounted drive #1482
Comments
…tempting to resolve setup.exe path
So the WaitForVolume does the same as the the suggested solution. Does this mean that every resource that are using paths, where the drive letter could be a mounted disk, must do this to refresh the drive list. There are no way to refresh the session that the LCM runs. 🤔 |
I don't quite understand it myself... Admittedly, I do not know how DSC spawns and uses PS sessions... |
From @gaelcolas in the Slack #DSC channel
Drives will then probably have the same since you are seeing it. |
Details of the scenario you tried and the problem that is occurring
We install SQL Server on our bare metal machines by downloading an ISO file, mounting it and running SQL setup. A simplified configuration looks something like this:
WaitForVolume
resource successfully waits for theD
volume to appear,xScript
resource depends on it and checks thatD:\setup.exe
matches expected major SQL version (it would fail if it couldn't find the path/file), andSqlSetup
resource depends on thexScript
resource.Still, when
SqlSetup
'sGet-TargetResource
is called fromTest-TargetResource
, theJoin-Path
call will fail withJoin-Path : Cannot find drive. A drive with the name 'D' does not exist.
Verbose logs showing the problem
N/A
Suggested solution to the issue
Executing
Get-PSDrive
seems to refresh the PS drive provider in the PowerShell session used by theSqlSetup
resource andJoin-Path
does not complain about the missing drive.The DSC configuration that is used to reproduce the issue (as detailed as possible)
See above.
SQL Server edition and version the target node is running
Any SQL server version supported by
SqlSetup
SQL Server PowerShell modules present on the target node
The operating system the target node is running
Windows Server 2016
Version and build of PowerShell the target node is running
Version of the DSC module that was used
Happy to submit a patch.
The text was updated successfully, but these errors were encountered: