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

iSCSIInitiator TargetPortalAddress should be a key property #59

Open
nyanhp opened this issue Jun 4, 2020 · 0 comments
Open

iSCSIInitiator TargetPortalAddress should be a key property #59

nyanhp opened this issue Jun 4, 2020 · 0 comments

Comments

@nyanhp
Copy link

nyanhp commented Jun 4, 2020

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

My customer is trying to connect two target portals on their NetApp from one initiator address. Since the TargetPortalAddress is not a key property, this is not possible.

Verbose logs showing the problem

MOF creation already fails due to duplicate key constraints (Same NodeAddress, different TargetPortalAddress)

Test-ConflictingResources : A conflict was detected between resources '[iSCSIInitiator]i1 (::5::5::iSCSIInitiator)' and '[iSCSIInitiator]i2 (::11::5::iSCSIInitiator)' in node 'localhost'. Resources have 
identical key properties but there are differences in the following non-key properties: 'TargetPortalAddress'. Values '10.1.1.10' don't match values '10.1.129.10'. Please update these property values so 
that they are identical in both cases.
At line:289 char:9
+         Test-ConflictingResources $keywordName $canonicalizedValue $k ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Write-Error], InvalidOperationException
    + FullyQualifiedErrorId : ConflictingDuplicateResource,Test-ConflictingResources
Compilation errors occurred while processing configuration 'co'. Please review the errors reported in error stream and modify your configuration code appropriately.
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:3917 char:5
+     throw $ErrorRecord
+     ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (co:String) [], InvalidOperationException
    + FullyQualifiedErrorId : FailToProcessConfiguration

Suggested solution to the issue

Make TargetPortalAddress a key property. I'd be happy to do it if you think it makes sense.

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

configuration co
{
    Import-DscResource -ModuleName iscsidsc

    iSCSIInitiator i1
    {
        NodeAddress = '192.168.2.12'
        TargetPortalAddress = '10.1.1.10'
    }

    iSCSIInitiator i2
    {
        NodeAddress = '192.168.2.12'
        TargetPortalAddress = '10.1.129.10'
    }
}
co -Verbose

The operating system the target node is running

OsName               : Microsoft Windows 10 Pro
OsOperatingSystemSKU : 48
OsArchitecture       : 64-bit
WindowsVersion       : 1909
WindowsBuildLabEx    : 18362.1.amd64fre.19h1_release.190318-1202
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

Version and build of PowerShell the target node is running

Name                           Value                                                                                                                                                                        
----                           -----                                                                                                                                                                        
PSVersion                      5.1.18362.752                                                                                                                                                                
PSEdition                      Desktop                                                                                                                                                                      
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                                      
BuildVersion                   10.0.18362.752                                                                                                                                                               
CLRVersion                     4.0.30319.42000                                                                                                                                                              
WSManStackVersion              3.0                                                                                                                                                                          
PSRemotingProtocolVersion      2.3                                                                                                                                                                          
SerializationVersion           1.1.0.1 

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

1.5.0.41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant