summaryrefslogtreecommitdiff
path: root/utils
Commit message (Collapse)AuthorAgeFilesLines
* iscsi boot: fix fw param conn print outMike Christie2009-05-011-2/+2
| | | | | iscsidm -m fw was printing out the %d for the conn params instead of the cid.
* iscsi boot: check for nic/tgt array limitsMike Christie2009-05-011-9/+17
| | | | | | If we were to find more thatn IBFT_MAX targets we would overrun the tgt or nic arrary. This just has us spit an error and return.
* iscsi boot: fix up global counter useMike Christie2009-05-011-4/+9
| | | | | | If the ibft functions are called multiple times tgt_cnt and nic_cnt will continue to increment, so they need to be cleared each time.
* iscsi boot: fix nic ip-addr checkMike Christie2009-05-011-4/+2
| | | | | | | From Hans De Goede: ip-addr will not exist when using dhcp, so raising an error when it does not exist is wrong.
* iscsiadm: fix ppc boot codeMike Christie2009-04-301-6/+4
| | | | | | | Multiple fixes to ppc boot code from Hans de Goede: - nic and dev count need to be cleared. When called multiple times from the lib, they would overrun the nic/initiator arrays. - Have fwparam_ppc not set global dev_count when calling find_file.
* iscsistart/fw fixesMike Christie2009-04-123-45/+51
| | | | | | | | | | | | | | - fix double close in fwparam ppc - fix ofdevs and devtree leaks - fix fwparam filename init - fix fwparam ibgt null free - fix iscsistart fw boot and info (sysfs init was not yet called) - fix iscsistart startup iscsid login thread may not be started when iscsistart sends login request. Patch 5b9b71007e43e0c930872b3cadd5c7434a54539d had removed the wait when ECONNREFUSED is returned, which added the regression. TODO: Should add a wait/wakeup for this instead of simple loop and sleep.
* iscsi tools: convert from strncpy to strlcpyMike Christie2009-02-072-16/+16
| | | | This has us use a safer strlcpy instead of strncpy when we can.
* iscsi tools: convert from strncat to strlcatMike Christie2009-02-075-12/+99
| | | | | We messed up strncat in so many different ways that strlat could fix. This patch converts the userspace uses of strncat to strlcat.
* PATCH: fix iBFT firmware reading with newer kernelsMike Christie2009-02-021-27/+34
| | | | | | | | | | | | | | | | Patch and mail from Hans De Goede: Hi, While testing I noticed that "iscsiadmin -m fw" does not work properly on newer (rawhide atleast) kernels, the attached patch (already applied to the Fedora devel packages) fixes this. Regards, Hans
* userspace - add new transport cxgb3iKaren Xie2008-12-051-4/+13
| | | | | | | | | added new transport cxgb3i. This patch is based on the master branch of the git tree. Signed-off-by: Karen Xie <kxie@chelsio.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
* iscsid idbm: move record strings to headerMike Christie2008-11-261-25/+23
| | | | | This just moves the idbm record field strings to a common file, so idbm and fw_entry can share them.
* fwparam: rm unused filepath argumentMike Christie2008-11-261-2/+1
| | | | fw_get_entry's filepath is always NULL, so this patch removes it.
* ibft: add support to use iscsi_ibft module and log into all portals found in ↵Mike Christie2008-11-266-32/+571
| | | | | | | | | | | | | | | | | | | | | firmware This adds the ibft sysfs module (iscsi_ibft) parsing support. It was original done by Konard, but I have ported it to use the sysfs.c helpers (add new ones and ported iscsi_sysfs.c too). This patch also modifies iscsistart and iscsiadm to print/log into all the portals found in firmware. It also changes the behavior of iscsiadm -m discovery -t fw so that we create db records for what is found. It is not fully hooked into the iface code, so it will use the different inititor name, but it will not create a iface for it (this means that if you have a record for the same portal that is bound to a iface with a iname you can run into problems).
* rm unused variable in fw_entry.cErez Zilber2008-10-221-2/+0
| | | | Signed-off-by: Erez Zilber <erezzi.list@gmail.com>
* Minor fixes in iscsi_discovery documentationErez Zilber2008-10-221-3/+3
| | | | | | | Some changes that were made in iscsi_discovery were not reflected in the docs. Signed-off-by: Erez Zilber <erezzi.list@gmail.com>
* [PATCH] Add .gitignore filesMike Christie2008-09-131-0/+1
| | | | | | | | From Erez Zilber: Some files should not be tracked by git. Signed-off-by: Erez Zilber <erezzi.list@gmail.com>
* disable iscsi_discovery qla4xxx supportMike Christie2008-04-081-1/+1
| | | | | | iscsi_discovery is not familiar with qla4xxx and cannot just set the transport name for it. This patch removes mentions of qla4xxx in the script.
* fix white spaces and blank lines removalDoron Shoham2008-04-081-4/+3
| | | | | | | | fix white spaces and blank lines removal. Signed-off-by: Doron Shoham <dorons@voltaire.com> Signed-off-by: Erez Zilber <erezz@voltaire.com>
* check if iscsid is runningDoron Shoham2008-04-081-0/+13
| | | | | | | | | check if iscsid is running. if iscsid is not running exit the script. Signed-off-by: Doron Shoham <dorons@voltaire.com> Signed-off-by: Erez Zilber <erezz@voltaire.com>
* Add additional flags to iscsi_discoveryMike Christie2008-04-081-19/+65
| | | | | | | | | | | | | | | | | From Doron: Add additional flag: -t set trasnpot (default is tcp). -f force specific transport -disable the fallback to tcp (default is fallback enabled). force the transport specified by the argument of the -t flag. -m manual startup - will set manual startup (default is automatic startup). -l login - login to the new discovered nodes (defualt is false). Signed-off-by: Doron Shoham <dorons@voltaire.com> Signed-off-by: Erez Zilber <erezz@voltaire.com> Minor teak to get it merged from Mike Christie.
* fixed printing debug informationDoron Shoham2008-04-081-1/+1
| | | | | | | | | dbg() didn't check correctly whether the dbg is true or false. Signed-off-by: Doron Shoham <dorons@voltaire.com> Signed-off-by: Erez Zilber <erezz@voltaire.com>
* convert iscsi_discovery to use iface settingsMike Christie2008-03-311-1/+1
| | | | | | | | | | | | node.transport_name was replaced with iface.transport_name because we needed to bind the interface to the driver for qla4xxx and bnx2i. This converts iscsi_discovery to use the new value. Note: there was compat support in iscsiadm for both values, but it was agreed that because of its limited use and hacks needed to support compat we would just drop it. This will affect distros that do not carry iscsi_discovery, becuase the primary discovery tool for iser was that script.
* Add fwparam bison and flex output filesMike Christie2008-02-204-19/+4461
| | | | | | It looks like a lot of users do not have flex and bison, so to avoid compilation questions and hassling user when only ppc needs them include the bison and flex output files.
* Remove confusing echo in iscsi_discoveryErez Zilber2008-01-231-1/+1
| | | | | | | | When a target is discovered and the initiator was able to connect to it, it prints "connected to 1". A user may think that the initiator is currently connected to that target (which is wrong). Signed-off-by: Erez Zilber <erezz@voltaire.com>
* Do not run discovery on portals that open-iscsi is logged-in toErez Zilber2008-01-231-0/+6
| | | | | | | | Running a discovery on a portal that open-iscsi is logged in to may result in changes to a logged-in node (like changing the node's transport type). Changing these properties shouldn't be done while logged in. Signed-off-by: Erez Zilber <erezz@voltaire.com>
* open-iscsi: fix printed mac-addressDoug Maxey2007-12-061-4/+1
| | | | | | | No need to reformat the value, use the preformatted value, not the raw one. Signed-off-by: Doug Maxey <dwm@austin.ibm.com>
* fwparam_utils fixes.Mike Christie2007-10-251-3/+15
| | | | | | | | | | | | | | From konradr@us.ibm.com: Attached is a patch that fixes a bug in search_ibft and also adds the functionality of mmaping a file with a different size (and starting location) than the assumed 524288 bytes one. I've tested it for regression on Intel NICs and IBM Blades that have iBFT implemented without any nasty surprises. I've also tested it against a sysfs entry that exports the binary blob (http://darnok.org/iscsi/iscsi_ibft_v0.2_upstream_5.patch) with good results.
* add ppc fwparam supportMike Christie2007-08-138-22/+1046
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IIs it flora or fauna? network or disk? BIOS or OFW? :) Here is another stab at providing the ppc64 equivalent of the xseries iSCSI Boot Firmware Tables functionality in open-iscsi. When booting from the firmware initiator, the parameters flow up from the running system v. from the values stored in the OS image. We have to manage the transition from kernel running from the disk obtained from a network device before the normal setup info is available. The trick is getting the pertinent data out of the "hardware", then passing this info to the tools running on the OS instance. On certain pseries boxen the system OFW has an initiator. This mini-initiator will only use a single target. It does not use the multiple initiator list like on xseries. You can only boot from a single target. You can have multiple different targets defined, but only one may be active at a time. That being said, only nics that support the load method qualify as iSCSI bootable devices on pseries. This does restrict the devices on this platform to those that support FCODE. "Features" of the implementation: - has all the information about the nic in use; address, netmask, mac addr, the initiatorname, port, etc., before _anything_ is run from the FS save the booted kernel. - Reads the /proc/device-tree for ppc related device information. - for retrieving the bootable device, uses the /chosen/bootpath property. - for display purposes, keys off the /aliases property "iscsi-disk*" to determine the bootable disks. - uses the device ordering from firmware (hence the kernel ordering) to determine the interface names at boot time. The interfaces names can and do get munged later by runtime tools, re-ordering the names.
* Fix ibft parsing on x86.Mike Christie2007-08-132-33/+32
|
* Finish hooking into toolMike Christie2007-07-253-84/+122
| | | | | | | | | | | Instead of having each parser print its output, make it common in fw_entry.c and make that use the same format and fields as the rest of the tools. Kept the ibft dump code, because it may be use for compat tools for suse. Let me know and I can help on that if you need it. With the hook in though the format for ibft is the same as normal iscsiadm node info so you can just reuse your parsing login for that.
* hook fw programs into iscsi toolsMike Christie2007-07-253-82/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch hooks ibft into iscsiadm and iscsistart. Why do this? It seems easier to be able to just run the same tool we use for normal login. For example in the installer or initramfs we can do this: // This will check for fw crap and if found // log into targets that are found // returns 0 on success and non zero if // there was no fw crap or we could not log // in or some other error. // This will _not_ store any record (text files // with data in it) in /var/lib/iscsi. // It is completely dynamic in that regard. ret = iscsiadm -m discovery -t fwboot -l (fwboot - is a new discovery type I added which is for this fw crap). // For normal iscsi install we can then do: ret = iscsiadm -m discovery -t st -p ip:port -l // This will do discovery to the portal at // ip:port, and now the code supports the -l on discovery, // so it will also log into all the targets found // automagically for the caller. // This will store records (text files with target data in it) // like usual to /var/lib/iscsi. To setup the initramfs then, we just need some variable that tells us if we are doing the fw boot or the pxe net iscsi boot. This could be done by checking iscsiadm or iscsistart like so: ret = iscsiadm -m discovery -t fwboot // no login/-l command this time if ret indicates success, then setup initramfs for dynamic fwboot else do the normal pxe static iscsi root stuff we did. In the initrams fs if using iscsistart we would just do (if this got setup for fw dynamic boot) or it would end up as And if using iscsiadm in the initramfs you can just do iscsiadm -m discovery -t fwboot -l The patch was made using Prasana and Doug's code. I have not tested it. I do not have the hardware handy (no intel card and I got stuck looking for a ppc box with it).
* Fix fwparam_ibft compilation with older gccsMike Christie2007-06-292-4/+15
| | | | | | | | | From: Olaf Kirch <olaf.kirch@oracle.com> Add a "make depend" rule to all Makefiles building user space apps. Signed-off-by: olaf.kirch@oracle.com
* from dorfman.eli@gmail.com: The attached patche removes unnecessary tty ↵mnc2007-05-311-1/+1
| | | | | | redirection. git-svn-id: svn://svn.berlios.de/open-iscsi@847 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* the fwparam_ibft program has a typo; when called with '-b' it will return ↵mnc2007-04-241-1/+1
| | | | | | 'ISCSI_MASK:24' instead of 'ISCSI_MASK=24'. Try to eval that is pretty hard. git-svn-id: svn://svn.berlios.de/open-iscsi@819 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* add some code to create default initiator namemnc2007-02-214-0/+435
| | | | git-svn-id: svn://svn.berlios.de/open-iscsi@774 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* forgot to add files from last checkinmnc2007-01-103-0/+666
| | | | git-svn-id: svn://svn.berlios.de/open-iscsi@757 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* from Or: The attached patch replaces calls that use the old db-based ↵mnc2006-09-221-29/+16
| | | | | | configuration with the file-based configuration in iscsi_discovery. git-svn-id: svn://svn.berlios.de/open-iscsi@698 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* from danb@voltaire.com: The following patch updates the iscsi_discovery ↵mnc2006-07-051-13/+27
| | | | | | script to be capable of handling multiple targets reported from a single send_targets discovery. In addition it removes (hides) some error messages that were misleading users. git-svn-id: svn://svn.berlios.de/open-iscsi@613 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* from danb@voltaire.com: add iscsi discovery scriptmnc2006-05-271-0/+123
git-svn-id: svn://svn.berlios.de/open-iscsi@582 d7303112-9cec-0310-bdd2-e83a94d6c2b6