Fix GlusterFS module for version 4.0 and above #48222
Conversation
Hi @Martin819 - This is failing some tests. Can you take a look? unit.modules.test_glusterfs.GlusterfsTestCase.test_add_volume_bricks https://jenkins.saltstack.com/job/PR/job/salt-pr-linode-cent7-py3/5912/#showFailuresLink |
@rallytime Hi, thanks for pinging me about it. |
Thanks @Martin819 for submitting this. |
Hi @Martin819 - There's just one more glusterfs test failure that needs to be fixed.
https://jenkins.saltstack.com/job/PR/job/salt-pr-linode-ubuntu14-n/23969/ |
2922ee3
to
e57bea7
@rallytime This should be fixed now by updating the test case. It uses mocked version so I had to adjust it to the new format. |
bd5da83
into
saltstack:develop
@rallytime |
Yeah, for sure. |
Hi @Martin819 - It looks like this module has diverged in develop from the earlier branches and this won't back-port cleanly. If you'd like this fix to be in 2017.7, then you'll need to make a separate fix against that branch. Would you mind submitting that? |
Hi @rallytime I can do that for sure. |
What does this PR do?
Fix for versions of GlusterFS 4.0 and above. In the GlusterFS module, there are conditions checking the version of GFS lower than 3.6, because it uses different syntax to parse the response. Unfortunately, the condition on checks minor version, so when running a version 4.0, it fails, because 0 < 6 = true.
What issues does this PR fix or reference?
Fixed by changing the condition to compare both minor and major versions.
Previous Behavior
Failed to parse the response causing the state to fail.
New Behavior
State successfully finished.