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

Comments

Projects
None yet
2 participants
@johlju
Collaborator

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

@randomnote1

This comment has been minimized.

Show comment
Hide comment
@randomnote1

randomnote1 Sep 12, 2017

Contributor

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

Contributor

randomnote1 commented Sep 12, 2017

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

@randomnote1

This comment has been minimized.

Show comment
Hide comment
@randomnote1

randomnote1 Sep 12, 2017

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.
Contributor

randomnote1 commented Sep 12, 2017

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

This comment has been minimized.

Show comment
Hide comment
@johlju

johlju Sep 12, 2017

Collaborator

@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.

Collaborator

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 and removed help wanted labels Sep 12, 2017

@randomnote1

This comment has been minimized.

Show comment
Hide comment
@randomnote1

randomnote1 Sep 12, 2017

Contributor

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

Contributor

randomnote1 commented Sep 12, 2017

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

@johlju

This comment has been minimized.

Show comment
Hide comment
@johlju

johlju Sep 12, 2017

Collaborator

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. :)

Collaborator

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

This comment has been minimized.

Show comment
Hide comment
@randomnote1

randomnote1 Sep 12, 2017

Contributor

Gotcha. PR submitted.

Contributor

randomnote1 commented Sep 12, 2017

Gotcha. PR submitted.

@johlju johlju closed this in #803 Sep 13, 2017

johlju added a commit that referenced this issue Sep 13, 2017

xSQLServerAlwaysOnAvailabilityGroupReplica: Added EndpointPort and En…
…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 label Sep 13, 2017

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