summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* update to 2.1.fb63HEADv2.1.fb63masterAndy Grover2017-03-011-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Merge pull request #87 from apearson-ibm/masterAndy Grover2017-02-071-1/+7
|\ | | | | Add ability to invalidate caches
| * Add ability to invalidate cachesAmartey Pearson2017-02-071-1/+7
| |\ |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | For efficiency, rtslib may have caches (today for the data in configfs). A client may need to clear out these caches such as via the refresh option in targetcli. * Add new invalidate_caches method to RTSRoot. While this only has a single cache today, it gives the ability to extend to any future caches. * While bs_cache really should be private, it probably shouldn't be changed given that this is a library and may be used elsewhere. Signed-off-by: Amartey Pearson <apearson@us.ibm.com>
| * Add ability to invalidate cachesAmartey Pearson2017-01-231-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For efficiency, rtslib may have caches (today for the data in configfs). A client may need to clear out these caches such as via the refresh option in targetcli. * Add new invalidate_caches method to RTSRoot. While this only has a single cache today, it gives the ability to extend to any future caches. * While bs_cache really should be private, it probably shouldn't be changed given that this is a library and may be used elsewhere. Signed-off-by: Amartey Pearson <apearson@us.ibm.com>
* | Merge pull request #89 from mikechristie/alua-exceptionAndy Grover2017-02-076-15/+65
|\ \ | |/ |/| Fix crash during restore due to ALUA exception
| * Don't raise exception when getting/setting a LUNs ALUA groupMike Christie2017-02-061-11/+23
| | | | | | | | | | | | | | | | Fix crash due to trying to get/set the ALUA group on passthrough backends. Instead of raising an exception return None/-1 on failure. Signed-off-by: Mike Christie <mchristi@redhat.com>
| * Add ALUA supported methodMike Christie2017-02-065-4/+42
|/ | | | | | | | | | | Passthrough backends like pscsi and user do not support ALUA managment through configfs. You can create groups, but writing to files can cause the kernel crashes. This adds a alua_supported method that backends can override and return False to indicate they do not support ALUA. Signed-off-by: Mike Christie <mchristi@redhat.com>
* Merge pull request #86 from mikechristie/alua-fixesAndy Grover2017-01-191-2/+12
|\ | | | | Do not set alua_tg_pt_gp if not supported
| * Do not set alua_tg_pt_gp if not supportedMike Christie2017-01-111-2/+12
|/ | | | | | | Pass through backends do not support alua_tg_pt_gp and writing to the file will hang the system. Trying to read from them will cause a rtslib crash because they are empty. This patch fixes both issues by detecting the empty file and failing writes.
* version 2.1.fb62v2.1.fb62Andy Grover2017-01-041-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Merge pull request #84 from mikechristie/aluaAndy Grover2017-01-045-2/+442
|\ | | | | ALUA support for rtslib-fb
| * Delete ALUA groups with its storage objectMike Christie2017-01-031-0/+4
| | | | | | | | | | | | | | We must delete the ALUA groups under the storage object when deleting the storage object. Signed-off-by: Mike Christie <mchristi@redhat.com>
| * Add ALUA restore supportMike Christie2017-01-033-2/+33
| | | | | | | | | | | | Add support to save ALUA info and restore it. Signed-off-by: Mike Christie <mchristi@redhat.com>
| * Get/Set LUN's ALUA groupMike Christie2017-01-031-0/+18
| | | | | | | | | | | | | | Add support to Get/Set a Lun's current ALUA group through its alua_tg_pt_gp file. Signed-off-by: Mike Christie <mchristi@redhat.com>
| * Add basic ALUA supportMike Christie2017-01-032-0/+387
|/ | | | | | | | | | | | This patch adds support for creating ALUA groups for storage objects and setting up their state. The next patch will add support to map these groups to LUNs. This patchset does not add support for LU groups and secondary groups. Signed-off-by: Mike Christie <mchristi@redhat.com>
* Merge pull request #82 from seroyer/masterAndy Grover2016-11-091-0/+14
|\ | | | | Add IBM PowerVM vscsi fabric
| * Add IBM PowerVM vscsi fabricSteven Royer2016-11-091-0/+14
|/ | | | | | | Adds support for the IBM PowerVM virtual SCSI fabric. This uses the ibmvscsis kernel module that merged in 4.8 and later kernels. Signed-off-by: Steven Royer <seroyer@us.ibm.com>
* Merge pull request #81 from dirkmueller/masterAndy Grover2016-11-031-0/+1
|\ | | | | Depend on pyudev during runtime
| * Depend on pyudev during runtimeDirk Mueller2016-11-031-0/+1
|/ | | | | | | | | In v2.1.fb60 an unconditional dependency to pyudev was added, which needs to be specified in the egg info, otherwise pip install might fail with e.g. File "local/lib/python2.7/site-packages/rtslib/utils.py", line 30, in <module> import pyudev ImportError: No module named pyudev
* Merge pull request #79 from cvubrugier/masterAndy Grover2016-10-281-1/+2
|\ | | | | Add Gentoo to the list of distributions that ship rtslib-fb
| * Add Gentoo to the list of distributions that ship rtslib-fbChristophe Vu-Brugier2016-10-281-1/+2
|/ | | | Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
* Merge pull request #78 from cvubrugier/remove-packagingAndy Grover2016-10-2715-300/+7
|\ | | | | Remove build scripts for RPM and Debian packages
| * Remove build scripts for RPM and Debian packagesChristophe Vu-Brugier2016-10-2415-300/+7
|/ | | | | | | | | | | Remove the "example-debian" and "example-rpm" directories because our in-repo packaging is less complete than the packaging made by distributions. Finally, this patch adds a few links to RPM and Debian build scripts in our README.md. Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
* version 2.1.fb61v2.1.fb61Andy Grover2016-10-031-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Implement support for cxgbit offloadAndy Grover2016-10-032-0/+24
| | | | | | | | | Just like the 'iser' value within np/, save and restore the 'cxgbit' value. However, the property is called 'offload'. This will let us handle other offloads with the same property in the future if and when they are supported. Signed-off-by: Andy Grover <agrover@redhat.com>
* Merge pull request #77 from cvubrugier/masterAndy Grover2016-08-224-6/+6
|\ | | | | Change the URL of the GitHub repo to the open-iscsi organization
| * Change the URL of the GitHub repo to the open-iscsi organizationChristophe Vu-Brugier2016-08-224-6/+6
|/ | | | Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
* Rework convert_scsi_path_to_hctl and convert_scsi_hctl_to_pathAndy Grover2016-08-122-31/+23
| | | | | | | | | | | | | | Do not check for type=disk, this is not a requirement. Raise an RTSLibError if not found, rather than returning None. Rework PSCSIStorageObject._configure to use the new semantics, and avoid else clauses in try blocks, since they are confusing and not strictly needed. Properly qualify DeviceNotFoundError as pyudev.DeviceNotFoundError. Signed-off-by: Andy Grover <agrover@redhat.com>
* Handle if LIO components are compiled in the kernelAndy Grover2016-08-112-6/+16
| | | | | | | | | | | Attempt to do the thing that would require the module first, and if it fails then attempt to load the module and retry. This should handle all combinations of modules, compiled-in etc. and return an error if a needed component is neither compiled in or as a module. Fixes #64 Signed-off-by: Andy Grover <agrover@redhat.com>
* Merge pull request #76 from jaredeh/for_upstreamAndy Grover2016-06-222-3/+3
|\ | | | | fixes to debian package scripts
| * fixes to debian package scriptsJared Hulbert2016-06-212-3/+3
|/
* Merge pull request #75 from Gandem/masterAndy Grover2016-06-131-1/+2
|\ | | | | Changed example-debian folder for compatibility with dpkg-buildpackage
| * Changed example-debian folder for compatibility with dpkg-buildpackageNayef Ghattas2016-06-131-1/+2
|/
* Merge pull request #73 from colml/race-mountAndy Grover2016-06-031-1/+2
|\ | | | | | | | | | | | | | | | | On systems where loading the configfs module (modprobe configfs) automatically mounts /sys/kernel/config, a race condition can occur in the mount_configfs() function in utils.py. As that function is called immediately after the modprode function, the os.path.ismount check can be called before configfs is finished mounting. The mount command is then run but fails because the mount is busy as it's mounted. One possible workaround is to make a second os.path.ismount check if the mount command fails, and if it is mounted then we don't raise an exception. if process.returncode != 0 and not os.path.ismount("/sys/kernel/config"): raise RTSLibError("Cannot mount configfs")
| * Fix mount race conditioncolml2016-06-031-1/+2
|/
* convert-to-json: Fix to handle fileio and other issuesAndy Grover2016-05-121-16/+31
| | | | | | | | | | parse_fileio was a cut-n-paste from block, missing key attributes like size and buffered. Fixed. Also, bodge up better handling for single vs multiple tpgs. Clarify referring to tpgs versus the tpg tag (tpgt, an integer). Signed-off-by: Andy Grover <agrover@redhat.com>
* Initial version of convert-to-json scriptAndy Grover2016-05-101-0/+312
| | | | | | | | | This script attempts to convert from Datera 3.0's scsi_target.lio format to rtslib-fb's json format. It currently is not fully parsing the .lio file according to its grammar, it's kind of ad-hoc, shall we say, so that it hopefully works on most existing .lio files. Signed-off-by: Andy Grover <agrover@redhat.com>
* version 2.1.fb60v2.1.fb60Andy Grover2016-04-071-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Fix 'make rpm'Andy Grover2016-03-252-3/+5
| | | | | | | | Include symlinks in dist tarball fix some paths in specfile. Signed-off-by: Andy Grover <agrover@redhat.com>
* Merge pull request #71 from famz/UserBackedStorageObject-__init__-docstringAndy Grover2016-03-151-7/+4
|\ | | | | UserBackedStorageObject: Fix docstring for __init__
| * UserBackedStorageObject: Fix docstring for __init__Fam Zheng2016-03-151-7/+4
|/ | | | | | | The present parameter list is "name, config, size, wwn", update the docstring to match this. Signed-off-by: Fam Zheng <famz@redhat.com>
* Merge pull request #70 from jmagrini/originAndy Grover2016-01-191-0/+2
|\ | | | | Ensure internal buffers are flushed when saveconfig.json …
| * [rtslib-fb] Ensure internal buffers are flushed when saveconfig.json is ↵Jon Magrini2016-01-191-0/+2
|/ | | | | | | | written to disk. A power-outage, unexpected reboot, etc can lead to zero byte file after a saveconfig. Signed-off-by: Jon Magrini <jmagrini@redhat.com>
* Merge pull request #69 from mulkieran/master-pyudev-fix2Andy Grover2016-01-111-22/+21
|\ | | | | Make sure to properly avoid treating partitions the same as disk.
| * Make sure to properly avoid treating partitions the same as disk.mulhern2016-01-111-22/+21
|/ | | | | | | | | | | Return None if device path is a partition in convert_scsi_path_to_hctl. In convert_scsi_hctl_to_path ensure that device is not a partition in the most correct and efficient way. Get exactly the set of devices that are descendants of the scsi device and are block devices and have type disk. This should be a singleton, or the empty set. Signed-off-by: mulhern <amulhern@redhat.com>
* Merge pull request #68 from mulkieran/master-pyudev-fixAndy Grover2016-01-081-2/+2
|\ | | | | Use find_parent instead of parent.
| * Use find_parent instead of parent.mulhern2016-01-081-2/+2
|/ | | | | | | | | | Better, because it is sure to find the scsi parent. You never know what intermediate parent might get interposed. Better, becaus it does not rely on subsystem property (which sometimes raises an AttributeError (fixed in pyudev 0.19)). Signed-off-by: mulhern <amulhern@redhat.com>
* Update README.md againAndy Grover2015-12-181-1/+1
| | | Gaah, grammar.
* Update README.mdAndy Grover2015-12-181-1/+1
| | | We no longer use 2to3.
* Merge pull request #67 from mulkieran/master-pyudev-maybeAndy Grover2015-12-111-40/+77
|\ | | | | Make use of pyudev package as much as possible in utils module.