Commit Graph

12 Commits

Author SHA1 Message Date
Jim Meyering
21ea9cb7af remove trailing white space 2008-06-17 15:55:03 +00:00
Chris Lalancette
0de4f35ebc This rather large patch rewrites the virStorageBackendISCSIFindLUNs() function
to only rely on sysfs for finding LUNs, given a session number.  Along the way,
it also fixes the bug where we wouldn't find LUNs for older kernels (with the
block:sda format), and also fixes a race condition where we could try
to find the LUN before udev has finished connecting it.

This patch fixes a few different bugs:
1) We weren't finding LUNs on pre 2.6.24 kernels
2) libvirtd sysfs scanning was racing with udev, so we didn't always see LUNs
3) We weren't showing the 0'th LUN, although that can be a valid LUN

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-06-17 12:49:37 +00:00
Chris Lalancette
94e3ba0e87 A small bugfix; we only need to call the iscsiadm sendtarget command when we are
first logging in; we don't need to do it for logout.  Move the sendtarget
command into the Login() function.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-06-17 12:47:10 +00:00
Chris Lalancette
88dd6f6cc2 Older versions of iscsiadm didn't support the "-P 0" flag to the "iscsiadm
--mode session" command.  However, just running "iscsiadm --mode session" seems
to work on all version of iscsiadm commands back to FC-6, so just use that.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-06-17 12:46:38 +00:00
Chris Lalancette
a75a612ad5 This patch changes things around so that virStorageBackendRunProgRegex() does
*not* virStorageReportError() if the fork()/exec() process it spawned returned a
!= 0 exit code.  Rather, it returns the exitcode in this case, and it is up to
the higher level to determine whether this is a fatal error or not.  The use
case for this change is in the iSCSI stuff; older versions of iscsiadm tools
would return a failure when getting the session number, despite the command
succeeding.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-06-17 12:45:24 +00:00
Daniel P. Berrange
d789ef5a88 Switch over remaining driver code to use memory alloc apis 2008-06-06 11:09:57 +00:00
Richard W.M. Jones
1d8d4f86b6 Standardize use of header files, making internal.h primary.
* qemud/internal.h, qemud/qemud.h: Rename this file so it
	doesn't conflict with src/internal.h.
	* HACKING: Document how header files should be used.
	* qemud/Makefile.am: Add src/ directory to includes.
	* qemud/event.c, qemud/mdns.c, qemud/qemud.c, qemud/remote.c,
	qemud/remote_protocol.c, qemud/remote_protocol.h,
	qemud/remote_protocol.x, src/buf.c, src/libvirt.c,
	src/nodeinfo.c, src/qemu_conf.c, src/qemu_driver.c,
	src/stats_linux.c, src/storage_backend.c, src/storage_backend_fs.c,
	src/storage_backend_iscsi.c, src/storage_backend_logical.c,
	src/storage_conf.c, src/storage_driver.c, src/util.c,
	src/util.h, src/virsh.c, src/virterror.c, src/xend_internal.c,
	src/xml.c, tests/reconnect.c, tests/xmlrpctest.c,
	tests/qparamtest.c: Standardize	use of header files.
	* docs/*, po/*: Rebuild docs.
2008-05-23 08:24:41 +00:00
Jim Meyering
dc42a9d2de remove Vim and Emacs variable settings from C source files
Done with these commands:
git grep -l Local.variab|xargs \
  perl -0x3b -pi -e 's,\n+/\*\n \* vim:(.|\n)*,\n,'

git grep -l Local.variab|xargs \
  perl -0x3b -pi -e 's,\n+/\*\n \* Local variables:\n(.|\n)*,\n,'
2008-04-10 16:53:29 +00:00
Daniel Veillard
ae15bc7245 support of older versions of iscsiadm.
* src/storage_backend_iscsi.c: patch from Chris Lalancette to improve
  support with older versions of iscsiadm.
Daniel
2008-03-27 08:11:27 +00:00
Richard W.M. Jones
2a4c20437d Make iSCSI login actually work
* src/storage_backend_iscsi.c: Make iSCSI login actually work
	  (Chris Lalancette).
2008-03-04 20:02:34 +00:00
Jim Meyering
b1b23f76be avoid format string warnings
Avoid warnings like this:
file:nnn:format not a string literal and no format arguments

* qemud/qemud.c: Insert a "%s" format argument.
* qemud/remote.c: Likewise.
* src/iptables.c: Likewise.
* src/qemu_driver.c: Likewise.
* src/storage_backend.c: Likewise.
* src/storage_backend_fs.c: Likewise.
* src/storage_backend_iscsi.c Likewise.
* src/storage_backend_logical.c: Likewise.
* src/storage_conf.c: Likewise.
* src/storage_driver.c: Likewise.
2008-02-22 16:26:13 +00:00
Daniel P. Berrange
8ec1fcd925 Added iSCSI storage pool backend 2008-02-20 15:49:25 +00:00