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

SqlAlwaysOnService: BLOCKING RELEASE: Integration tests have started failing (on updated build worker image?) #1155

Closed
johlju opened this issue Jun 28, 2018 · 1 comment · Fixed by #1169
Assignees
Labels
bug The issue is a bug. tests The issue or pull request is about tests only.

Comments

@johlju
Copy link
Member

johlju commented Jun 28, 2018

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

The integration tests have started failing for resource SqlAlwaysOnService. This might be caused by an updated build worker image.

Error message

  [-] Error occurred in test script 'C:\projects\sqlserverdsc\Tests\Integration\MSFT_SqlAlwaysOnService.Integration.Tests.ps1' 2.88s
    InvalidCastException: Specified cast is not valid.
    at Get-NetIPAddressNetwork, C:\projects\sqlserverdsc\Tests\TestHelpers\CommonTestHelper.psm1: line 221
    at <ScriptBlock>, C:\projects\sqlserverdsc\Tests\Integration\MSFT_SqlAlwaysOnService.config.ps1: line 18
    at <ScriptBlock>, C:\projects\sqlserverdsc\Tests\Integration\MSFT_SqlAlwaysOnService.Integration.Tests.ps1: line 44
    at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\Pester\4.3.1\Pester.psm1: line 837
    at Invoke-Pester<End>, C:\Program Files\WindowsPowerShell\Modules\Pester\4.3.1\Pester.psm1: line 852
    at Invoke-AppveyorTestScriptTask, C:\projects\sqlserverdsc\DscResource.Tests\AppVeyor.psm1: line 667

https://ci.appveyor.com/project/PowerShell/sqlserverdsc/build/9.0.369.0?fullLog=true#L7771

The DSC configuration that is using the resource (as detailed as possible)

n/a

Version of the operating system and PowerShell the target node is running

n/a

SQL Server edition and version the target node is running

n/a

What SQL Server PowerShell modules, and which version, are present on the target node.

n/a

Version of the DSC module you're using, or write 'dev' if you're using current dev branch

Dev

@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'. tests The issue or pull request is about tests only. labels Jun 28, 2018
@johlju
Copy link
Member Author

johlju commented Jun 30, 2018

It seems it's because Docker has added an NIC with an IPv6 static address, and our helper function `Get-NetIPAddressNetwork' does not support IPv6 (yet).

Easiest solution is to remove the IPv6 static address from the evaluation as it is currently ignored by the cluster.

So changing this in the file MSFT_SqlAlwaysOnService.config.ps1

$ignoreAdapterIpAddress = Get-NetAdapter |
    Get-NetIPInterface |
        Where-Object -FilterScript {
            $_.Dhcp -eq 'Disabled'
        } | Get-NetIPAddress

to this should solve it.

$ignoreAdapterIpAddress = Get-NetAdapter |
    Get-NetIPInterface |
        Where-Object -FilterScript {
            $_.AddressFamily -eq 'IPv4' `
            -and $_.Dhcp -eq 'Disabled'
        } | Get-NetIPAddress

@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 Jun 30, 2018
johlju added a commit to johlju/SqlServerDsc that referenced this issue Jun 30, 2018
- Integration tests was updated to handle new IPv6 addresses on the AppVeyor
  build worker [issue dsccommunity#1155](dsccommunity#1155))
@johlju johlju self-assigned this Jun 30, 2018
johlju added a commit that referenced this issue Jun 30, 2018
- Changes to SqlAlwaysOnService
  - Integration tests was updated to handle new IPv6 addresses on the AppVeyor build worker (issue #1155).
@johlju johlju removed blocking release The issue or pull request is blocking the next release. Higher priority than label 'High priority'. in progress The issue is being actively worked on by someone. labels Jun 30, 2018
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. tests The issue or pull request is about tests only.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant