Bug 1323356 - tgt-admin/tgtd does not bring up glfs (gluster) backing stores
Summary: tgt-admin/tgtd does not bring up glfs (gluster) backing stores
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: scsi-target-utils
Version: epel7
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Maurizio Lombardi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-02 02:04 UTC by Nathan Coulson
Modified: 2020-07-09 10:30 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Nathan Coulson 2016-04-02 02:04:37 UTC
Description of problem: tgt-admin (and server tgtd) do not bring up backing stores when bs-type is glfs.

Tested on Centos 7, using packages available in epel.

Version-Release number of selected component (if applicable):
 scsi-target-utils-1.0.55-4.el7.x86_64
 scsi-target-utils-gluster-1.0.55-4.el7.x86_64


How reproducible: Everytime


Steps to Reproduce:

With a coresponding gluster environment, use the following in targets.conf

<target iqn.bravenet:gluster.staging>
    bs-type glfs
    backing-store vmdisk@glustermaster:staging
</target>

and restart tgtd, (or tgt-admin -c targets.conf --update tid=1)

Actual results:
Using tgt-admin -c targets.conf --update tid=1 -v

# Skipping device: vmdisk@gluster:staging
# vmdisk@gluster:staging does not exist - please check the configuration file
tgtadm -C 0 --lld iscsi --op bind --mode target --tid 1 -I ALL



Expected results:
Using tgt-admin -c targets.conf --update tid=1 -v

# Adding target: iqn.bravenet:gluster.staging
tgtadm -C 0 --lld iscsi --op new --mode target --tid 1 -T iqn.bravenet:gluster.staging
tgtadm -C 0 --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b vmdisk@gluster:staging  --bstype glfs   


Additional info:

I believe this is due to tgt-admin not being familiar with glfs and assuming it needs a block device.

To test this, I made the following change and it now works as expected:
(Line 491 of /usr/sbin/tgt-admin)
        if ($can_alloc == 1 &&
           -($bstype =~ "rbd" || (-e $backing_store && ! -d $backing_store))) {
           +($bstype =~ "glfs" || $bstype =~ "rbd" || (-e $backing_store && ! -d $backing_store))) {

Comment 1 Andy Grover 2016-04-04 22:34:51 UTC
Fix posted upstream


Note You need to log in before you can comment on or make changes to this bug.