Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 283261 Details for
Bug 418781
The --target option for iSCSI targets does not work for kickstart installs
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to use the --target option for a iscsi target import
anaconda-iscsi-update.patch (text/plain), 3.54 KB, created by
Tim Verhoeven
on 2007-12-10 20:37:30 UTC
(
hide
)
Description:
Patch to use the --target option for a iscsi target import
Filename:
MIME Type:
Creator:
Tim Verhoeven
Created:
2007-12-10 20:37:30 UTC
Size:
3.54 KB
patch
obsolete
>diff -urN orig/iscsi.py new/iscsi.py >--- orig/iscsi.py 2007-12-10 16:47:47.000000000 +0100 >+++ new/iscsi.py 2007-12-10 20:44:30.000000000 +0100 >@@ -40,7 +40,7 @@ > return True > > class iscsiTarget: >- def __init__(self, ipaddr, port = None, user = None, pw = None): >+ def __init__(self, ipaddr, target = None, port = None, user = None, pw = None): > # FIXME: validate ipaddr > self.ipaddr = ipaddr > if not port: # FIXME: hack hack hack >@@ -48,6 +48,7 @@ > self.port = str(port) > self.user = user > self.password = pw >+ self.target = target > self._portal = None > self._nodes = [] > >@@ -115,11 +116,28 @@ > iutil.execWithRedirect(ISCSIADM, argv, > stdout = "/dev/tty5", stderr="/dev/tty5") > >+ def _setauth(node, portal, user, password): >+ if user is not None and password is not None: >+ argv = [ "-m", "node", "-T", node, "-p", portal, >+ "-o", "update", "-n", "node.session.auth.username", >+ "-v", user ] >+ log.debug("iscsiadm %s" %(string.join(argv),)) >+ iutil.execWithRedirect(ISCSIADM, argv, >+ stdout = "/dev/tty5", stderr="/dev/tty5") >+ argv = [ "-m", "node", "-T", node, "-p", portal, >+ "-o", "update", "-n", "node.session.auth.password", >+ "-v", password ] >+ log.debug("iscsiadm %s" %(string.join(argv),)) >+ iutil.execWithRedirect(ISCSIADM, argv, >+ stdout = "/dev/tty5", stderr="/dev/tty5") >+ > ret = False > for node in self.nodes: >- if _login(node, self.portal): >- ret = True >- _autostart(node, self.portal) >+ if (self.target is None) or ( self.target is not None and (self.target == node)): >+ _setauth(node, self.portal, self.user, self.password) >+ if _login(node, self.portal): >+ ret = True >+ _autostart(node, self.portal) > > # we return True if there were any successful logins for our portal. > return ret >@@ -222,7 +240,7 @@ > if intf: > w.pop() > >- def addTarget(self, ipaddr, port = "3260", user = None, pw = None, >+ def addTarget(self, ipaddr, target = None, port = "3260", user = None, pw = None, > intf = None): > if not self.iscsidStarted: > self.startup(intf) >@@ -230,7 +248,7 @@ > # can't start for some reason.... just fallback I guess > return > >- t = iscsiTarget(ipaddr, port, user, pw) >+ t = iscsiTarget(ipaddr, target, port, user, pw) > if not t.discover(): > return > if not t.login(): >diff -urN orig/kickstart.py new/kickstart.py >--- orig/kickstart.py 2007-12-10 16:47:47.000000000 +0100 >+++ new/kickstart.py 2007-12-10 20:45:40.000000000 +0100 >@@ -180,8 +180,8 @@ > KickstartHandlers.doIscsi(self, args) > > for target in self.ksdata.iscsi: >- if self.id.iscsi.addTarget(target.ipaddr, target.port, target.user, target.password): >- log.info("added iscsi target: %s" %(target.ipaddr,)) >+ if self.id.iscsi.addTarget(target.ipaddr, target.target, target.port, target.user, target.password): >+ log.info("added iscsi target: %s on IP: %s" %(target.target, target.ipaddr,)) > > # FIXME: flush the drive dict so we figure drives out again > isys.flushDriveDict()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 418781
: 283261 |
283271
|
285331