Fix broken fence_xenapi.py#559
Conversation
Fix to make --uuid work (so that this is actually usable). Added missing --plug-separator option (to prevent error message). Added ability to bypass SSL Certificate verification using --ssl-insecure
|
Can one of the admins check and authorise this run please: https://ci.kronosnet.org/job/fence-agents/job/fence-agents-pipeline/job/PR-559/1/input |
oalbrigt
left a comment
There was a problem hiding this comment.
A couple of changes needed, and you need to run make xml-upload and add the updated metadata to the PR to avoid CI failing.
| try: | ||
| # Create the XML RPC session to the specified URL. | ||
| session = XenAPI.Session(url) | ||
| session = XenAPI.Session(url, None, None, 0, 1, skipVerification) |
There was a problem hiding this comment.
Session() doesnt appear to have a parameter for skipVerification:
https://github.com/ClusterLabs/fence-agents/blob/main/lib/XenAPI.py.py#L121
There was a problem hiding this comment.
Looks like the XenAPI library bundled in this repo is significantly outdated. The latest version from https://github.com/xapi-project/xen-api/blob/master/scripts/examples/python/XenAPI/XenAPI.py should be loaded instead.
| def main(): | ||
|
|
||
| device_opt = ["login", "passwd", "port", "no_login", "no_password", "session_url", "web"] | ||
| device_opt = ["login", "passwd", "port", "no_login", "no_password", "session_url", "web", "ssl", "uuid", "plug_separator"] |
There was a problem hiding this comment.
plug_separator is included in "port" from fencing.py, so you can remove that and it's definition above.
uuid isnt neither either, as the fencing library sets it based on the --plug/-n parameter.
There was a problem hiding this comment.
I couldn't get it to work without these two parameters. Maybe I'm just testing it wrong? This way works for me and I have no way of validating other solutions, so someone else might need to take over this pull request (or just delete it if you prefer).
There was a problem hiding this comment.
You probably need to update your systems fencing library (usually located in /usr/share/fence).
Update XenAPI to latest version from xapi-project/xen-api repo
|
Can one of the admins check and authorise this run please: https://ci.kronosnet.org/job/fence-agents/job/fence-agents-pipeline/job/PR-559/2/input |
Fix to make --uuid work (so that this is actually usable). Added missing --plug-separator option (to prevent error message). Added ability to bypass SSL Certificate verification using --ssl-insecure