-
Notifications
You must be signed in to change notification settings - Fork 163
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 broken fence_xenapi.py #559
base: main
Are you sure you want to change the base?
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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