[pve-devel] [PATCH 1/2] This patch refactors ZFS's LUN management code, removing the existing LunCmds implementations, in favor of a single lun management infraestructure which just invokes a 'management helper' (which can be either an script or a nat

Pablo Ruiz pablo.ruiz at gmail.com
Wed Mar 19 10:42:54 CET 2014


Hi,

While using command line arguments may seem the obvious approach, in the
end this is a more fragile mechanism to pass data to helper script, as
backward/forward compatbility would be harder to achieve once new 'data' is
to be passed.

Command line arguments need to respect ordering, or define strict argument
names which should be parsed by the helper by means of getopt or similar
method. However, environment is a bit more flexible, and we can add more
variables as needed, just as CGI, AGI, OCF, and other similar protocol do.

Regarding the size limits of environment/ssh-full-command-string, I will
try to make a few test over various environments and get back to the list.
If notable restrictions are found, I can restrict the variables passed to
only those really needed.. instead of passing all config parameters.
On Mar 19, 2014 7:17 AM, "Daniel Hunsaker" <danhunsaker at gmail.com> wrote:

> > Just curious - how long are the command lines this patch generates?
>
> Well, it looks like that depends on a number of things.  The entire
> contents of %$scfg are added to the environment as PMXCFG_*, the full path
> to the ssh key is added to the environment as PMXVAR_SSHKEY (and then added
> again as an argument to ssh, if ssh is used), and depending on the command
> being issued, you either get PMXVAR_LUNDEV or PMXVAR_LUNUUID, set to the
> appropriate value.  So potentially quite long - certainly longer than I
> expected on my first glance through the code.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20140319/7dea5fb4/attachment.htm>


More information about the pve-devel mailing list