Esri / arcgis-powershell-dsc

This repository contains scripts, code and samples for automating the install and configuration of ArcGIS (Enterprise and Desktop) using Microsoft Windows PowerShell DSC (Desired State Configuration).
Apache License 2.0
110 stars 61 forks source link

Enterprise 11.1 Install ODBC Driver 18.1.2.1 fails if already installed #546

Closed app-EL closed 4 weeks ago

app-EL commented 1 month ago

Community Note

Module Version

Affected Resource(s)

Configuration Files

        "SQLServerClient": [
            {
                "Name": "MICROSOFT ODBC DRIVER 18 FOR SQL SERVER 18.1.2.1",
                "InstallerPath": "\\\\...\\msodbcsql_18.1.2.1_x64.msi",
                "ProductId": "ABBE0FFF-BE91-4236-BD68-EB442A0D5CE0",
                "Arguments": " /quiet /qn IACCEPTMSODBCSQLLICENSETERMS=YES ADDLOCAL=ALL"

Expected Behavior

PSDSC should processed the msi, found that was already installed, and continued.

Actual Behavior

PSDSC ran through three "Testing MSI Package" attempts then failed and errored out.

Trace-DSCJob : 6/5/2024 9:04:33 AM: PowerShell DSC resource ArcGIS_InstallMsiPackage  failed to execute Set-TargetResource functionality with error message: [Error] Failed to 
Install MICROSOFT ODBC DRIVER 18 FOR SQL SERVER 18.1.2.1  
At C:\Program Files\WindowsPowerShell\Modules\ArcGIS\4.3.0\ArcGIS.psm1:261 char:5
+     Trace-DSCJob -Job $Job -JobName $ConfigurationName -DebugMode $De ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Trace-DSCJob

Trace-DSCJob : 6/5/2024 9:04:33 AM: The SendConfigurationApply function did not succeed.
At C:\Program Files\WindowsPowerShell\Modules\ArcGIS\4.3.0\ArcGIS.psm1:261 char:5
+     Trace-DSCJob -Job $Job -JobName $ConfigurationName -DebugMode $De ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Trace-DSCJob

Process error log: 6/5/2024 9:04:33 AM: PowerShell DSC resource ArcGIS_InstallMsiPackage failed to execute Set-TargetResource functionality with error message: [Error] Failed to Install MICROSOFT ODBC DRIVER 18 FOR SQL SERVER 18.1.2.1
6/5/2024 9:04:33 AM: The SendConfigurationApply function did not succeed.

Steps to Reproduce

Deploy as defined and re-run deployment scripting. Noted in important factoids that issue only presented after a couple months had passed since initial deployment and not during initial deployment itself.

Important Factoids

The deployment was successfully built with PSDSC Install/License/Configure in April and is being rerun in anticipation of certificate maintenance. No issues were encountered in initial deployment. Found in local testing that if I uninstall the existing ODBC drivers manually then run the script it installs them and even works across multiple initiations in a row. Tested and found same on multiple machines and found that issue presentation isn't dependent on machine or 4.2.1/4.3.0 module installation.

Nothing atypical. Windows Server 2019 on vmWare.

References

GISServer-Database.json

app-EL commented 4 weeks ago

Found problem. Somehow the ODBC drivers on some of our servers had mysteriously and randomly updated to newer version. Not a PSDSC issue.