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

SqlServerDsc: Integration tests fail to install instance #1260

Closed
johlju opened this issue Dec 30, 2018 · 6 comments · Fixed by #1262
Closed

SqlServerDsc: Integration tests fail to install instance #1260

johlju opened this issue Dec 30, 2018 · 6 comments · Fixed by #1262
Labels
blocking release The issue or pull request is blocking the next release. Higher priority than label 'High priority'. bug The issue is a bug.

Comments

@johlju
Copy link
Member

johlju commented Dec 30, 2018

There are currently an issue with one of the integration tests, the test that installs a default instance. This is most likely related to a problem on the AppVeyor build worker.
Trying to narrowing down the problem by remove different parts of the integration tests to see if this is a problem with one of the other tests, or just a timing issue on the build worker.
Previously it failed when running dev-branch, and I have actually gotten it to pass when removing all the unit tests, but sometimes it works, so this error comes intermittent.

Posting this issue so that everyone is aware of this problem.

This is blocking all the PR's from merging and blocking release.

@johlju johlju pinned this issue Dec 30, 2018
@johlju johlju added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. blocking release The issue or pull request is blocking the next release. Higher priority than label 'High priority'. labels Dec 30, 2018
@johlju
Copy link
Member Author

johlju commented Dec 31, 2018

Updated the issue description. It seems this is an intermittent problem when running on the AppVeyor build worker, and probably due to all the previous installed (but stopped) instances on the build worker.

Since we can't control what is on the build worker, or takes to long to uninstall all the existing instances, I see only two options.

  1. Try to restart the build worker (during install step) before running tests, if a reboot is missing and would help.
  2. Remove all integration test related to the default instance, when running in AppVeyor, until we can have a safer method of running tests (maybe Azure Pipelines?).

@johlju
Copy link
Member Author

johlju commented Dec 31, 2018

So I did the alternative 1 above, and that made 4 of 4 test runs to pass. Sending in a PR with that change and hold my fingers that it's a solution. 🙂

@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 Dec 31, 2018
johlju added a commit to johlju/SqlServerDsc that referenced this issue Dec 31, 2018
- During testing in AppVeyor the Build Worker is restarted in the install
  step to make sure the are no residual changes left from a previous SQL
  Server install on the Build Worker done by the AppVeyor Team (issue dsccommunity#1260).
johlju added a commit that referenced this issue Dec 31, 2018
…#1262)

- Changes to SqlServerDsc
   - During testing in AppVeyor the Build Worker is restarted in the install
     step to make sure the are no residual changes left from a previous SQL
     Server install on the Build Worker done by the AppVeyor Team (issue #1260).
@johlju johlju unpinned this issue Jan 1, 2019
@johlju
Copy link
Member Author

johlju commented Jan 11, 2019

Reopning this issue since the workaround that was merged only mitigated the issue, but did not solve it. Discussion around this SQL issue is being made in the issue appveyor/ci#2804. A thought is that this is due to are test suite is to memory intensive. One change is that the AppVeyor build worker since two days back has more memory allocated.

I suggest we revert the workaround, and if the issue still exist, then look into running test sequentially in several build workers (parallel testing, but for free account they are run sequentially).

@johlju johlju reopened this Jan 11, 2019
@johlju johlju pinned this issue Jan 11, 2019
johlju added a commit to johlju/SqlServerDsc that referenced this issue Jan 11, 2019
- Reverting the change that was made as part of the issue dsccommunity#1260
  in the previous release, as it only mitigated the issue, it did not
  solve the issue.
johlju added a commit to johlju/SqlServerDsc that referenced this issue Jan 11, 2019
- Reverting the change that was made as part of the issue dsccommunity#1260
  in the previous release, as it only mitigated the issue, it did not
  solve the issue.
johlju added a commit to johlju/SqlServerDsc that referenced this issue Jan 11, 2019
- Updated the integration test to stop the named instance while installing
  the other instances to mitigate issue dsccommunity#1260.
@johlju johlju changed the title SqlServerDsc: Integration tests fail to install default instance SqlServerDsc: Integration tests fail to install instance Jan 14, 2019
johlju added a commit to johlju/SqlServerDsc that referenced this issue Jan 15, 2019
- Reverting the change that was made as part of the issue dsccommunity#1260
  in the previous release, as it only mitigated the issue, it did not
  solve the issue.
johlju added a commit to johlju/SqlServerDsc that referenced this issue Jan 15, 2019
- Updated the integration test to stop the named instance while installing
  the other instances to mitigate issue dsccommunity#1260.
@johlju
Copy link
Member Author

johlju commented Jan 16, 2019

It seems the service is in single user mode, and that is why it can't connect to the instance. I totally missed this error message. 😞

VERBOSE: Detailed results:
VERBOSE:   Feature:                       Database Engine Services
VERBOSE:   Status:                        Failed: see logs for details
VERBOSE:   Reason for failure:            An error occurred during the setup process of the feature.
VERBOSE:   Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
VERBOSE:   Component name:                SQL Server Database Engine Services Instance Features
VERBOSE:   Component error code:          0x84BB0001
VERBOSE:   Error description:             Login failed for user 'APPVYR-WIN\SqlInstall'. Reason: Server is in single user mode. Only one administrator can connect at this time.

That means it must be a timing issue when the resource try to connect to the SQL Server instance after successful install to verify availability/existence in the Get-TargetResource function. Correction, the problem is during the install - Setup exited with code '-2068119551', and it reports the component error code above.

@johlju
Copy link
Member Author

johlju commented Jan 16, 2019

Are there someone that knows a direct download URL for the ISO for SQL Server 2016 with SP2?

johlju added a commit that referenced this issue Jan 21, 2019
- Changes to SqlServerDsc
  - Reverting the change that was made as part of the issue #1260
    in the previous release, as it only mitigated the issue, it did not
    solve the issue.
  - Removed the container testing since that broke the integration tests,
    possible due to using excessive amount of memory on the AppVeyor build
    worker. This will make the unit tests to take a bit longer to run (issue #1260).
  - The unit tests and the integration tests are now run in two separate
    build workers in AppVeyor. One build worker runs the integration tests,
    while a second build worker runs the unit tests. The build workers runs
    in parallel on paid accounts, but sequentially on free accounts (issue #1260).
  - Clean up error handling in some of the integration tests that was
    part of a workaround for a bug in Pester. The bug is resolved, and
    the error handling is not again built into Pester.
- Changes to SqlSetup
  - Updated the integration test to stop the named instance while installing
    the other instances to mitigate issue #1260.
@johlju
Copy link
Member Author

johlju commented Jan 21, 2019

I hope the latest merge of PR #1268 will solve this. I will reopen if we see this issue again.

@johlju johlju closed this as completed Jan 21, 2019
@johlju johlju unpinned this issue Jan 21, 2019
@johlju johlju removed the in progress The issue is being actively worked on by someone. label Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocking release The issue or pull request is blocking the next release. Higher priority than label 'High priority'. bug The issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant