| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|\
| |
| | |
Add ability to invalidate caches
|
| |\
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\ \
| |/
|/| |
Fix crash during restore due to ALUA exception
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| | |
Do not set alua_tg_pt_gp if not supported
|
|/
|
|
|
|
|
| |
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.
|
|
|
|
| |
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|\
| |
| | |
ALUA support for rtslib-fb
|
| |
| |
| |
| |
| |
| |
| | |
We must delete the ALUA groups under the storage object
when deleting the storage object.
Signed-off-by: Mike Christie <mchristi@redhat.com>
|
| |
| |
| |
| |
| |
| | |
Add support to save ALUA info and restore it.
Signed-off-by: Mike Christie <mchristi@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| | |
Add IBM PowerVM vscsi fabric
|
|/
|
|
|
|
|
| |
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>
|
|\
| |
| | |
Depend on pyudev during runtime
|
|/
|
|
|
|
|
|
|
| |
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
|
|\
| |
| | |
Add Gentoo to the list of distributions that ship rtslib-fb
|
|/
|
|
| |
Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
|
|\
| |
| | |
Remove build scripts for RPM and Debian packages
|
|/
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| | |
Change the URL of the GitHub repo to the open-iscsi organization
|
|/
|
|
| |
Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| | |
fixes to debian package scripts
|
|/ |
|
|\
| |
| | |
Changed example-debian folder for compatibility with dpkg-buildpackage
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
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")
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
|
|
|
|
| |
Include symlinks in dist tarball
fix some paths in specfile.
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|\
| |
| | |
UserBackedStorageObject: Fix docstring for __init__
|
|/
|
|
|
|
|
| |
The present parameter list is "name, config, size, wwn", update the
docstring to match this.
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|\
| |
| | |
Ensure internal buffers are flushed when saveconfig.json …
|
|/
|
|
|
|
|
|
| |
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>
|
|\
| |
| | |
Make sure to properly avoid treating partitions the same as disk.
|
|/
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| | |
Use find_parent instead of parent.
|
|/
|
|
|
|
|
|
|
|
| |
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>
|
|
|
| |
Gaah, grammar.
|
|
|
| |
We no longer use 2to3.
|
|\
| |
| | |
Make use of pyudev package as much as possible in utils module.
|