ceph-iscsi-cli icon indicating copy to clipboard operation
ceph-iscsi-cli copied to clipboard

api: make version checks more generic

Open mikechristie opened this issue 7 years ago • 3 comments

Instead of checking for specific rpms, check for the minimal package versions we need.

This drops the kernel check because ceph-iscsi-config and rtslib will request specific kernel features (like the qfull setting and alua) and if they are not supported a unsupported kernel error will be reported.

This also drops the tcmu-runner check. This is also dynamically handled due to the detection of missing settings like osd_op_timeout not being supported by unsupported versions of tcmu-runner.

Signed-off-by: Mike Christie [email protected]

mikechristie avatar Nov 30 '17 02:11 mikechristie

Would this mean that a gateway would be accepted into the config that doesn't have the correct versions of tcmu-runner and kernel? And if so, I'd have to diagnose that by knowing to look at tcmu-runner and syslog?

pcuzner avatar Nov 30 '17 04:11 pcuzner

Currently, yes, but I am trying to make it so the create command returns a error string like "ALUA not supported in kernel" or "Image not created due to unsupported feature XYZ in ABC", instead of just logging it and returning the generic internal server error. Will something like that be ok?

Or, if we want to do these checks at checksversion time, do you think we should have the remote caller pass in its version requirements and check against the local versions? That way we could detect if the user was running a version 2 on the remote gw, and on the local gw we are running version 1. And, version 1 meets the minimal requirements when it was coded but there is some issue where we need all versions sync'd to version 2.

I can do either one or do we need both?

mikechristie avatar Nov 30 '17 18:11 mikechristie

Paul, I made the patches return error strings for the gwcli commands. gw create and disk add return messages like:

Failed : iscsi1 failed package validation checks - Found ceph_iscsi_config 2.3. 102.3 or newer required.

Failed : disk create/update failed on iscsi1. Could not set LIO device attribute cmd_time_out/qfull_time_out for device: rbd.disk_2. Kernel not supported. - error(Cannot find attribute: qfull_time_out)

mikechristie avatar Mar 30 '18 07:03 mikechristie