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" <danhunsa...@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.
>
_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to