dsccommunity / dsccommunity/SqlServerDsc
SqlSetup: when installs fails a new folder is created and media is copied, until there are no more disk space
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 385
- Forks
- 224
- PR merge metrics
- No merged PRs in 30d
Description
From issue #781: "After installing SQL Server, xSQLServerSetup does not clean up the install files that were copied from SourcePath, resulting in an extra 3GB of disk usage. Not a huge deal, but if there is an error in the DSC Configuration and the install fails, DSC will keep retrying and eventually exhaust the server's disk space."
This probably happens when SourcePath is set to for example 'C:\' so there is no leaf. It should not use New-Guid to get a temporary folder, but instead some static name, but unique to the version being installed, so that robocopy is using the same folder.
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
Start in DSCResources/MSFT_xSQLServerSetup/MSFT_xSQLServerSetup.psm1 at lines 889-893 and inspect how SourcePath produces the temporary folder and how robocopy uses it. Reproduce the retry scenario with a SourcePath such as C:, then verify that repeated failed installs reuse the same version-specific folder instead of creating new folders and copying more media.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, sql
- Domain
- databases, devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100