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

xSQLServerAlwaysOnAvailabilityGroupReplica: Hash table returned from get-method does not match schema #477

Closed
johlju opened this issue Apr 7, 2017 · 6 comments · Fixed by #803
Labels
bug The issue is a bug.

Comments

@johlju
Copy link
Member

johlju commented Apr 7, 2017

Details of the scenario you try and problem that is occurring:
The hash table that is returned from the Get-method does not contain the following properties

PrimaryReplicaSQLServer
PrimaryReplicaSQLInstanceName
EndpointHostName

Regarding EndpointHostName, the hash table return the read only property SQLServerNetName, are that actually suppose to be set to EndpointHostName instead?

The hash table do contain this property which is not part of the schema. These should be added as read only properties.

EndpointUrl
EndpointPort

The DSC configuration that is using the resource (as detailed as possible):
n/a

Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running:
n/a

Version of the DSC module you're using, or '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. labels Apr 7, 2017
@randomnote1
Copy link
Contributor

@johlju, I'm going to take this and work on it.

@randomnote1
Copy link
Contributor

Thanks for detailing the issue @johlju. I'm going to try and document why some of the supplied parameters are not included in the hashtable that is returned from Get-TargetResource.

  • The parameters PrimaryReplicaSQLServer and PrimaryReplicaSQLInstanceName are not important in determining the current state of the Availability Replica. These are only required when creating or updating the replica.
  • EndpointHostName is not included in the hash table because the EndpointURL is dynamically created using the supplied EndpointHostName.
  • EndpointHostName is only set to the SQLServerNetName if EndpointHostName is not supplied.

@johlju
Copy link
Member Author

johlju commented Sep 12, 2017

@randomnote1 depending on issue PowerShell/DscResources#318 we should either add these properties to the hash table or leave it as is (except for the missing read properties that should be added).

Setting this as in progress for the time being.

@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 Sep 12, 2017
@randomnote1
Copy link
Contributor

I'm ready to submit the PR for this. Just waiting on the decision!

@johlju
Copy link
Member Author

johlju commented Sep 12, 2017

Please submit the PR. It's an approvement. I meant that we can start to enforce the rule once the issue in DscResources are "approved"/correct. :)

@randomnote1
Copy link
Contributor

Gotcha. PR submitted.

johlju pushed a commit that referenced this issue Sep 13, 2017
…dpointUrl as read-only properties to the schema (#803)

- Changes to xSQLServerAlwaysOnAvailabilityGroupReplica
  - Added the following read-only properties to the schema ([issue #477](#477))
    - EndpointPort
    - EndpointURL
@johlju johlju removed the in progress The issue is being actively worked on by someone. label Sep 13, 2017
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
2 participants