dsccommunity / dsccommunity/SqlServerDsc
Azure File Share for SourcePath not working
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 385
- Forks
- 224
- PR merge metrics
- No merged PRs in 30d
Description
I am using a Azure File Share for my SQL Server installation resources. I have tried with and without trailing slash "\" and have tested the code successfully doing it manually.
I have an Azure VM trying to install SQL Server 2016 w/ SP1 on a Windows Server 2016 server.
I am using xSQLServer Module, version 6.0.0.0
my configuration is:
xSQLServerSetup SQLSetup
{
SetupCredential = $ParamCredsJoindomain
InstanceName = "MSSQLServer"
SourcePath = "\\AZUREFILESHARE.file.core.windows.net\installmedia\SqlServer2016Std-wSp1"
SourceCredential = $ParamCredsAzureUNCAccess
Features = "SQLENGINE,FULLTEXT"
InstallSharedDir = "C:\Program Files\Microsoft SQL Server"
SQLSysAdminAccounts = $ParamCredsJoindomain.UserName
DependsOn = "[xDSCDomainJoin]Join"
}
I am getting the following error:
event indicates that a non-terminating error was thrown when DSCEngine was executing Test-TargetResource on MSFT_xSQLServerSetup DSC resource. FullyQualifiedErrorId is CmdletizationQuery_NotFound_RemotePath,Remove-SmbMapping. Error Message is No MSFT_SmbMapping objects found with property 'RemotePath' equal to '\\AZUREFILESHARE.file.core.windows.net\installmedia\SqlServer2016Std-wSp1\'. Verify the value of the property and retry.._
and in the JSON logs I get the following right after it starts:
{"time": "2017-04-13T17:54:14.332+00:00", "type": "error", "message": "The network name cannot be found. "},
Notice the trailing slash "\" in the error message. It is not present in my variable. I am not sure where this is coming from. I did confirm manually this won't identify the same value because of the mismatch with the trailing slash "\".
Looking at the code it seems it uses the same variable/parameter on the new-smbmapping as it does on the remove-smbmapping, which confuses me where the extra slash "\" is coming from.
Can we use Azure file share paths?
What configuration would be best to use for this?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue points to the xSQLServerSetup resource and its New-SmbMapping/Remove-SmbMapping path handling. Start by reproducing the configuration with the Azure UNC SourcePath and compare the mapped and removed RemotePath values, including the trailing slash. Done means the resource handles the Azure File Share path consistently or documents supported configuration, with the reported error no longer occurring.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, powershell, sql
- Domain
- cloud, databases, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100