One of the features of libStorageMgmt is that long running operations
can return a job id which can then be used to periodically check on the
status of the operation. In its current form the job id is an integer.
However, this doesn't work if we want a command line interface tool to
return before the operation is done, because the association between a
job ID number and the work in progress is lost when the plug-in is
destroyed. It does work for those users that use the API and keep the
library open until the operation completes as the associating state is
available.
I'm proposing to replace the job id as a numeric with a job id as a
string. The string could have any form depending on plug-in
implementation and thus be constructed in such a way so that plug-in
writers could associate a status inquiry with the correct long running
operation. An opaque type would be better as we could change the
implementation without changing the ABI, but the end result is we need
something that can be used with stdout and an exit code to be scriptable
on the shell.
The lsmcli command line tool today blocks until the user requested
operation completes. This prevents a user written script from doing
other meaningful work while some long running operation completes. As
part of this change I would add an option to lsmcli for async. operation
so that the tool would return the job id to stdout with an exit code
indicating job in progress. The user could then use lsmcli to query on
the state of the operation given the job string identifier.
Does this sound reasonable? Other ideas?
Regards,
Tony

A new version of libStorageMgmt is now available from
*https://sourceforge.net/projects/libstoragemgmt/files/Alpha/libstoragemgmt-0.0.3.tar.gz
*FC16 yum repo updated
*https://sourceforge.net/projects/libstoragemgmt/files/Alpha/Packages/
Changes in this release:
- For RPM installs the lsmd service will start automatically after
package install and runs as a non-privileged user
- NFS export functionality is cleaned up (specifically)
* Added NFS client authentication option
* If you export an existing export it will update existing
instead of creating a duplicate export path
* Fixed a bug when removing a non-existant NFS export
* Fixed the ability to pick export path of users choice
- All python plugins now have command line handling identical to
lsmcli. You can execute a python plugin directly without going
through IPC for development/testing/debug etc.
- Updated sim plugin to save state (pickle), now you can use cli
against sim plugin without losing state between calls
- lsmd modified to run with systemd (new style daemon support)
Giving it a try:
https://sourceforge.net/apps/trac/libstoragemgmt/wiki/GettingStarted
*Warning/disclaimer*
This library has the ability to destroy any and all data on a storage
controller (either from user error or because of a code bug in the
library itself). At this time I would suggest using and developing on
only non-production storage arrays which have no data of value.
As always any feedback and improvements to the code are welcomed.
Regards,
Tony