<p dir="ltr">Hi,</p>
<p dir="ltr">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.</p>
<p dir="ltr">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.</p>
<p dir="ltr">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.</p>
<div class="gmail_quote">On Mar 19, 2014 7:17 AM, "Daniel Hunsaker" <<a href="mailto:danhunsaker@gmail.com">danhunsaker@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p dir="ltr">> Just curious - how long are the command lines this patch generates?</p>
<p dir="ltr">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.</p>
</blockquote></div>