if the command crashes, then it's most likely a bug that engineers will need to look into (you may need to file a ticket for that). To resolve the issue now, however, try to map to root and attempt an agent cleanup, or use another Role to run cleanup that is mapped to root.
We can use "cleanupAgent" using syntax,
blcli -v <authentication profile name> <blcli namespace> <command> <Arguments>
e.g. blcli -v Profile1 Delete cleanupAgent sever1 5
Thanks for replying.
Unfortunately we do not get root in our environment, not an option.
I'll open a ticket for this.
I've tried using blcli instead of blcli_execute as well - the result was the same.
Did you think blcli would behave differently?
i'd assume that you need to run this as a role that's mapped to root, or the user that owns the files/directories you want to delete on the target. afaik this command does not circumvent rbac.
can you run this as a role that maps to root on the target ?
We can't map to root.
I wonder is my environment the only one where mapping to root is restricted?
I fully understand that why we are having this issue, and I understand this is how Linux works.
It's not the problem. The problem is the crash, the unhandled exception that occurs on access denied when deletecleanupAgent encounters a directory on the agent that it has no access to. The crash stops the entire process, and I would expect it to be handled properly, logged as a warning and the process to proceed to the next item.
Posting a question here I was hoping to find out about some 'undocumented' switch to cleanupAgent (something like 'on error resume next') but i guess there isn't any.
I've opened a case with support on this.
yeah - i'm not sure what to tell you here - i think this command expects to be able to delete anything it wasn't to clean up, so maybe we can handle the failure better or maybe we can add a flag to the cleanup command to only handle objects owned by a certain user or something.
What was your support case #?
Did you get a solution that we can publish here on the public forum?
Thanks & Regards,
Jim (Forum Manager/Facilitator)
Jim, Don't know BMC support case # as we had a third-party opening cases with BMC for us. But this is the feedback I received from them: "BMC has issued a defect for this issue: QM001778083 You can monitor it here: http://www.bmc.com/support/support-news/100765881-23735.html. At this time it is scheduled for a future release. Please let me know if there is anything else I can do for you." I have not checked, maybe it is included with 8.3 release. Regards, AF
I traced the issue via the problem tracking record that you mentioned and in fact it is a Request For Enhancement
Here is the key information form the issue:
You were getting "java.io.IOException:...Operation Not permitted" errors when you tried to run a Delete cleanupAgent execution because it was requiring root access to the machines.
As a result, we filed an RFE (QM001778083) to allow you to run the job, but skip over the items you do not have authorization to delete.
In the interim, the only options available to you would be to add users into a common group and assign rwx permissions to that group or to monitor each time the job ran on a given server, outside of the ability to grant root access, which you have said is not an option.