Skip to content
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: DSC_SqlSetup.psd1 not found #1596

Closed
mKenfenheuer opened this issue Jul 17, 2020 · 9 comments
Closed

SqlSetup: DSC_SqlSetup.psd1 not found #1596

mKenfenheuer opened this issue Jul 17, 2020 · 9 comments
Labels
bug The issue is a bug. external The issue cannot be resolved within the DSC Resource Kit.

Comments

@mKenfenheuer
Copy link

mKenfenheuer commented Jul 17, 2020

Details of the scenario you tried and the problem that is occurring

Tried installing SQL 2017 with DSC, receiving error:

Importing the DSC_SqlSetup module with error The Windows PowerShell DSC_SqlSetup.psd1 data file cannot be found in
directory "C:\Program Files\WindowsPowerShell\Modules\SqlServerDsc\14.1.0\DscResources\DSC_SqlSetup\en-US\" or a parent directory.

Verbose logs showing the problem

WARNUNG: Von der Konfiguration "SQLInstall" wird mindestens eine integrierte Ressource heruntergeladen, ohne die zugehörigen 
Module explizit zu importieren. Fügen Sie Ihrer Konfiguration "Import-DscResource –ModuleName 'PSDesiredStateConfiguration'" 
hinzu, damit diese Meldung nicht mehr angezeigt wird.


    Verzeichnis: C:\DSC-Config\Config


Mode                LastWriteTime         Length Name                                                                       
----                -------------         ------ ----                                                                       
-a----       17.07.2020     11:29           3430 localhost.mof                                                              
AUSFÜHRLICH: Vorgang "CIM-Methode aufrufen" mit den folgenden Parametern durchführen, "'methodName' = SendConfigurationApply,
'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration".
AUSFÜHRLICH: Vom Computer 'WIN-T85G1FQQ5AN' mit Benutzer-SID 'S-1-5-21-3859010636-3025912086-3338911287-500' ist ein LCM-Meth
odenaufruf eingegangen.
AUSFÜHRLICH: [WIN-T85G1FQQ5AN]: LCM:  [ StartenFestlegen]
AUSFÜHRLICH: [WIN-T85G1FQQ5AN]: LCM:  [ BeendenFestlegen]
Importieren des Moduls DSC_SqlSetup mit Fehler Die Windows PowerShell-Datendatei "DSC_SqlSetup.psd1" kann nicht im 
Verzeichnis "C:\Program Files\WindowsPowerShell\Modules\SqlServerDsc\14.1.0\DscResources\DSC_SqlSetup\en-US\" oder einem 
übergeordneten Verzeichnis gefunden werden. fehlgeschlagen.
    + CategoryInfo          : InvalidOperation: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : ImportModuleFailed
    + PSComputerName        : localhost
 
AUSFÜHRLICH: Vorgang "CIM-Methode aufrufen" wurde abgeschlossen.
AUSFÜHRLICH: Die Ausführung des Konfigurationsauftrags hat 4.837 Sekunden gedauert.
Importing the DSC_SqlSetup module with error The Windows PowerShell DSC_SqlSetup.psd1 data file cannot be found in
directory "C:\Program Files\WindowsPowerShell\Modules\SqlServerDsc\14.1.0\DscResources\DSC_SqlSetup\en-US\" or a parent directory.

Suggested solution to the issue

I've tried to rename the file from DSC_SqlSetup.strings.psd1 to DSC_SqlSetup.psd1 and the setup gets at least past the installation but fails with Test-DscConfiguration.

The DSC configuration that is used to reproduce the issue (as detailed as possible)

Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Confirm:$false
Install-Module -Name SqlServerDsc -Repository PSGallery -SkipPublisherCheck -Confirm:$false

Configuration SQLInstall
{
     Import-DscResource -ModuleName SqlServerDsc

     node localhost
     {
          WindowsFeature 'NetFramework45'
          {
               Name   = 'NET-Framework-45-Core'
               Ensure = 'Present'
          }

          SqlSetup 'InstallDefaultInstance'
          {
               SecurityMode        = 'SQL'
               SQLUserDBDir        = 'D:\SQL\UserDB\'
               SQLUserDBLogDir     = 'D:\SQL\UserDB\'
               SQLTempDBDir        = 'D:\SQL\TempDB\'
               SQLTempDBLogDir     = 'D:\SQL\TempDB\'
               SQLBackupDir        = 'D:\SQL\Backup\'
               InstanceName        = 'MSSQLSERVER'
               Features            = 'SQLENGINE'
               SourcePath          = 'C:\DSC-Config\SQL2017'
               SQLSysAdminAccounts = @('Administratoren')
               DependsOn           = '[WindowsFeature]NetFramework45'
          }
     }
}
SQLInstall -OutputPath .\Config
Start-DscConfiguration -Path .\Config -Wait -Force -Verbose

