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

SqlMemory: Sets MinMemory even if state should be absent #1329

Closed
johlju opened this issue Apr 23, 2019 · 1 comment
Closed

SqlMemory: Sets MinMemory even if state should be absent #1329

johlju opened this issue Apr 23, 2019 · 1 comment
Labels
bug The issue is a bug.

Comments

@johlju
Copy link
Member

johlju commented Apr 23, 2019

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

Currently if a configuration expects min and max memory to be set to the default values, that won't happen if the configuration by mistake contains MinMemory = <value.

Verbose logs showing the problem

n/a

Suggested solution to the issue

The logic for setting the MinMemory value should be moved to the code path for '$Ensure -eq 'Present'`-

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

SQLServerMemory DefaultMemory {
    Ensure = 'Absent'
    SQLInstanceName = 'MyInstance'
    MinMemory = 100
}

SQL Server edition and version the target node is running

n/a

SQL Server PowerShell modules present on the target node

n/a

The operating system the target node is running

n/A

Version and build of PowerShell the target node is running

n/a

Version of the DSC module that was used ('dev' if using current dev branch)

Dev

johlju added a commit to johlju/SqlServerDsc that referenced this issue Apr 23, 2019
- Added en-US localization (issue dsccommunity#617).
  - No longer will the resource set the MinMemory value if it was provided
    in a configuration that also set the `Ensure` parameter to 'Absent' (issue dsccommunity#1329).
  - Refactored unit tests to simplify them add add slightly more code
    coverage.
@johlju johlju added bug The issue is a bug. in progress The issue is being actively worked on by someone. labels Apr 23, 2019
johlju added a commit to johlju/SqlServerDsc that referenced this issue Apr 25, 2019
- Added en-US localization (issue dsccommunity#617).
  - No longer will the resource set the MinMemory value if it was provided
    in a configuration that also set the `Ensure` parameter to 'Absent' (issue dsccommunity#1329).
  - Refactored unit tests to simplify them add add slightly more code
    coverage.
johlju added a commit that referenced this issue Apr 25, 2019
- Changes to SqlServerMemory
  - Added en-US localization (issue #617).
  - No longer will the resource set the MinMemory value if it was provided
    in a configuration that also set the `Ensure` parameter to 'Absent' (issue #1329).
  - Refactored unit tests to simplify them add add slightly more code
    coverage.
@johlju johlju removed the in progress The issue is being actively worked on by someone. label Jul 18, 2019
@johlju
Copy link
Member Author

johlju commented Jul 18, 2019

This looks like it was solved in PR #1330

@johlju johlju changed the title SqlServerMemory: Sets MinMemory even if state should be absent SqlMemory: Sets MinMemory even if state should be absent Jul 10, 2020
@johlju johlju closed this as completed Mar 26, 2022
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.
Projects
None yet
Development

No branches or pull requests

1 participant