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

Open
johlju opened this Issue Dec 30, 2018 · 5 comments

Comments

Projects
None yet
1 participant
@johlju
Copy link
Collaborator

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

This comment has been minimized.

Copy link
Collaborator

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

This comment has been minimized.

Copy link
Collaborator

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 and removed help wanted labels Dec 31, 2018

johlju added a commit to johlju/SqlServerDsc that referenced this issue Dec 31, 2018

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 PowerShell#1260).

@johlju johlju closed this in #1262 Dec 31, 2018

johlju added a commit that referenced this issue Dec 31, 2018

SqlServerDsc: Fixes integration test fail to install default instance (
…#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

This comment has been minimized.

Copy link
Collaborator

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

Changes to SqlServerDsc
- Reverting the change that was made as part of the issue PowerShell#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

Changes to SqlServerDsc
- Reverting the change that was made as part of the issue PowerShell#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

Changes to SqlSetup
- Updated the integration test to stop the named instance while installing
  the other instances to mitigate issue PowerShell#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

Changes to SqlServerDsc
- Reverting the change that was made as part of the issue PowerShell#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

Changes to SqlSetup
- Updated the integration test to stop the named instance while installing
  the other instances to mitigate issue PowerShell#1260.

@johlju johlju referenced this issue Jan 15, 2019

Open

SqlServerDsc: Attempt to mitigate issue #1260 #1268

3 of 9 tasks complete
@johlju

This comment has been minimized.

Copy link
Collaborator

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

This comment has been minimized.

Copy link
Collaborator

johlju commented Jan 16, 2019

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

@johlju johlju referenced this issue Jan 19, 2019

Open

SqlSetup: Tempdb File Configuration #1242

9 of 9 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment