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

Fix missing informations on geo replication tab of GlusterFS volumes. #340

Merged
merged 2 commits into from
Oct 24, 2022

Conversation

yasalos
Copy link
Contributor

@yasalos yasalos commented Oct 10, 2022

Since the upgrade to oVirt 4.5 and GlusterFS 10, information about snapshots and geo replication are no more visible on the engine Webui. After digging VDSM logs, I found that it's caused by the change of some XML elements name introduced in a new Gluster release (gluster/glusterfs#1568) and by the addition of the timezone in output of status command.

This commit fix the parsing process of the output returned by gluster command, so that data sent to ovirt engine are as expected.

Bug-URL: https://bugzilla.redhat.com/show_bug.cgi?id=2104278

Copy link
Member

@mz-pdm mz-pdm left a comment

Choose a reason for hiding this comment

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

Thank you for the fix! In order not to break hosts running with older GlusterFS versions, it should either support both the old and new formats or a dependency on the new GlusterFS version should be added to the .spec.in file (which would probably break el8 environments, so supporting both the formats seems to be preferable).

@yasalos
Copy link
Contributor Author

yasalos commented Oct 10, 2022

OK, i'll update the code so that both version are supported.

@yasalos
Copy link
Contributor Author

yasalos commented Oct 12, 2022

I updated the code to make sure that both (old and new) format of XML output are supported.

@yasalos yasalos requested review from mz-pdm and removed request for nirs, tinez and almusil October 12, 2022 16:37
Copy link
Member

@mz-pdm mz-pdm left a comment

Choose a reason for hiding this comment

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

Looks good to me, just one suggestion for a possible improvement inside the code.

A technical note: Please squash the two commits -- we don't squash commits when merging a PR, commits are kept separate because they may implement different pieces. For this reason, we use force (replacement) commits rather than amendment commits when modifying a PR during the review process.

lib/vdsm/gluster/cli.py Outdated Show resolved Hide resolved
@yasalos yasalos force-pushed the fix-gluster-10-geo-replication-info branch from 966dd38 to bb32139 Compare October 12, 2022 17:45
@yasalos yasalos force-pushed the fix-gluster-10-geo-replication-info branch from bb32139 to b7f7950 Compare October 20, 2022 11:12
@yasalos yasalos requested a review from mz-pdm October 20, 2022 12:19
Copy link
Member

@mz-pdm mz-pdm left a comment

Choose a reason for hiding this comment

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

Please rebase on master and make sure the PR contains only a single commit (no merge commit).

tests/glusterGeoRepStatusOld.xml Show resolved Hide resolved
@mz-pdm mz-pdm added the gluster label Oct 20, 2022
@mz-pdm mz-pdm requested a review from aesteve-rh October 20, 2022 12:55
aesteve-rh
aesteve-rh previously approved these changes Oct 20, 2022
Copy link
Member

@aesteve-rh aesteve-rh left a comment

Choose a reason for hiding this comment

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

Looks good to me, after having addressed the comments from @mz-pdm.

A couple of minor comments from my side.

lib/vdsm/gluster/cli.py Outdated Show resolved Hide resolved
tests/gluster_cli_test.py Show resolved Hide resolved
@yasalos yasalos force-pushed the fix-gluster-10-geo-replication-info branch 3 times, most recently from 604884b to 46ba996 Compare October 20, 2022 16:38
@mz-pdm
Copy link
Member

mz-pdm commented Oct 20, 2022

Some more errors from the linter (see the CI failures -- too long lines).

Since the upgrade to oVirt 4.5 and GlusterFS 10, information about
snapshots and geo replication are no more visible on the engine Webui.
After digging VDSM logs, I found that it's caused by the change of some
XML elements name introduced in a new Gluster release
(gluster/glusterfs#1568) and by the addition of
the timezone in output of status command.

This commit fix the parsing process of the output returned by gluster
command, so that data sent to ovirt engine are as expected.

Bug-URL: https://bugzilla.redhat.com/show_bug.cgi?id=2104278
@yasalos yasalos force-pushed the fix-gluster-10-geo-replication-info branch from 46ba996 to d332442 Compare October 22, 2022 19:41
@yasalos
Copy link
Contributor Author

yasalos commented Oct 22, 2022

Some more errors from the linter (see the CI failures -- too long lines).

Fixed

@mz-pdm
Copy link
Member

mz-pdm commented Oct 24, 2022

Great, CI and I are happy now. Let's see whether OST is happy too, as well as Albert about the formatting :-).

@mz-pdm
Copy link
Member

mz-pdm commented Oct 24, 2022

/ost

Copy link
Member

@aesteve-rh aesteve-rh left a comment

Choose a reason for hiding this comment

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

lgtm!

@mz-pdm
Copy link
Member

mz-pdm commented Oct 24, 2022

/ost

@mz-pdm
Copy link
Member

mz-pdm commented Oct 24, 2022

Although not reported here for whatever reason, OST actually ran and succeeded.

@mz-pdm mz-pdm merged commit e2f4ed6 into oVirt:master Oct 24, 2022
@mz-pdm
Copy link
Member

mz-pdm commented Oct 24, 2022

Congratulations to completing your first contribution!

@yasalos
Copy link
Contributor Author

yasalos commented Oct 24, 2022

Congratulations to completing your first contribution!

It was not just my first contribution to oVirt, but to any project. I want to thank, both Albert and you for leading the way and helping me during this process. Now, I have to go and read the new contributors guidelines section in development.md file ;-)

@yasalos yasalos deleted the fix-gluster-10-geo-replication-info branch October 24, 2022 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants