Community
Participate
Working Groups
Created attachment 77127 [details] Allow options to be passed to proxy I am unable to pass options to my proxy at startup. I need to be able to pass options in order to direct my proxy to monitor status using PE or LoadLeveler monitoring threads, as well as to set diagnostic logging options This problem is also logged as #24 on the PTP 2.0 todo list. I have created a patch for this and attached it to this bug report.
Is there a UI component to this patch, or is it specific to you RM? I think it would be worth adding a text box to the proxy configuration page to allow the extra arguments to be specified.
The UI component of this is the second resource manager wizard page I implemented which has the options settings I need for my resource manager, currently a checkbox indicating if my resource manager uses LoadLeveler for process monitoring or just monitors the poe process, and a dropdown which sets the level of detail for a diagnostic trace generated by my proxy. The approach I used was for this ui panel to get the values the user entered, create a string which is a set of blank-delimited options, exactly as they would be passed to the proxy, and store that string as one of the attributes for the resource manager definition. At the point where the *ptp.remote code is setting up to invoke the proxy, I parse the string and add each option as a separate element to the args array passed to the proxy. I didn't include my resource manager wizard class in this patch since it is part of my PE resource manager implementation which is still making its way thru the approval process.
Ok. I think it will be useful to add a text box on the proxy configuration page that will allow options to be specified manually. This shouldn't affect your wizard page as they should just appear as extra options.
Sorry, I'm slightly confused. Are you suggesting that I add a text field at the bottom of the pane created by AbstractRemoteManagerConfigurationWizardPage.createContents, with the intent that this be a simple string with options coded exactly as they would be passed to the proxy? I think this is workable in that I can call config.setInvocationOptions() in this class to store the options string, then if there is a second wizard panel (my proxy options panel for instance), I call config.getConfigurationOptions(), append my options string and then call config.setConfigurationOptions() from withoin my second panel and this will work. I think this might be a little confusing to the user, since he now has two places to enter proxy options, first an arbitary text string where he has to know the format and syntax of the options, then a second, hopefully more user-friendly wizard panel where he sees text boxes, checkboxes, combo boxes, etc that prompt him for options. If I'm missing your point, please clarify.
Actually, I was suggesting I do it, not you :-) You're right though. It's probably not necessary to expose the proxy arguments directly to the user. I thought this might be useful for debugging the proxy, or if there is some weird command that needed to be executed. But it can probably just as easily be done in a user-friendly manner. One other thing though. I think it would be better to do the parsing when setConfigurationOptions() is called, rather than at proxy startup time. That way we can also have an addConfigurationOptions() that can be used to add more options later if necessary (e.g. in some other wizard page). I'll do that when I commit the patch.
I have committed a modified version of the patch, as discussed. The following interfaces are provided to AbstractRemoteResourceManagerConfiguration. Please let me know if you have any problems. /** * Set the invocation options. The contents of optionString are split into space * separated strings. Any existing options are discarded. * * @param optionString string containing the space separated invocation options */ public void setInvocationOptions(String optionString); /** * Append invocation options to existing options. The contents of optionString are * split into space separated strings. * * @param optionString string containing the space separated invocation options */ public void addInvocationOptions(String optionString); /** * Get the invocation options as a list of strings. Returns * an empty list if there are no options * * @return list of strings containing invocation options */ public List<String> getInvocationOptions()