2 Replies Latest reply on Mar 1, 2011 3:16 PM by Jim Campbell

    What is the best approach to automatically patch a server within a Post-provisioning Batch job ?

    Steffen Kreis

      Hello,

       

      we are running BL 8.0 SP6 and we are struggeling with the following problem.

       

      We would like to patch a Windows Server with the latest hotfixes within our Post-Provisioning-Batch-Job.

      Therefore we have created a Patch-Analyis job with Auto-Remediate enabled.

       

      We have set "Execute Job now" within the Phase and Schedules of the Deploy Job options.

       

      When we manually execute that job, all works as expected.

       

      Executed within a Post-Provisioning Batch Job causes the following problem:

       

      - The Patch-Analysis Job is executed and a Remediation package is created.

      - After this analysis job finishes, the Batch job continues and proceeds with the following jobs in the Batch (installation of base software)

      - The Remedediation Job is launched in parallel and installs the patches (out of the row of the Batch), which leeds to unpredictable problems

       

      What is the best approach to automatically patch a server within a Post-provisioning Batch job and really wait within the Batch-Job until Patching is finished before continuing with the following jobs in the Batch.

       

      Many thanks and Regards

      Steffen

        • 1. What is the best approach to automatically patch a server within a Post-provisioning Batch job ?
          Bill Robinson

          someone else ran into this problem - did around on the community for that post if you can.

           

          i don't know if he found a solution.  if you are good w/ the blcli you could write a nsh job that looks for the last run of the PAJ, find the created remediation job, then the deploy job and waits for that to finish before exiting.  that would hold up the batch job exectuion.

          • 2. What is the best approach to automatically patch a server within a Post-provisioning Batch job ?
            Jim Campbell

            We have had a somewhat different problem that we have not resolved.  For us, the deploy job that is generated by the Analysis job is never actually executed (we have execute job now set).  We were told it was a 'known issue' with patch analysis jobs in 8.0 and that they would only automatically execute the generated deploy job if the server was a default target of the analysis job (e.g. could be run with 'execute' instead of 'execute against').  I'm surprised you're not having the same problem given that you are on the same version/SP as we are.

             

            Looking for the last run of the analysis job runs into the fairly common problem of concurrency issues - if two instances of the analysis job are running at the same time you will pull back the same job run for both.  The only workaround I found was to put the analysis job in a batch and then check for the last job run of the batch job against the target server, and from there get the analysis job run.  From there its easy to generate the Remediation job and execute it to create the deploy job, but again there doesn't seem to be an easy way to get from the Remediation job to the deploy jobs you generate.

             

            If your remediation jobs are actually running automatically you could probably just set up a nsh script job to query the progress of the deploy job run and sleep for a few seconds in between loops.