summaryrefslogtreecommitdiffstats
path: root/iscsi.py
Commit message (Collapse)AuthorAgeFilesLines
* Replace old storage modules.David Lehman2009-02-231-332/+0
|
* Change default iscsi initiator nameHans de Goede2009-02-231-1/+1
| | | | | | max was the name of mchristie's computer when iscsi-iname.c was written. And when anaconda iscsi install was done I think Jeremy had copied that. Then we fixed the naming in iscsi-iname, but anaconda never got fixed.
* getPartitionByPath expects the device to start with /dev/.Chris Lumens2009-02-121-1/+1
|
* Use parted.Disk.getPartitionByPath()David Cantrell2009-02-121-3/+4
| | | | | | Removed the parted.getPartitionByName() function. There is now a method on parted.Disk called getPartitionByPath() which provides the same functionality, but only works on a single Disk.
* Removed partedUtils.get_partition_by_name()David Cantrell2009-02-121-2/+1
| | | | Now provided by pyparted as parted.getPartitionByName()
* Rewrite iscsi code using libiscsiHans de Goede2009-02-111-400/+122
| | | | | | | | | | | | | | | | | | | This patch replaces the iscsi.py code with new code using libiscsi, getting rid of the awefull configfile mangling to set auth info hack, and in general making it much cleaner. Fixes: -Report error when we cannot add a disk instead of silently failing (461830) -Report error when trying to use iscsi from kickstart without having an iscsiname directive first (463156) -Better feedback while scanning iscsi disks -Make ibft work with chap and 2-way chap -Make ibft configured disks available for upgrades and in rescue mode -Make ibft boot work even when iscsi-initiator-utils is installed after the kernel in the transaction Note: libiscsi is available in Fedora now
* Redirect iscsiadm's stderr away from the console.Chris Lumens2009-02-021-6/+6
|
* Call '/sbin/udevadm settle' instead of /sbin/udevsettleDavid Cantrell2008-12-231-1/+1
|
* iscsi do missing value check only onceHans de Goede2008-11-111-4/+4
| | | | | | | Currently the iscsi code checks for giving a password but not a username or vica versa in both the interface and the iscsi code, this patch removes the unneeded check from the interface code, this is a preparation patch for fixing #463156, #461830
* Sleep a bit before calling udevsettle in iscsiTarget.login (#470073, #466661)Hans de Goede2008-11-081-0/+3
| | | | | | | | Further testing has revealed that it is possible that the hotplug events for an added iscsi disk have not fired yet when iscsiadm ... --login has completed In this case calling udevsettle does not help, so sleep a little before calling udevsettle to give the kernel time to fire of those events.
* iscsi.startup should not login to targets as we are already logged in (#470230)Hans de Goede2008-11-081-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | iscsi.startup contains: for t in self.targets: if not t.discover(): continue t.login() However all targets in the self.targets list are added through iscsi.addTarget(), which does: t = iscsiTarget(ipaddr, port, user, pw, user_in, pw_in) if not t.discover(): return if not t.login(): return self.targets.append(t) So we are already logged in to all the targets in self.targets, this relogin attempts are harmless (other then making adding iscsi targets slower then necessary), but do result in these messages on tty5: iscsiadm: could not login to [.......]: iscsiadm: initiator reported error (15 - already exists)
* Remove obsolete normally never reached code from _stopIscsiDaemon (#470229)Hans de Goede2008-11-081-14/+0
| | | | | | | | | | | Januari 2008 _stopIscsiDaemon moved to using "iscsiadm -k 0" instead of using "killall iscsid", but the old code (which also logs out of all targets which the new code does not do) was kept as fallback, since "iscsiadm -k 0" practically always works, and since the old fallback code behaves differently (also logs out of all targets), remove the old code. This patch also fixes the new code not setting iscsidStarted to False when iscsid was successfully stopped.
* make iscsi login code wait for udev to create the devices (#466661, #470073)Hans de Goede2008-11-061-0/+5
| | | | | | | | iscsiadm .... --login will wait for the kernel to finish scanning the new scsi "adapter", but after that udev still needs to create the devices under /dev, sometimes anaconda is quicker in rescanning /dev for new disks then udev, causing us to miss the newly added disk, this patch fixes this by calling udevsettle after iscsiadm .... --login
* Fix various syntax errors caught by PyCheckerHans de Goede2008-10-291-1/+1
| | | | Fix various syntax errors caught by PyChecker
* Mark iscsi disks not used for / as autostart (rh461840)Hans de Goede2008-10-081-1/+46
| | | | | | | | | | | | | What is happening here is that with / on iscsi we do not want to try and start the node(s) corresponding to the raid / logvol / partition used to autostart because they are already started and the node database may even contain wrong info causing problems as described in bug 437891. However for /somedir on iscsi we do want to set the node to autostart, as there the node will not have been started from the initrd, so without starting it we won't have a connection to the disk for /somedir. Thus this commit sets node.startup to automatic for non / containing iscsi nodes only.
* Fix typo.Hans de Goede2008-09-151-1/+1
| | | | | Forward port from rhel-5 patch by pjones, commit id: 84c6d1f92ab2508158104b1c97f17b673b717bea
* Make iBFT reading explicit from a higher levelHans de Goede2008-09-151-8/+9
| | | | | | | | Make iBFT reading explicit from a higher level, so the target list doesn't get obliterated in the anaconda.id.reset() path. Forward port from rhel-5 patch by pjones, commit id: 0c566de27f4beb311baef2c49761924ced188da2
* Add ibft flag to ease in testing.Hans de Goede2008-09-151-1/+2
| | | | | Forward port of rhel-5 patch from pjones, commit-id: 5a44a5a6bc90fdf056db1e9e2d4191703387c15f
* Support iSCSI CHAP and Reverse CHAP authentication (rhbz#402431, rhbz#432819)Hans de Goede2008-09-151-31/+92
| | | | | | | | Support iSCSI CHAP and Reverse CHAP authentication (rhbz#402431, rhbz#432819) Don't set node.startup to automatic (rhbz#437891) Forward port of rhel-5 patch from pjones, commit-id: 4960fffcddce97ffdd6d80f9b18f757c25d37ff5
* Don't set iscsi devices to autostart (rhbz#437891)Hans de Goede2008-09-151-17/+1
| | | | | Forward port of rhel-5 patch from pjones, commit-id: 2979c1195d9031b16d61ff14e3a6b0dcb3ee548f
* Add full CHAP support to iSCSI. (rhbz#432819)Hans de Goede2008-09-151-6/+107
| | | | | Forwart port of rhel-5 patch by pjones, commit-id: e9556f9e39629534b4b44ba64c7fef6b981b4f0e
* Do not try to initialize iSCSI, when no portal (#435173)Hans de Goede2008-09-151-0/+8
| | | | | | Do not try to initialize iSCSI drive, when the portal cannot be detected (#435173). Forward port of rhel-5 patch from msivak, commit-id: c0beca8cfd3af9a38dee89fc2ffb83bb5b2b6e55
* Fix wrong function names for iscsi login/start (rhbz#295154)Hans de Goede2008-09-151-2/+2
| | | | | This is a forward port of a rhel-5 patch by pjones, commit-id: 6b4b816bb9305d740db2e5c499a73968e564a9b7
* Set an attribute when iscsid is started (#431904).Hans de Goede2008-09-151-1/+5
| | | | | This is a forward port of a rhel-5 patch by clumens, commit id: 059c0ca2c34c123173041751b5c7337b0215242a
* Better fixes for iscsi probing (patch from jlaska)Hans de Goede2008-09-151-2/+8
| | | | | This is a forward port of rhel-5 patch: 0d7795b5d06b5449f0b2c0c6c5028ea99104d9ca
* Make sure ISCSIADM and such are defined (rhbz#431924)Hans de Goede2008-09-151-0/+2
| | | | | This is a forward port of a rhel-5 patch by pjones, commit id: a4a4a5ecf8dca9fa121f5ad06dd7b949fc02b37b
* Fix iscsi so that mkinitrd can actually talk to the running daemonHans de Goede2008-09-151-37/+62
| | | | | This is a forwardport from a rhel-5 patch from pjones, commit id: ad6c2adda67b1f1d77ad0d1db9a5c75e7e20cb3f
* Make iscsi/ibft workHans de Goede2008-09-151-85/+108
| | | | | | Make iscsi/ibft work; with this it at least detects the iBFT and finds the disks. This is a forward port of a rhel-5 patch by pjones. commit id: d410362972805fa50444f9bd4bbfd4c985ae0313
* Add support for iSCSI iBFT table (#307761)Hans de Goede2008-09-151-30/+111
| | | | | | Add support for iSCSI iBFT table to anaconda and use the configured targets in it (#307761), forward port of rhel-5 patch from Martin Sivak, commit id: 96255750791e859dd06004fe1fbcc101a26e9e47
* 2008-06-04 Ján ONDREJ <ondrejj@salstar.sk> (via ondrejj@fedoraproject.org)Ján ONDREJ2008-06-041-1/+4
| | | | * po/sk.po: Typo fix.
* Common GPLv2+ boilerplate on toplevel python source files.David Cantrell2007-12-171-6/+12
| | | | | | Updated all *.py files to have a uniform GPL boilerplate. Expanded copyright year ranges and listed authors (if they were in the comment section) under the Red Hat Author(s) section.
* 2007-09-11 Jeremy Katz <katzj@redhat.com>Jeremy Katz2007-09-111-1/+1
| | | | | | * iscsi.py (iscsiTarget._getPortal): Fix args passed to iscsiadm (Kostas Georgiou <k.georgiou AT imperial DOT ac DOT uk>, #283791)
* Fix rerror reporting in iscsi connection code.Peter Jones2007-06-271-2/+5
|
* portal -> self.portal (#242379).Chris Lumens2007-06-041-2/+2
|
* Be smarter about getting the PID of iscsiadm to avoid a traceback (#223257).Chris Lumens2007-05-011-7/+6
|
* 2006-12-11 Jeremy Katz <katzj@redhat.com>Jeremy Katz2006-12-111-1/+1
| | | | * iscsi.py (has_iscsi): Fix typo (#218513)
* fix thinkoPaul Nasrat2006-11-201-1/+1
|
* 2006-11-17 Jeremy Katz <katzj@redhat.com>Jeremy Katz2006-11-171-1/+13
| | | | | | | | * iscsi.py (has_iscsi): Add a method so that we can find out if iscsi is really available (#216128) * iw/autopart_type.py (PartitionTypeWindow.addDrive): And don't allow trying to add iscsi drives if we don't have iscsi stuff. * textw/partition_text.py: Likewise.
* Treat the results of "iscsiadm -m node -p $portal" as a hash rather than aPeter Jones2006-11-161-31/+40
| | | | | list, and activate/login/logout of the entire list, not just the first one we find.
* 2006-10-16 Jeremy Katz <katzj@redhat.com>Jeremy Katz2006-10-161-5/+13
| | | | | | | | | | | * zfcp.py (ZFCPDevice.offlineDevice): Fix a few stupid bugs (ZFCP.startup): Move config reading to here so that we don't have problems with bringing up devs more than once (#210094) (ZFCP.write): Better way of writing out zfcp.conf (ZFCP.writeKS): Write out in anaconda-ks.cfg * iscsi.py (writeKS): Support writing out iscsi bits to anaconda-ks.cfg
* 2006-10-06 Jeremy Katz <katzj@redhat.com>Jeremy Katz2006-10-061-1/+3
| | | | | | * iscsi.py (iscsiTarget._getPortal): If the portal doesn't match the ipaddr we discovered against, it's probably not what we wanted (iscsi.write): Files moved.
* 2006-10-06 Jeremy Katz <katzj@redhat.com>Jeremy Katz2006-10-061-0/+3
| | | | | * iscsi.py (iscsiTarget._getPortal): If the portal doesn't match the ipaddr we discovered against, it's probably not what we wanted
* 2006-10-02 Jeremy Katz <katzj@redhat.com>Jeremy Katz2006-10-021-0/+3
| | | | | | | * iscsi.py (iscsiTarget._getPortal): Handle another error case (#208671) 2
* 2006-09-20 Jeremy Katz <katzj@redhat.com>Jeremy Katz2006-09-201-73/+126
| | | | | | | | | | | | | * textw/partition_text.py: Text mode support for iscsi and zfcp devices * iw/autopart_type.py (PartitionTypeWindow.addIscsiDrive): Adjust for new iscsi backend code. * kickstart.py (AnacondaKSHandlers.doIscsi): Better iscsi syntax. * iscsi.py: Improve support a bit so that we give a default initiator name, have the framework for handling usernames/passwords, and have cleaner code.
* more iscsi fixageJeremy Katz2006-09-051-1/+1
|
* 2006-09-05 Jeremy Katz <katzj@redhat.com>Jeremy Katz2006-09-051-11/+13
| | | | * iscsi.py: Update for new iscsi code
* 2006-07-21 Jeremy Katz <katzj@redhat.com>Jeremy Katz2006-07-211-7/+8
| | | | | | | | | | | | | | | * iw/autopart_type.py (PartitionTypeWindow.addIscsiDrive): Show dialog while iscsid is starting * yuminstall.py (YumBackend.selectFSPackages): Ensure that iscsi-initiator-utils gets installed if installing on iscsi * kickstart.py (AnacondaKSHandlers.doIscsi): Fixes for new iscsi setup, startup iscsi targets at iscsi config * iscsi.py: Sleep after starting iscsid, ensure we get the port correct, redirect output from iscsid to avoid spinning, fix writing out iscsi config
* * iscsi.py: Rework a bit to handle multiple targets.Jeremy Katz2006-07-131-26/+56
|
* Use subprocess instead of our own code. Fix all calls to execWith* soChris Lumens2006-07-121-12/+11
| | | | | the command is no longer the first argument, since subprocess doesn't work that way. Remove unneeded /proc/e820info cruft. Remove iutil.rmrf.
* Fix traceback when writing iscsi info.Chris Lumens2006-06-211-0/+3
|