Skip to content

(MODULES-2543) Purge members from SQL Server Role #221

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

Merged
merged 1 commit into from
Jun 21, 2017
Merged

(MODULES-2543) Purge members from SQL Server Role #221

merged 1 commit into from
Jun 21, 2017

Conversation

glennsarti
Copy link
Contributor

Previously the purge_members parameter of the sqlserver::role resource was not
taking effect. This commit re-instates the acceptance test for this behaviour
and changes the sql query used to detect members which are no longer required.
It appears the table variable usage was returning zero results for the row
count. Instead the detection is changed to just using the SELECT query, instead
of an INSERT INTO, which does not require any row count calculation.

@glennsarti glennsarti changed the title {WIP}(MODULES-2543) Purge members from SQL Server Role (MODULES-2543) Purge members from SQL Server Role Jun 20, 2017
@glennsarti glennsarti changed the title (MODULES-2543) Purge members from SQL Server Role {WIP}(MODULES-2543) Purge members from SQL Server Role Jun 20, 2017
@glennsarti
Copy link
Contributor Author

Looks like the sqlserver::role destroy is not removing membership before dropping the role.

Previously the purge_members parameter of the sqlserver::role resource was not
taking effect.  This commit re-instates the acceptance test for this behaviour
and changes the sql query used to detect members which are no longer required.
It appears the table variable usage was returning zero results for the row
count.  Instead the detection is changed to just using the SELECT query, instead
of an INSERT INTO, which does not require any row count calculation.

This commit also modifies the role deletion as SQL Server requires any members
to be removed prior to a role being deleted.
@glennsarti glennsarti changed the title {WIP}(MODULES-2543) Purge members from SQL Server Role (MODULES-2543) Purge members from SQL Server Role Jun 20, 2017
@glennsarti
Copy link
Contributor Author

Fixed the role destroy issue. Ready for merge

@jpogran jpogran merged commit e18fb51 into puppetlabs:master Jun 21, 2017
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

Successfully merging this pull request may close these issues.

2 participants