5 Replies Latest reply on Jan 30, 2012 3:49 PM by Lou Troise

    ExportAudit - "No Master for Template" Error

      Hello All,


      I'm using the ExportAudit call from NSH script in order to generate a .csv file.  I've had this working for a few months and have recently found that it's not working anymore. 


      The command call is simply:

      blcli_execute Utility exportAudit "${TEMPLATE_GROUP}" "${TEMPLATE_NAME}" "${JOB_FOLDER}" "${AUDIT_JOB_NAME}" "/tmp/${AUDIT_JOB_NAME}.csv" "CSV"


      The error returned in the log:

      Command execution failed.  com.bladelogic.mfw.util.BlException: com.bladelogic.mfw.util.NotFoundException: no master for template ID DBKey:STemplateModelKeyImpl:2012899-5-3598807


      Via nsh script, I take a couple of snapshots using parts from a template, then create an asset-based audit job using those snapshot results, and can run the audit job with expected results.  For some reason, it just no longer wants to export the audit runs.  I've had to implement some RBAC updates to permissions on objects lately and I'm not sure if that is a root cause of this error...?  I'm not seeing any access denied issues...Like I said, this was working for a while and I'm not sure what mod I've made to my code to break it.


      This is BL



      Thank You!

        • 1. Re: ExportAudit - "No Master for Template" Error
          Bill Robinson

          I think you need to create a template based audit job for this.

          • 2. ExportAudit - "No Master for Template" Error

            Hi Bill,


            I would tend to agree with you, except that I've had this working with an Asset-based snapshot for some time, and I'm not sure what I did to break it.  Note for other readers: I am already using a template anyway because the snapshot creation command requires it, within the confines of nsh scripting.


            Could you possibly give me a human explanation of that error message...maybe a condition that causes it?  The snapshots and audits using them all seem to work fine; just the export operation seems to have an issue.  I'm just not sure if I should be troubleshooting permissions, or if someone might have made a BLApp server config change that would cause this, or if I've just got a fat-finger error somewere in my nsh....???



            Much Thanks

            • 3. Re: ExportAudit - "No Master for Template" Error
              Bill Robinson

              Was the audit job a success ?

              • 4. ExportAudit - "No Master for Template" Error

                Yup, the audit job runs successfully.

                • 5. ExportAudit - "No Master for Template" Error

                  Hello Everyone,


                  I managed to figure what was going on in my case here.



                  Here is the order in which the affecting operations were happening:



                  Create component template

                  Create Snapshot job using parts from template

                  Run Snapshot job once

                  Run Snapshot job immediately again

                  Create Audit Job with master & target snapshot job runs above




                  Apply permissions on all job/template folders and jobs/templates - By doing this, I created a new DBKey for the component template, thus breaking the Audit Job’s snapshot references for Master & Target




                  Run Snapshot job again

                  Update Audit Job with new target snapshot result

                  Run Audit Job

                  Export Audit results to a file

                  ERROR – No Master Template - The old Master used by the Audit Job is broken because of the above DBKey change to the template….the target in the Audit is OK because we just now edited in a new one



                  SO, the resolution was to apply permissions to the Component Template immediately after creating it.