Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-34783

Parameters not written to slave after upgrade to latest LTS

      We have Multijobs with parameters that is passed down to the slaves and written to file for consumption. After an automatic upgrade to LTS 1.651.2 the only content in parameters.properties are a time-stamp and effectively failing all jobs as no parameters were found.

      There was an update for the multijob plugin after the upgrade, but that did not fix the problem.
      I could not see anything useful in the logs.

      After reverting to LTS 1.651.1 it works again.

          [JENKINS-34783] Parameters not written to slave after upgrade to latest LTS

          I'm not sure this is the same issue but it seems related to the latest security updates.

          Here we use predefined parameters to pass "parent_workspace=$WORKSPACE" so the phases can share the same workspace and it was failing after the updates. The parent_workspace variable was being interpreted literally as "$parent_workspace".

          The workaround was to add -Dhudson.model.ParametersAction.keepUndefinedParameters=true to the Java command line, as mentioned in the security advisory.

          Giovanni Tirloni added a comment - I'm not sure this is the same issue but it seems related to the latest security updates . Here we use predefined parameters to pass "parent_workspace=$WORKSPACE" so the phases can share the same workspace and it was failing after the updates. The parent_workspace variable was being interpreted literally as "$parent_workspace". The workaround was to add -Dhudson.model.ParametersAction.keepUndefinedParameters=true to the Java command line, as mentioned in the security advisory.

          tore: Are you able to narrow down which of the two plugins is having the problem?

          Christopher Orr added a comment - tore : Are you able to narrow down which of the two plugins is having the problem?

          orrc No not really. The only thing that sticks out in the Console output is that the Export params plugin states that it writes parameters to file, but does not list anything. The file is empty except a timestamp.
          So either the multi-job cannot send the parameters or the export plugin cant Find them.

          Can't fand anything in the logs eirher.
          I'll make a note on the workaround and try it on our test instance, but for now I stick to 1.651.1.

          Stefan Toresson added a comment - orrc No not really. The only thing that sticks out in the Console output is that the Export params plugin states that it writes parameters to file, but does not list anything. The file is empty except a timestamp. So either the multi-job cannot send the parameters or the export plugin cant Find them. Can't fand anything in the logs eirher. I'll make a note on the workaround and try it on our test instance, but for now I stick to 1.651.1.

          rin_ne added a comment -

          Unfortunately I don't have debug environment now, but read security advisory then fix this.
          https://github.com/jenkinsci/export-params-plugin/commit/5b2875f0e40e1b53469f99a056b8a216dd54ae05

          Attached built hpi. Please test it?

          rin_ne added a comment - Unfortunately I don't have debug environment now, but read security advisory then fix this. https://github.com/jenkinsci/export-params-plugin/commit/5b2875f0e40e1b53469f99a056b8a216dd54ae05 Attached built hpi. Please test it?

          rin_ne added a comment -

          Note that this issue should be fixed by other plugins that contributes parameters. So this fix is temporary solution.
          I would not release new version including this commit.

          The issue that this plugin should fix is "2 parameters are not contributed to build". but no way to fix from plugin side as of now.
          This means other plugins are the same situation. Thus, current official solution is "define system properties" only.

          rin_ne added a comment - Note that this issue should be fixed by other plugins that contributes parameters. So this fix is temporary solution. I would not release new version including this commit. The issue that this plugin should fix is "2 parameters are not contributed to build". but no way to fix from plugin side as of now. This means other plugins are the same situation. Thus, current official solution is "define system properties" only.

          At last I have done some tests, using Jenkins 2 as base and I can create the properties file fine on a Linux slave with the attachement and -Dhudson.model.ParametersAction.keepUndefinedParameters=true applied. But it fails on Windows slaves.

          So I will change my approach for these jobs.

          Stefan Toresson added a comment - At last I have done some tests, using Jenkins 2 as base and I can create the properties file fine on a Linux slave with the attachement and -Dhudson.model.ParametersAction.keepUndefinedParameters=true applied. But it fails on Windows slaves. So I will change my approach for these jobs.

          Closing issue as part of tikal-multijob-plugin issues cleanup.
          If still relevant, please open a matching issue in https://github.com/jenkinsci/tikal-multijob-plugin/issues (you can refer to this issue in its description)

          Yoram Michaeli added a comment - Closing issue as part of tikal-multijob-plugin issues cleanup. If still relevant, please open a matching issue in https://github.com/jenkinsci/tikal-multijob-plugin/issues (you can refer to this issue in its description)

            rin_ne rin_ne
            tore Stefan Toresson
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: