Re: reload saved targets feature for Targetcli

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

 



Hi Zhu,

I have taken a look at your request, and noticed that your pull request just defines a class method on CliConfig that essentially read the contents of the config file into an unused variable, outputs a "Reloading the configuration" and returns True. There is not much there to reuse I am afraid.

However I agree that a shortcut to reload the system config might come in handy in targetcli.

This is of course already possible, in several ways:

- Restarting the target service does exactly that - and more, arguably too much even. The initscript works just fine AFAIK. I actually do not get the scenario you describe for a reload function (in github/targetcli issue #16)

- From targetcli, you can load and commit the saved config (or any config for that matter):

root@ws1  ~  targetcli
targetcli 3.0.pre4 (rtslib 3.0.pre4.9~g6fd0bbf)
Copyright (c) 2011-2014 by Datera, Inc.
All rights reserved.

/> configure
Entering configure mode
This mode is a functionnal but early preview version of the next-generation targetcli
Syncing policy and configuration...

### [edit] top-level

config# load /etc/target/scsi_target.lio
Replace the current configuration with /etc/target/scsi_target.lio? [y/N] y
config# commit
Validating configuration
Apply changes and overwrite system configuration ? [y/N] y
Applying configuration
[clear] delete all live objects
[create] fabric iscsi
[create] fabric iscsi target iqn.2003-01.org.linux-iscsi.ws0.x8664:sn.b83d79535ac7 [create] fabric iscsi target iqn.2003-01.org.linux-iscsi.ws0.x8664:sn.b83d79535ac7 tpgt 1 Performing backup of startup configuration: /var/target/backup-2015-10-25_21:12:31.lio
Saving new startup configuration

So, for convenience I added a 'reload' command in configure mode of targetcli that reloads and commits the saved configuration in one step, with no argument required.

Thanks for the suggestion. Tell me if this works for you.

Best Regards,
--
Jerome
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux