open-iscsi / rtslib-fb

Python library for configuring the Linux kernel-based multiprotocol SCSI target (LIO)
Apache License 2.0
73 stars 90 forks source link

restoreconfig: fix skipping of targets [re]loading #153

Closed pkalever closed 5 years ago

pkalever commented 5 years ago

Problem:

'targetcli restoreconfig [savefile] [target=...]' works for first target only in the saveconfig.json and fails/skips for others silently.

Solution:

Just an indentation fix, yet very severe.

Signed-off-by: Prasanna Kumar Kalever prasanna.kalever@redhat.com

pkalever commented 5 years ago

@lxbsz this fixes issue that we have noted at https://github.com/gluster/gluster-block/pull/252#issuecomment-533984008

@maurizio-lombardi please help review. @lxbsz please help review and test, (it works for me now).

Thanks!

lxbsz commented 5 years ago

@pkalever

Test it again and found one new problem.

I have 3 nodes, named as rhel1, rhel2, rhel3.

In the rhel3 I have enabled the targetclid.service and in this node the reload will always success, no matter in which node to run the 'gluster-block reload ..' command.

That means with the targetclid service running it will work.

But if I disable targetlicd service when the node is booting, and then manually start it, mostly the reload won't work for me.

That means we must enable and start the targetclid service when booting the node.

Before I assumed that the targetclid service shouldn't affect the reload feature, is that right ?

Thanks

lxbsz commented 5 years ago

@pkalever

Test it again and found one new problem.

I have 3 nodes, named as rhel1, rhel2, rhel3.

In the rhel3 I have enabled the targetclid.service and in this node the reload will always success, no matter in which node to run the 'gluster-block reload ..' command.

That means with the targetclid service running it will work.

But if I disable targetlicd service when the node is booting, and then manually start it, mostly the reload won't work for me.

That means we must enable and start the targetclid service when booting the node.

Before I assumed that the targetclid service shouldn't affect the reload feature, is that right ?

Update it here.

After enabling and starting the targetclid service based https://github.com/gluster/gluster-block/pull/203, it works for me now.

Thanks. BRs