[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: [libvirt] Re: [Patch v0.4] iSCSI Multi-IQN (Libvirt Support)



> -----Original Message-----
> From: libvir-list-bounces redhat com [mailto:libvir-list-
> bounces redhat com] On Behalf Of Daniel P. Berrange
> Sent: Wednesday, November 18, 2009 4:47 PM
> To: Iyer, Shyam
> Cc: libvir-list redhat com; Bellad, Sudhir; Domsch, Matt; KM, Paniraja
> Subject: Re: [libvirt] Re: [Patch v0.4] iSCSI Multi-IQN (Libvirt
> Support)
> 
> On Wed, Nov 18, 2009 at 04:37:02PM +0530, Shyam_Iyer Dell com wrote:
> >
> >
> > >
> > > > 2) By using iscsiadm commands like the following
> > > > # iscsiadm -m iface -I <iface_name> -o new
> > > > # iscsiadm -m iface -I iface1 --op=update -n iface.initiatorname
> -v
> > > > <iqnname>
> > >
> > > In that case, why don't we make libvirt automatically set things
up
> > > this
> > > way whenever it sees the IQN in the XML file.
> > >
> > > > We don't change the default initiatorname with libvirt/virt
> manager
> > > > today right ? So, we haven't added any apis to manage the iface
> file
> > > > name using libvirt as such.
> > > >
> > > > But if required by virt-manager(to create a single window of
> > > management)
> > > > the iface file could be constructed using libvirt apis that call
> the
> > > > iscsiadm commands detailed in method 2)
> > >
> > > We don't need to add any new APIs for this - just automatically
add
> > the
> > > mapping whenever logging into a target with a IQN that we don't
> > already
> > > know about
> > >
> >
> > How do we ensure that the iqn is not already known and libvirt is
> > creating the corresponding iface file for the first time?
> > That would mean searching through the IFACES_DIR which has been
> opposed
> > in the thread...
> 
> Now that you've explained why this searching in IFACE_DIR was needed,
> I've no problem with that approach. We should search through
IFACES_DIR
> to find the iface mapping, if none is found, then run those 2 commands
> you show above in order to create a new mapping
> 

Ok. Thanks.

> > Also, how do we go about creating unique iface filenames when
> > automatically creating them using libvirt ?
> 
> I don't know what naming convention is used in IFACES_DIR, but I'd say
> just follow whatever's used already

What I mean here is how do I create unique file names through libvirt.
Today a unique iface file name is created by the user manually.

So, should mkstemp be used... with a template feed of the initiator iqn
name ?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]