1 2 Previous Next 15 Replies Latest reply on Oct 21, 2015 6:40 AM by Bill Robinson

    Issue with batch within batch containing patching jobs

    Yanick Girouard

      I think I may have found a defect in BSA 8.5 SP1 P5, but I wanted to run it by the community first in case it was already known and fixed in 8.6...

       

      I have created a batch job to do some post-deployment activities on newly built servers. The top-level batch is set to continue on error, and to Execute by server, with a rolling execution of 5 servers max. The Servers/group option of all batch jobs including the top-level one, is set to "Use the following servers for all jobs" and the list of targets is blank. The job is always called using Execute Against.

       

      The first child batch job (APP - FixIt - Nessus - 2008), is set to run sequentially, without rolling execution.

       

      The last child batch (PATCHING - SD - Windows_Patch_Current...) calls 3 Windows Patching Jobs, and is set to run sequentially, ignoring errors, and does not use rolling execution.

       

      27-07-2015 10-32-04 AM.png

       

      The expected behavior when the job is called against two targets, would be that the whole batch will be run once against each target separately.

       

      In reality, even though a batch run was started for each target separately, and that the first 2 jobs run against their unique target, the PATCHING batch job was called against the both targets passed to the top-level batch. This means that the patching was being applied twice per target at the same time.

       

      It's as if the "Execution by server" of the top-level batch wasn't properly passed to the batch job that contains the patching jobs.

       

      Has anyone seen this before?

       

      The goal here is to be able to deploy servers concurrently as fast as possible, without having to wait for all servers to finish installing the first software in the batch before starting the next.

        • 1. Re: Issue with batch within batch containing patching jobs
          Yanick Girouard

          I have opened issue ISS04504225 for the above. The first one who answers wins a smiley !

          • 2. Re: Issue with batch within batch containing patching jobs
            Bill Robinson

            so you get two concurrent runs of the 'patching -sd -windows...' batch job, w/ each run targeting the two servers ?

             

            is the 2nd nested batch job showing both targets or just its children ?  so it's like:

             

            -> parent batch run

               -> parent run for target 1

                       -> deploy target 1

                       -> batch1 target 1

                       -> batch2 (patch) target1 & 2

                              -> patch1 target1 & 2

                              -> patch2 target1 & 2

                              -> patch3 target 1 & 2

               -> parent run for target 2

                       -> deploy target 2

                       -> batch1 target 2

                       -> batch2 (patch) target1 & 2

                              -> patch1 target1 & 2

                              -> patch2 target1 & 2

                              -> patch3 target 1 & 2

             

             

            or

             

            -> parent batch run

               -> parent run for target 1

                       -> deploy target 1

                       -> batch1 target 1

                       -> batch2 (patch) target1

                              -> patch1 target1 & 2

                              -> patch2 target1 & 2

                              -> patch3 target 1 & 2

               -> parent run for target 2

                       -> deploy target 2

                       -> batch1 target 2

                       -> batch2 (patch) target 2

                              -> patch1 target1 & 2

                              -> patch2 target1 & 2

                              -> patch3 target 1 & 2

            • 3. Re: Issue with batch within batch containing patching jobs
              Yanick Girouard

              Like this (first one), although I can't see the targets of the batch itself (don't know how if you can, the name o ftargets passed to a batch are not printed anywhere), I see that each of its child received both targets because both the analysis and remediation jobs run against both targets in each batch2 jobs.

               

              -> parent batch run

                 -> parent run for target 1

                         -> deploy target 1

                         -> batch1 target 1

                         -> batch2 (patch) target1 & 2

                                -> patch1 target1 & 2

                                -> patch2 target1 & 2

                                -> patch3 target 1 & 2

                 -> parent run for target 2

                         -> deploy target 2

                         -> batch1 target 2

                         -> batch2 (patch) target1 & 2

                                -> patch1 target1 & 2

                                -> patch2 target1 & 2

                                -> patch3 target 1 & 2

              • 4. Re: Issue with batch within batch containing patching jobs
                Yanick Girouard

                It's getting weirder... I took a closer look, and this is what happens... It seems to only be the first patching job that is called against both targets out of the 3 in the batch. The next two runs show only the one target they should be running against.

                 

                -> parent batch run

                   -> parent run for target 1

                           -> deploy target 1

                           -> batch1 target 1

                           -> batch2 (patch) (can't see targets)

                                  -> patch1 target1 & 2

                                  -> patch2 target1 only

                                  -> patch3 target only

                   -> parent run for target 2

                           -> deploy target 2

                           -> batch1 target 2

                           -> batch2 (patch) (can't see targets)

                                  -> patch1 target1 & 2

                                  -> patch2 target1 only

                                  -> patch3 target 1 only

                • 5. Re: Issue with batch within batch containing patching jobs
                  Bill Robinson

                  There’s a similar issue in 8.6.01 (and reproduced in 8.5.01) - QM001881488:

                   

                   

                  Customer has a batch job which includes a Windows Patch analysis job

                  Targets are given to the Batch via option "Use the following servers for all job". When set to "Execute jobs sequentially", and ran the batch against 2 targets, it runs fine:

                  But when changed the batch to be "Execute by Server", it does not execute as it should (by server), few of the jobs are executed against only one server where as patch analysis job is run against two servers.

                  The job is being run with option "Execute against"

                  e.g. For the first member job and USP job it is executed against only one server where as for Windows Patch Analysis job the run was against two servers.

                  It looks as if analysis job being executed simultaneousely against all the provided servers even with option "Execute by server"

                   

                  Even though it’s the nested batch job that’s affected by this, I’m wondering if it’s related.  What if you have a nested batch job w/ a nsh job in it instead of patching, do you see the same problem ?

                  • 6. Re: Issue with batch within batch containing patching jobs
                    Yanick Girouard

                    Interesting... it does seem exactly the same. To answer your question, the second batch job contains multiple jobs that are not patching jobs, and they didn't have the issue. I haven't tested with NSH Script jobs, but I can try.

                    • 7. Re: Issue with batch within batch containing patching jobs
                      Bill Robinson

                      Ok – it’s probably that defect then.  if the nested batch job has other jobs in it besides the 3 patching jobs and they are all ok, then it’s some issue w/ the batch + patching + by server (from the grand parent in this case).

                      • 8. Re: Issue with batch within batch containing patching jobs
                        Yanick Girouard

                        Ok, I'll try to add a simple NSH Script Job in front of the 3 patching jobs to see if it will get the issue.

                        • 9. Re: Issue with batch within batch containing patching jobs
                          Chad Johnson

                          We are seeing this problem as well with 8.6.01.66.  I have a batch job as follows:

                           

                          Master Batch Job

                          - Patch analysis job with remediation and immediate execution enabled

                          - Package 1 Install

                          - Package 2 Install

                          - Package 3 Install

                           

                          When we run this against 1 server all is fine.  If I run it against more than one the Patch analysis job will run the same number of times as the count of servers targeted (expected behavior).  However, each of these analysis jobs is running against the full list.

                           

                          So, if my "Master Batch Job" targets 3 servers I will have 3 analysis running, each with 3 targets (a total of 9 analysis executing). Obviously this is 'undesirable' to say the least.

                           

                          Any chance a fix has been developed?

                          • 10. Re: Issue with batch within batch containing patching jobs
                            Bill Robinson

                            your batch job is set to run 'by server' ?

                            • 11. Re: Issue with batch within batch containing patching jobs
                              Chad Johnson

                              Yes, which is the desired behavior.  We don't want all these servers sitting around waiting for others to complete the various phases.

                               

                              Do the other execution models work as a 'work around' for this problem?

                              • 12. Re: Issue with batch within batch containing patching jobs
                                Jakub Michalik

                                Hello. We are facing to the same issue. Does exist any workaround for this issue please?

                                • 13. Re: Issue with batch within batch containing patching jobs
                                  Yanick Girouard

                                  Yes, don't use Execute against, but rather add the targets in the batch directly and this will work.

                                  • 14. Re: Issue with batch within batch containing patching jobs
                                    Jakub Michalik

                                    Thanks for quick response. When and in what version of BSA will be this defect resolved?

                                    1 2 Previous Next