summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge pull request #143 from gonzoleeman/use-sd_notify-for-systemdLee Duncan2018-10-168-20/+140
|\ \ | | | | | | Use sd notify for systemd
| * | Update systemd unit files for iscsidLee Duncan2018-10-162-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Updates: * support iscsiuio * support iscsid/systemd notifcation * change kill mode for iscsi * make iscsid run in the foreground * tell iscsid.service about iscsid.socket
| * | Use sd_notify() to tell systemd when iscsid is ready.Lee Duncan2018-10-165-14/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition, to be able to tells systemd when we are reloading sessions, the code around forking a copy and restoring sessions gets its PID saved so that we know when it is done and can update systemd status. Note that this requires systemd unit file iscsid.service to use Type=notify and NotifyAccess=main.
| * | Added service file for iscsi loginsLee Duncan2018-10-161-0/+17
| | | | | | | | | | | | | | | This service file layers on top of iscsid.serivce to manage logging into and out of known targets.
| * | Merge pull request #4 from open-iscsi/masterLee Duncan2018-10-161-1/+1
| |\ \ | |/ / |/| | Merge latest from upstream
* | | Merge pull request #142 from gonzoleeman/fix-mode-node-level-0-printLee Duncan2018-10-121-1/+1
|\ \ \ | | | | | | | | Restore space in node-mode level 0 output
| * | | Restore space in node-mode level 0 outputLee Duncan2018-10-121-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | As part of the libopeniscsiusr update, the output of "iscsiadm -m node" dropped a space that needs to be between the portal and the target, for proper parsing. Fixes: 87ea50a1c3a97
* | | Merge pull request #141 from gonzoleeman/masterLee Duncan2018-10-113-8/+12
|\ \ \ | |/ / | | | Make reconnect to session on startup forever default.
| * | Make reconnect to session on startup forever default.Lee Duncan2018-10-113-8/+12
|/ / | | | | | | | | | | | | | | | | | | | | | | The daemon has traditionally tried to recover stale sessions, at startup, in serial and in a forked process. A recent commit, b9afe4709900, added the ability to limit these retries, and it made the default 32. Commit 467946a945cc added back in the ability to retry forever, if the retry count was set to 0, but left the default at 32. This commit changes the default to 0, so as not to disrupt the expected reconnection behavior by default.
* | Merge pull request #139 from gonzoleeman/fix-fsf-addressLee Duncan2018-10-092-31/+30
|\ \ | | | | | | Update GPLv2 License information.
| * | Update GPLv2 License information.Lee Duncan2018-10-092-31/+30
|/ / | | | | | | | | | | Update the COPYING file, with the whole GPLv2.0 license, and a script that seems to have a notice, as well. Both were outdated and had incorrect FSF addresses.
* | Merge pull request #138 from gonzoleeman/remove-fork-exec-for-modprobeLee Duncan2018-10-092-90/+0
|\ \ | | | | | | Use libkmod instead of fork/exec of modprobe.
| * | Use libkmod instead of fork/exec of modprobe.Lee Duncan2018-10-092-90/+0
|/ / | | | | | | | | There is no reason to continue to use fork/exec to probe for modules, so remove the code that supported this.
* | Merge pull request #137 from gonzoleeman/add-no-timeout-relogin-optionLee Duncan2018-10-092-4/+6
|\ \ | | | | | | When reopen_max=0 retry reopening forever.
| * | When reopen_max=0 retry reopening forever.Lee Duncan2018-10-092-4/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | Commit b9afe4709900 added a configuration variable for session reconnect called reopen_max that defaults to 32. This changes the behavior of iscsid on startup if it finds any session information left over from previous invocations. Adding the option of setting the retry count to zero to imply previous behavior allows those that are counting on this behavior to continue. But, make no mistake, it is recommended not to retry forever, as it leaves iscsid stuck in "iscsi_sysfs_for_each_session()" in iscsid.c:main(), so iscsid never fully gets up and running.
* | Merge pull request #136 from gonzoleeman/no-parallel-sessionsLee Duncan2018-10-051-2/+4
|\ \ | | | | | | Do not allow multiple sessions when nr_sessions=1
| * | Do not allow multiple sessions when nr_sessions=1Lee Duncan2018-10-041-2/+4
|/ / | | | | | | | | | | | | | | | | | | If a request is made to login to a target, creating a session, then another request is submitted so quickly that the first one has not completed, both requests can succeed, despite having nr_sessions=1 configured. Only allow multiple login requests if nr_sessions is greater than 1.
* | Merge pull request #132 from gonzoleeman/small-cleanupsLee Duncan2018-09-273-3/+4
|\ \ | | | | | | Small cleanups x 3
| * | Fix qsort() comparator function call.Lee Duncan2018-09-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The compare function is supposed to match the prototype: int (*compar)(const void *, const void *) so the function nic_cmp() was declared incorrectly, which makes gcc much happier.
| * | Include stdio.h for use of snprintf().Lee Duncan2018-09-271-0/+1
| | |
| * | Removed unused value 'one'.Lee Duncan2018-09-271-1/+1
|/ /
* | Merge pull request #131 from gonzoleeman/fix-reconnect-foreverLee Duncan2018-09-2714-23/+123
|\ \ | | | | | | Limit iscsid infinite session reconnect attempts at startup using a new config value
| * | Limit session relogin attempts using config value.Lee Duncan2018-09-2610-4/+36
| | | | | | | | | | | | | | | | | | | | | Add new configuration value session.relogin_max, which will default to 32. The limits the session-recovery relogin attempts to about 64 seconds (2 seconds between attempts) instead of an infinite number of retries.
| * | Handle ENOTCONN error separately when reading sysfs values.Lee Duncan2018-09-261-0/+31
| | | | | | | | | | | | | | | | | | This error happens when the daemon is attempting to reconnect a session when starting up, so should not be considered an internal error.
| * | Fix bug in error message when reading sysfs numbers.Lee Duncan2018-09-261-1/+1
| | | | | | | | | | | | | | | | | | The message printed when ENOENT was returned for a number-type sysfs value was missing the attribute name parameter.
| * | Create a new error for "target not connected".Lee Duncan2018-09-263-1/+18
| | | | | | | | | | | | | | | | | | | | | The session_logout_qtask() function now recognizes a new state of "target likely not connected" if syncing up, in connection wait state, and re-opening the connection.
| * | Fix reading of sysfs signed integers when negative.Lee Duncan2018-09-261-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | The code for reading all sysfs integer types (of all sizes) did not work when reading signed integers and the return value was negative. So when the default was -1 and the value was not present, the code tried to return -1. But the logic for checking against "max value" was incorrect, causing INT_MAX to be returned instead of -1.
| * | Fix incorrect sysfs logic for port and ip address.Lee Duncan2018-09-261-10/+8
| | | | | | | | | | | | | | | | | | If "port" is available and "persistent_port" is not, then correctly use the one that is present for both values. Likewise for "address" and "persistent_address".
| * | Allow reading sysfs "port" to fail gracefully.Lee Duncan2018-09-261-2/+2
| | | | | | | | | | | | | | | Do not consider it a fatal error if reading sysfs value for "port" fails, since we allow failure for "address".
* | | Merge pull request #129 from cpaelzer/cleanup-nic_nl_open-usageLee Duncan2018-09-262-3/+4
|\ \ \ | | | | | | | | Cleanup nic nl open usage
| * | | iscsiuio: fail on nic_nl_open failingChristian Ehrhardt2018-09-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The return value of nic_nl_open was ignored and while working by chance being the latest call before the error label any later insertion of code after this might break it. Avoid that by checking for the retval and explicitly jumping to the error label in case it is non zero. Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
| * | | iscsiuio: avoid loosing bad rc in nic_nl_openChristian Ehrhardt2018-09-201-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nic_nl_open might have collected a non-zero rc and jumped to the error label but still returned zero which would indicate success. The function should return whatever it has collected in rc and while working without, also explicitly initialize it to zero. Fixes #125 Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
* | | Merge pull request #127 from smoser/fix/iscsid-pidfile-writeLee Duncan2018-09-263-8/+12
|\ \ \ | |/ / |/| | Fix/iscsid pidfile write and exit on failure to create socket.
| * | Better error message and failure if netlink socket fails.Scott Moser2018-09-192-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | This does 2 things: a.) shows strerror when the socket creation of NETLINK_ISCSI fails. b.) moves the attempt to create the socket to after pid file writing. The reason for 'b' is that if failure happens in 'a', then no pid file is written. Systemd's tracking would then not notice the failure.
| * | Close file handles when writing pid files.Scott Moser2018-09-192-1/+3
|/ / | | | | | | | | | | | | The file descriptors used for writing to the pid file were not being closed. Just be more clean and close them. Also fix a debug message that said 'lock file' rather than 'pid file'.
* | Merge pull request #123 from gonzoleeman/fix-discovery-leakLee Duncan2018-09-121-0/+5
|\ \ | | | | | | Plugging a memory leak from discovery.
| * | Plugging a memory leak from discovery.Lee Duncan2018-08-301-0/+5
|/ / | | | | | | | | | | | | During discovery the function get_op_params_text_keys() can allocate a target_alias, but this is never freed. Discovered-by: zhangzujian.7@gmail.com
* | Merge pull request #122 from njavali/iscsiuio-bug-fixesChris Leech2018-08-272-3/+9
|\ \ | |/ | | iscsiuio: Release xmit_mutex in error code path.
| * iscsiuio: limit retries of performing dhcpv6 before declaring dhcp failureNilesh Javali2018-08-241-3/+8
| | | | | | | | | | | | | | | | After successful stateless router adv., the restart of handle_ndp thread infinitely checks dhcpv6 causing IPv6 DHCP sequence failure. Limit the retries of dhcpv6 validation. Signed-off-by: Nilesh Javali <nilesh.javali@cavium.com>
| * iscsiuio: Release xmit_mutex in error code path.Manish Rangankar2018-08-141-0/+1
| | | | | | | | | | | | | | This prevents iscsiuio seg fault in case get_tx_pkt fails while sending ARP. Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
* | Merge pull request #120 from maxnet/vaChris Leech2018-08-271-0/+1
|\ \ | | | | | | context.h: add missing stdarg.h include
| * | context.h: add missing stdarg.h includeFloris Bos2018-07-291-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix compilation error on uclibc based systems: == In file included from idbm.c:59:0: context.h:27:25: error: unknown type name ‘va_list’ const char *format, va_list args); ^ <builtin>: recipe for target 'idbm.o' failed make[1]: *** [idbm.o] Error 1 == Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
* | Merge pull request #115 from cleech/for_upstreamChris Leech2018-07-093-10/+8
|\ \ | | | | | | enable MaxOutstandingR2T negotiation
| * | enable MaxOutstandingR2T negotiationChris Leech2018-06-223-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The iscsi_tcp kernel side R2T handling is in libiscsi_tcp and is shared with at least cxgbi3, and the drivers claim CAP_MULTI_R2T. But the iscsid login parameter negotiation code never enabled MaxOutstandingR2T. I've tested this against an LIO target, negotiating to 2 and 4 R2Ts. The network traces looked good, with the initiator keeping track of multiple outstanding R2Ts and using the correct next identifier. Throughput of bulk write data was improved, even over low latency virtio links. Signed-off-by: Chris Leech <cleech@redhat.com>
* | | Merge pull request #114 from njavali/iscsiuio-bug-fixesChris Leech2018-07-095-8/+56
|\ \ \ | |/ / |/| / | |/ iscsiuio: Add inter-host mutex while doing xmit
| * iscsid: Update boot gateway information during sync_session.Manish Rangankar2018-06-291-0/+5
| | | | | | | | | | | | | | During boot for SAN scenario after switch root iscsid not passing gateway information to iscsiuio. Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
| * iscsiuio: Add inter-host mutex while doing xmitManish Rangankar2018-06-294-8/+51
|/ | | | | | | This avoids the netlink buffer corruption when more than one host try to xmit packet at the same time. Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
* Merge pull request #106 from phmccarty/lib-symlinksChris Leech2018-06-181-2/+2
|\ | | | | Fix installation of libopeniscsiusr symlinks
| * Fix installation of libopeniscsiusr symlinksPatrick McCarty2018-05-291-2/+2
| | | | | | | | | | | | | | The install(1) command dereferences symlinks when copying to the target location, so use an alternate approach to create symlinks from scratch instead. Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
* | Merge pull request #111 from cleech/for_upstreamChris Leech2018-06-188-30/+134
|\ \ | | | | | | various fixes