PP-719: Enhance setUp in PTL specifically for Cray platforms

@lisa-altair, yes the built-in hooks remain unchanged by Server.revert_to_defaults(). But if there was a test that modified the PBS_translate_mpp hook, e.g. by disabling it, then the PBS_translate_mpp hook should be reverted to “out-of-box” settings. I have updated the design page.

Wouldn’t the same thing have to be done for all built-in hooks that are enabled by default? And not just PBS_translate_mpp? After all a test could disable other hooks too…

Or is PBS_translate_mpp hook special because it is ONLY enabled on Cray X* systems and should be enabled for a Cray ALPS simulator?

Hi All, according to review comments given by Hiren on setup PR, some modifications are required to design document which I have updated.According to it:

  • We don’t require $usecp in “MoM.init()” interface as we will be running PTL from the login node.
  • We need to perform node deletion and creation steps inside “PBSTestSuite.revert_mom()” function after revert to default is called.

Hi @borlesanket, I noticed that you also deleted the part where the PBS_translate_mpp hook was left enabled on a Cray/Cray ALPS simulator. Is that because that is the current behavior and no changes have to be made?

@borlesanket, here are some comments:

  1. usecp is needed on Cray having two moms when submitting a job without the qsub -o option. If a job is submitted from the second mom, which gets executed on the first mom, then we should see the job’s output files end up in the user’s home directory and the job will terminate normally and not stay in E state.
  2. When a test disables the PBS_translate_mpp hook shouldn’t setUp restore it back to, by default, enabled ?
  3. Are you deleting all nodes in PBSTestSuite.revert_mom() after mom.revert_to_defaults() ? You might want to add a check that $alps_client and its value exists in PBS_HOME/mom_priv/config before deleting all nodes and creating them back.

@lisa-altair, As per the review comments from Hiren, we should not alter the built in pbshook because of which I removed it. I did not consider the case where test writer may alter it, as per the Voltaire’s 2nd comment.

@vccardenas, I have updated document incorporating comment 1 and 2. Regarding comment 3, In my opinion it’s not required to check for the existence of $alps_client because just before deletion and creation we are calling mom revert to default which adds $alps_client as a default parameter in mom config for Cray.Please let me know about your opinion.

Hi @borlesanket and @hirenvadalia , I am sorry for asking the same question over and over, I am having trouble understanding what happens for hooks…forget about the Cray platforms or the Cray specific hooks. On a plain linux box, if a PTL test changes the setting for a PBS hook, for example it disables the hook, will PTL setUp put that PBS hook back to the fresh installed setting of enabled=true?

@lisa-altair Yes and No, we have two types of hooks one is site hook (i.e. HOOK object in PTL) and PBS hooks (i.e. PBS_HOOK object in PTL) so from this two type as of now PTL reverts (aka delete or reset based on given option, default is delete) only site hooks not PBS hooks.

Hi All, So from the above discussion the question arises, whether we should alter/revert PBS_translate_mpp or not and depending on answer I need to update the document.

@borlesanket, I think the PBS_translate_mpp should be able to revert to enabled which is the default, for the following reasons. The current setUp will not revert PBS_translate_mpp hook because it is a PBS hook (PBS_HOOK object in PTL), as also mentioned earlier by @hirenvadalia .

  1. If a test disables PBS_translate_mpp hook then setUp() should revert it to enabled.
  2. On a Cray ALPS simulator that is a plain Linux machine the PBS_translate_mpp hook should be enabled. On plain Linux the PBS_translate_mpp hook is disabled by default after a fresh install of PBS.

Hi @vccardenas, @lisa-altair, @hirenvadalia, It seems we require reverting of PBS_translate_mpp to default enabled, so I think I don’t need to make new changes to document. Please have a look and let me know if any changes required.

The design seems good to me.

@borlesanket, the design in current page (v.21) looks good to me.

Hi,

With the latest changes to disable the PBS_translate_mpp hook by default on a Cray X* series (see https://pbspro.atlassian.net/wiki/spaces/PD/pages/261554226/Disable+the+PBS+translate+mpp+hook+by+default), revert_to_defaults should also be updated to not enable the PBS_translate_mpp hook.

I modified the design doc to reflect this.
What does the community think?

Change looks good @lisa-altair

@lis-altair, the changes look good to me.