saving configured state

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

 



Hi Jerome,

I've been looking more at adding save/restore of configuration to
targetcli natively, instead of relying on lio-utils.

SAVING
1) walk the tree of UINodes from the root
2) for nodes that are instances of UIRTSLibNode, call a method to get a
string (or a dict) that represents their saved state (includes
attributes, parameters, and other data like path, size, wwn that are
backstore-specific)
3) Save this all to a config file

this seems straightforward. It's easy to walk the UIRTSLibNodes, we just
need to extend classes to support a call that encapsulates all their
state into something we can save.

RESTORING
1) new cmdline parameter to targetcli that takes a config file, and
builds UINode tree based on config file
2) kernel configfs synced with with the UINode tree

This differs from lio-utils' method, which builds a list of commands to
poke configfs that just get run on reboot. It may be more work but it
should be more robust, enable idempotence, and allow better error recovery.

How hard would you say extending the code to support this would be? Do
we need another creation mode?

Finally, I think it's important to have the saved config be
human-readable as well as machine-parsable. Json, python, html,
whatever, we just need to be able to reconstitute the python objects
from it, and still allow some emergency sysadmin tweaking.

What are your thoughts?

Thanks -- Regards -- Andy
--
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