SQL Server edition and version the target node is running

SQL Server 2017 Enterprise

SQL Server PowerShell modules present on the target node

Name      Version    Path                                                                          
----      -------    ----                                                                          
SqlServer 21.1.18226 C:\Program Files\WindowsPowerShell\Modules\SqlServer\21.1.18226\SqlServer.psd1

The operating system the target node is running

OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture       : 64-Bit
WindowsVersion       : 1809
WindowsBuildLabEx    : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage           : de-DE
OsMuiLanguages       : {de-DE}

Version and build of PowerShell the target node is running

Name                           Value                                                                                        
----                           -----                                                                                        
PSVersion                      5.1.17763.1                                                                                  
PSEdition                      Desktop                                                                                      
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                      
BuildVersion                   10.0.17763.1                                                                                 
CLRVersion                     4.0.30319.42000                                                                              
WSManStackVersion              3.0                                                                                          
PSRemotingProtocolVersion      2.3                                                                                          
SerializationVersion           1.1.0.1                                                                                      

Version of the DSC module that was used

Name         Version Path                                                                            
----         ------- ----                                                                            
SqlServerDsc 14.1.0  C:\Program Files\WindowsPowerShell\Modules\SqlServerDsc\14.1.0\SqlServerDsc.psd1
@johlju
Copy link
Member

johlju commented Jul 19, 2020

Sound similar to the issue dsccommunity/NetworkingDsc#464

@johlju johlju added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. labels Jul 19, 2020
@johlju
Copy link
Member

johlju commented Jul 19, 2020

@mKenfenheuer are you installing the OS with a German Windows Server 2019 (1809) ISO or is it installed using en-US ISO and using language pack similar to the issue in the previous comment?I'm gonna try to repro this.

@johlju
Copy link
Member

johlju commented Jul 20, 2020

@mKenfenheuer I have repro the problem in issue dsccommunity/DscResource.Common#50. Thanks for reporting!

@mKenfenheuer
Copy link
Author

@mKenfenheuer are you installing the OS with a German Windows Server 2019 (1809) ISO or is it installed using en-US ISO and using language pack similar to the issue in the previous comment?I'm gonna try to repro this.

Its a german iso, yes. Ive installed the language pack en-US and this works. I think its related to the current culture as only changing the current culture of the ps thread to en-us also works.

@mKenfenheuer
Copy link
Author

@mKenfenheuer I have repro the problem in issue dsccommunity/DscResource.Common#50. Thanks for reporting!

Great! Thx for looking into this!

@johlju johlju added the external The issue cannot be resolved within the DSC Resource Kit. label Jul 20, 2020
@LeoSpyke
Copy link

Same problem with the italian version

@johlju johlju added in progress The issue is being actively worked on by someone. and removed help wanted The issue is up for grabs for anyone in the community. labels Jul 21, 2020
@johlju
Copy link
Member

johlju commented Jul 21, 2020

This is being fixed in PR dsccommunity/DscResource.Common#51

@johlju
Copy link
Member

johlju commented Jul 22, 2020

I will release a new version tomorrow that will fix this. That version will contain a new version of the common module DscResource.Common that have a fix for this issue.

@johlju
Copy link
Member

johlju commented Jul 23, 2020

Pushed a full release now, if the test passes it will be deployed within 3 hours. There have recently been some intermittent issues when running integration tests which makes me need to re-run them manually. :/

Closing this at this time. If you see any problems with the new release, please comment on this issue or reopen the issue.

@johlju johlju closed this as completed Jul 23, 2020
@johlju johlju removed the in progress The issue is being actively worked on by someone. label Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug. external The issue cannot be resolved within the DSC Resource Kit.
Projects
None yet
Development

No branches or pull requests

3 participants