14 Replies Latest reply on Aug 15, 2012 1:58 PM by afurman NameToUpdate

    Jobs in "Depot" (or other Non-Job) groups in Bladelogic database?

      While looking at the "job" table in Bladelogic (8.0. SP5) database I noticed something that I find very strange:

      A large huge number of jobs have  "job.group_id" which corresponds (when joined with blgroup and blgroup_type tables)

      to "blgroup.group_type_id" other than "4" ("Job Group").


      Instead these groups are of type "2" ("Depot Group" ) or even type "6" ("Server Smart Group")

      This does not make sense.

      Most of them however show up correctly in Bladeleogic console (under "\Jobs")

      which is due to the fact that the row with "is_latest_version=1" for a given job has correct group type of "4" (Job Group)

      Most likely all these jobs were created by blcli scripts.


      Has anybody seen this,  should I  be concerned?


        • 1. Jobs in "Depot" (or other Non-Job) groups in Bladelogic database?

          The only job I know which is associated with a depot is Patch Catalog Update jobs,

          this can be because of these

          This will beed more insight into the ur tables

          • 2. Jobs in "Depot" (or other Non-Job) groups in Bladelogic database?

            these jobs are depoloy jobs based on standard blpackages... not patch catalog ones

            I have a pretty good idea what creates these entries (we have an automated process for creating depot objects/deploy jobs using blcli but my big question is why does Bladelogic allow to add a job record with group_id of group_type_id=6?

            after all you cannot do it manually in the console (put a job into Server Smart group or Depot Group), right?

            • 3. Jobs in "Depot" (or other Non-Job) groups in Bladelogic database?

              I will  not worry about that, there can be some assciation with these objects within the schema design that is letting this happen !

              • 4. Re: Jobs in "Depot" (or other Non-Job) groups in Bladelogic database?
                Bill Robinson

                This sounds familiar – I think there was a defect where this was happening. Can you open a ticket w/ support about this ?

                • 5. Re: Jobs in "Depot" (or other Non-Job) groups in Bladelogic database?


                  Yes I'm opening a ticket for this.  Most of these entries however have is_latest_version=0 and in effect are hidden from the console.  The first time I actually ran into this was when I was testing your (awesome:-) objectcleanup.nsh script  (the 1st version and I am in the process of testing the second revision now) and sure enough when the script tried to look for a deployjob in a group "All Servers by Category\..." it errored out (can't find it)

                  • 6. Re: Jobs in "Depot" (or other Non-Job) groups in Bladelogic database?
                    Bill Robinson

                    I thought I put in some error handling for this actually because I was hitting this in a test env. can you run it w/ debug level 5 and send me the output around where it errors ?

                    • 7. Re: Jobs in "Depot" (or other Non-Job) groups in Bladelogic database?

                      It errored out last time (older version of the script) also because that particular job  record (with Server Smart group as a group) had is_latest_version=1

                      I'm testing the latest version in the environment (8.0 SP5) where all these "invalid" job entries have is_latest_version=0 So it probably won't happen?

                      But if it does I'll send you the debug output.


                      there's yet another issue I have ticket open wiith support right now directly related to my first sentence here:

                      in 8.0 SP5 version there are several of these jobs with server smart group as a group ("invalid") that have only one record (row) and that row had is_latest_version=0  even though that record was the only one....weird

                      After successfull data migration to 8.2 these several record had their is_latest_version changed to 1 and satrted showing up in the 8.2 console.

                      This is when I first tried your script (older version) and it choked on one of these jobs (they were latest version and supposedly in a server groups so....)

                      Now I'm testing it all under 8.0 SP5 where none of them are is_latest_version=1

                      Might be confusing I know....

                      • 8. Re: Jobs in "Depot" (or other Non-Job) groups in Bladelogic database?

                        ok, update: so i'm running the script in a test 8.0 SP5 environment:

                        ./objectcleanup2.nsh -d 5 -t 270 -p KEEP -s false -n true -c true -o ./temp/out.txt

                        runs for a long time and finally crashes, here are the last few debug lines:

                        [Fri May 25 13:36:22 2012] [DEBUG2] Entering function: checkObject...

                        [Fri May 25 13:36:22 2012] [DEBUG2] ns=Job

                        [Fri May 25 13:36:22 2012] [DEBUG2] objName=<JOB123>

                        [Fri May 25 13:36:22 2012] [DEBUG2] objGroup=/tickets/<datetime>

                        [Fri May 25 13:36:22 2012] [DEBUG2] objKey=

                        [Fri May 25 13:36:22 2012] [DEBUG2] jobRunTime=Wed Jul 20 02:56:56 EDT 2011

                        [Fri May 25 13:36:22 2012] [DEBUG2] objCreateDate=Thu Jul 14 02:18:55 EDT 2011

                        [Fri May 25 13:36:22 2012] [DEBUG2] Entering function: runBlcliCmd...

                        [Fri May 25 13:36:22 2012] [DEBUG3] blcli_execute Job jobExistsByDBKey

                        [Fri May 25 13:36:23 2012] [ERROR]

                        nothing else, just "ERROR"

                        in appserver.log: 25 May 2012 13:36:23,099] [Client-Connections-Thread-9] [INFO] [blsync:BLAdmins:] [Client] Connection disconnecting: id = 14

                        So i run sql query (that joins job and group data) for that particular job ""

                        job_id version name           is_latest_version is_deleted group_type type_desc

                        10311 1          <JOB123>  1                             0                 2                   Depot Group

                        10316 1          <JOB123>  1                             0                 4                   Job Group


                        something tells me that it must have crashed on job_id 10311 above (the one with group type 2 which is wrong "Depot group" for a job)?

                        • 9. Re: Jobs in &quot;Depot&quot; (or other Non-Job) groups in Bladelogic database?
                          Bill Robinson

                          around line 1118 of my script i should have a check like this:


                          if ( [ "${ns}" = "Job" ] && [ ${groupTypeId} = 5005 ]) || ([ "${ns}" = "DepotObject" ] && [ ${groupTypeId} = 5001 ]) || ([ "${ns}" = "Template" ] && [ ${groupTypeId} = 5008 ])


                          so i'm not sure if you are having an issue w/ the incorrect group assignment - it looks like the jobKey is not being read from a file.  can you run the script and echo the output into a file and attach that file ? 

                          • 10. Re: Jobs in &quot;Depot&quot; (or other Non-Job) groups in Bladelogic database?


                            Sorry for the delay.

                            This was command line and the actual error below (not much – just “ERROR”)

                            In appserver.log all I can see at the time of the error is that userid the script was using (SRP) disconnecting from bladelogic

                            Debug Output attached (I had to replace some items specific to our environment with something like objectcleanup.out.txt

                            • 11. Re: Jobs in &quot;Depot&quot; (or other Non-Job) groups in Bladelogic database?
                              Bill Robinson

                              do you still happen to have this file:


                              from the system where you ran the script?


                              what should happen is that i read in all the objects of a particular class and dump a bunch of info to a file.  once i'm done doing that for all object types i go through and figure out what can be deleted.  at some point i read the info i need back from those files into my script.  so in your case it looks like the dbkey for this CM000888888 was not read back in from that tmp file i created.  that caused the failure at the end of the script.


                              the ERROR line should have had the stderr from blcli in it, unless you are running it on a windows box?

                              • 12. Re: Jobs in &quot;Depot&quot; (or other Non-Job) groups in Bladelogic database?


                                Sorry for the delay. 

                                Yes, we do run it on a windows system.

                                I have found /tmp/3964-oc/objList/process/972.28


                                contents (with some values masked as <


                                objInfo:objTypeId=28 objInfo:objName=CM000888888 objInfo:objType=BLPACKAGE objInfo:objCreateDate=Fri Jun 01 14:49:31 EDT 2012 objInfo:objUserCreate=<>objInfo:jobRunTime=NONE objInfo:objGroupId=2001766 objInfo:objRoleCreate=<>objInfo:objGroup=/<>/06-01-2012/development objInfo:objId=972 objInfo:ns=DepotObject objInfo:objCheck=OK objInfo:testTimeType=ObjectCreateDate pl:972-1 objInfo:testTime=Fri Jun 01 14:49:31 EDT 2012 objInfo:processAction=Skip-New

                                1 of 1 people found this helpful
                                • 13. Re: Jobs in &quot;Depot&quot; (or other Non-Job) groups in Bladelogic database?
                                  Jim Wilson

                                  Hi Bill / afurman,


                                  Is there any update for this thread?


                                  Thanks & Regards,


                                  • 14. Re: Jobs in &quot;Depot&quot; (or other Non-Job) groups in Bladelogic database?

                                    Jim, Bill, I've also opened a support case on the same (Jobs in Depot Group in bladelogic Database) a while back and eventually was told by BMC supoprt that: There are a couple of jobs that are stored in the "depot" instead of the job folder.  One of them being blpackage builder jobs (those will be stored in the same depot group as the blpackage itself).  This is intentional.  Some of the hidden patching jobs also do the same" So I guess its 'by design' ... Does not make a lot of sense if you ask me but I just have to accept this explanation. It really does not affect anything at this point as long as you don't run a script which tries to enumerate job objects in the database and then does not try to locate them using a 'group' which happens to be a type 'depot'.  (which was kind of what was happening in Bill's script I was tryign to use and I'm pretty sure he has fixed it since then) Thanks everyone for their input. Appreciate it.