do you mean cleanup Database?
?! Very weird question ?!
What exactly do you mean ?
1 - figure out why it failed
2 - fix the problem
3 - provision the system again.
Well, I have taken the questions as general BladeLogic Cleanup which includes everything....
I would do below if my clean up job fails....
1) Check, if I am using the BMC Recommended Cleanup script or not (there are many customization)
2) I would launch a BLCLI in subshell mode on the appserver by running below command:
$ blcli -v defaultProfile -r BLAdmins -m subshell
3) I will run the failed cleanup command, for example if database cleanup command fails, I will do below:
BLCLI> Delete cleanupDatabase <timeout in minutes>
Example: BLCLI> Delete cleanupDatabase 180
4) See the output displayed on the console and contact BMC Technical Support. If time out reached, increase the timeout.
Refer: https://docs.bmc.com/docs/display/public/bsa83/Changing%20Database%20Cleanup%20script%20options%20and%20commands for the cleanup commands.
We have known issues with running cleanup based on retention policy, in those cases, repeating the cleanup command followed by "
Delete executeRetentionPolicy" command works.
Thanks Bill and Isaac, I will review those documentation.
What cleanup are you referring to here ?
bill, in my scenerio the team that initiates the provisioning job does not have the authority to delete or manage objects. So if and when the process fails, I was trying to understand what are the things we cleanup from BSA before the provision can be restarted. For the mostpart i guess there is not much of a restart where it is left off but rather start at the beginning. In that case, I might have orphaned devices or things in a quassi provisioned state. I would like to take appropriate steps during the design so we can cater for restarts during faiures.
it depends on why something failed.
if there is something wrong w/ the system package, permissions or something like that then a role that has the right permissions will need to investigate and fix.
if it fails due to something outside bladelogic - eg, hardware, network, etc - then someone who has the ability to fix that will have to fix it, and you can probably restart the job.
normally when the job fails, the device object in bsa should be put back into the 'imported' group,
even during my development i notice some of the jobs fail when the mac is in imported group.
Error Apr 22, 2014 2:50:51 PM com.bladelogic.om.infra.mfw.util.BlException: A device with this MAC Address already exists
until i go delete from the imported group and rerun the job, it doesnt seem to be working. Is that as designed?
How are the devices being added ? manually or w/ autodiscover ?
Through the NSH script, not completely sure of the terminology (autodisover or manual).
blcli_execute Provision addMacAsDiscovered $MAC_ADDR
where the MAC_ADDR is passed as parameter.
PS: Still a newbie
I think you should add a check to see if the mac address exists first before blindly adding it, since you seem to be creating duplicates.
this script actually kicks off a provisioning job (pxe based rhel provisioning) and it completes successfully, registers to the application server
Guess now i have to figure out how to check for existence and clean up (is it prudent?) if mac exists.