Skip to content

Update pcs support for > 0.10 - #60257

Merged
Ch3LL merged 59 commits into
saltstack:masterfrom
waynegemmell:master
Aug 24, 2021
Merged

Update pcs support for > 0.10#60257
Ch3LL merged 59 commits into
saltstack:masterfrom
waynegemmell:master

Conversation

@waynegemmell

@waynegemmell waynegemmell commented May 26, 2021

Copy link
Copy Markdown
Contributor

What does this PR do?

This PR accommodates the cluster auth and setup when using newer version of PCS.

What issues does this PR fix or reference?

Fixes: #56924

Previous Behavior

When authenticating and setting up a cluster the command would fail against pcs < 0.10

New Behavior

Creating and authenticating the cluster is successful.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

No

@waynegemmell
waynegemmell requested a review from a team as a code owner May 26, 2021 10:14
@waynegemmell
waynegemmell requested review from Ch3LL and removed request for a team May 26, 2021 10:14
@waynegemmell waynegemmell changed the title Master Update pcs support for > 0.10 May 26, 2021
@garethgreenaway garethgreenaway added the needs-testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases label May 26, 2021
Comment thread salt/modules/pcs.py Outdated
Comment thread salt/modules/pcs.py Outdated
Comment thread salt/modules/pcs.py Outdated

@s0undt3ch s0undt3ch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now all we need is tests covering your changes....

@waynegemmell

Copy link
Copy Markdown
Contributor Author

Now all we need is tests covering your changes....

Problem is that there is no existing test on that module/state. If they existed I would have updated them. I don't have any idea about how to do this.

@waynegemmell

Copy link
Copy Markdown
Contributor Author

@s0undt3ch How do we resolve this? Can we skip the tests or can someone start with the tests and I just add to it?

@Ch3LL

Ch3LL commented May 28, 2021

Copy link
Copy Markdown
Contributor

I'll write a couple tests for you so you can start form there and I'll push it to your branch. I'm working on them now.

@waynegemmell

Copy link
Copy Markdown
Contributor Author

@Ch3LL Thank you!

@Ch3LL

Ch3LL commented May 28, 2021

Copy link
Copy Markdown
Contributor

I pushed some pcs module tests :)

@sagetherage
sagetherage requested a review from s0undt3ch June 18, 2021 03:49

@Ch3LL Ch3LL left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one more change request from me

Comment thread salt/states/pcs.py
return ret
if not isinstance(extra_args, (list, tuple)):
extra_args = []
if "--force" not in extra_args:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with that then, but can we add back the ability to pass in extra_args.

@Ch3LL

Ch3LL commented Aug 3, 2021

Copy link
Copy Markdown
Contributor

ping @garethgreenaway would you also mind reviewing here as well?

garethgreenaway
garethgreenaway previously approved these changes Aug 3, 2021
@garethgreenaway

Copy link
Copy Markdown
Contributor

With the change that @Ch3LL requested for extra_args this looks good to me.

Ch3LL
Ch3LL previously approved these changes Aug 4, 2021
@Ch3LL

Ch3LL commented Aug 4, 2021

Copy link
Copy Markdown
Contributor

just a couple of test failures that need to be cleaned up here and then we can get this merged :)

@waynegemmell

Copy link
Copy Markdown
Contributor Author

Updated. There is some documentation fail but I can't work out what's going on.

@waynegemmell

Copy link
Copy Markdown
Contributor Author

Is there anything still outstanding on this?

@Ch3LL

Ch3LL commented Aug 17, 2021

Copy link
Copy Markdown
Contributor

pre-commit is failing and needs to be cleaned up

@waynegemmell

Copy link
Copy Markdown
Contributor Author

Looks successful? If not. Please assist. I can't see how to fix any of the transient errors that have popped up.

@Ch3LL
Ch3LL merged commit 6f625ff into saltstack:master Aug 24, 2021
@welcome

welcome Bot commented Aug 24, 2021

Copy link
Copy Markdown

Congratulations on your first PR being merged! 🎉

@waynegemmell

waynegemmell commented Aug 26, 2021 via email

Copy link
Copy Markdown
Contributor Author

dwoz pushed a commit to dwoz/salt that referenced this pull request Sep 12, 2021
* PCS module and state updated to handle pcs version > 0.10

* PCS module and state updated to handle pcs version > 0.10 - changelog

* Removed six

* Module documentation updated

* Requested changes implemented

* Add pcs module tests

* Tests added and is_auth altered to fit purpose

* Tests added. Debian bypass for broken config creation bypassed.

* Tests debug output removed

* Minor linting fixes

* Update salt/modules/pcs.py

Co-authored-by: Megan Wilhite <megan.wilhite@gmail.com>

* Updated as per @Ch3LL's recommendations and other pre-commit fails

* Removed test_config_show and some commented out print lines

* Extra documentation added to cluster_setup

* Updated item_show to work properly with properties and updated tests to match

* Fixed change requests and added a wipe_default flag to remove default config

* Extra args now gets passed from the pcs state to the auth function in the pcs module.

* Minor formatting fix

* Minor build fix to make linter happy

Co-authored-by: Wayne Gemmell <wayne@connect-mobile.co.za>
Co-authored-by: Megan Wilhite <megan.wilhite@gmail.com>
Co-authored-by: Sage the Rage <36676171+sagetherage@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature new functionality including changes to functionality and code refactors, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] PCS module/state broken for Pacemaker 2.x

6 participants