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

Re: [libvirt] Re: [Libvir] ISCSI howto, example, etc?

On Wed, May 14, 2008 at 01:57:13PM +0200, Chris Lalancette wrote:
> Stefan de Konink wrote:
> > 
> >     snprintf(sysfs_path, PATH_MAX,
> >              "/sys/class/iscsi_session/session%s/device/"
> >              "target%d:%d:%d/%d:%d:%d:%d/block",
> >              session, target, channel, id, target, channel, id, lun);
> > 
> > 
> > xen01 5:0:0:1 # pwd
> > /sys/class/iscsi_session/session5/device/target5:0:0/5:0:0:1
> > xen01 5:0:0:1 # ls -l
> > total 0
> > lrwxrwxrwx 1 root root    0 May 14 13:14 block:sdd ->
> > ../../../../../../block/sdd
> Ug.  Yeah, that will do it.  What kernel version are you running that your sysfs
> looks like that?
> It seems we have been shoved into a corner; we can't rely on the output of the
> iscsiadm tools, since we have already seen those change between versions.  And
> apparently we can't rely on sysfs paths to stay stable either.  Either we need
> some iscsiadm command with a known, stable output that we can call, or we need
> some sort of iSCSI API that we can call to get this information.  Either way, I
> think we need help from the iSCSI people, because the current position seem to
> be untenable.

We have no choice.

  - No standard iSCSI library exists for us to use
  - Any iSCSI library would encounter these same problems
  - IF a library were written it still won't be in any distro we use
    for a long time

So we have no choice but to make our current code work.  If someone wants to
pursue development of an iSCSI library as a long term solution that's a
worthy goal, but for libvirt we need solutions that work today, for existing

This comes down to, documenting the variations we have to deal with, figuring
out the code to support them, and writing test cases to ensure it works and
we don't cause regressions.

|: Red Hat, Engineering, Boston   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

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