Session rel for multiple action group (am I making this too hard?)

(imported topic written by Bill.Ehardt)

For our patching process, we create a baseline and deploy that out. Here’s what I want to do:

  1. Find any machines that failed/download failed on any part of the baseline.

  2. For all of those machines in step 1… get a report of everything that the action tried to do so those servers.

Our goal is to have something that we can give to people to say “yes, the patching did something so you should test” or “no, nothing was patched so don’t bother testing”.

For example, SERVER-1 tried to install MS11-073, MS11-074 and run a task called “Reboot servers with Auto Reboot setting”. It fixed the MS11-073 and reboot task, but it failed on MS11-074. I’d like the report to say:

SERVER-1, MS11-073, Fixed

SERVER-1, MS11-074, Failed

SERVER-1, Reboot servers with Auto Reboot setting", Fixed

I’ve got something, but part 2 is a monster that just times out.

  1. set of names of computers of results whose (status of it = bes action status failed or status of it = bes action status download failed) of member actions of bes action whose (id of it is 15341)

  2. (name of computer of it, name of action of it, status of it) of results whose (name of computer of it is contained by (set of names of computers of results whose (status of it = bes action status failed or status of it = bes action status download failed) of member actions of bes action whose (id of it is 15341)) AND status of it != bes action status irrelevant) of member actions of bes action whose (id of it is 15341)

I was thinking of doing some sort of intersection of sets based on computer name, but not sure if that is possible.

(imported comment written by Bill.Ehardt)

The annoying part is piece 1 is quick (seconds to run), or if I replace with relevance (for part 2) with the actual server names e.g.: (“Server-1”;“server-2”;“server-3”…;“Server-66”) it takes 2 seconds. I tried also to re-arrange the relevance being based off of bes computers with no luck.

Edit: Ok, I turned off time-out and it takes just under 4 mins. Maybe there is a way to speed this up.

(imported comment written by BenKus)

Maybe try something like this:

(, ) whose (item 1 contains item 0)

Here is a shot at it:

((set of names of computers of results whose (status of it = bes action status failed or status of it = bes action status download failed) of member actions of bes action whose (id of it is 15341)), ((name of computer of it, name of action of it, status of it) of results of member actions of bes action whose (id of it is 15341))) whose (item 0 of it contain (item 0 of item 1 of it))

I didn’t test it so there probably are some issues you will need to play with to get it to work…

Ben

(imported comment written by Bill.Ehardt)

Awesome Ben! This works great… final rel:

(item 0 of item 1 of it, item 1 of item 1 of it, item 2 of item 1 of it) of ((elements of set of names of computers of results whose (status of it = bes action status failed or status of it = bes action status download failed) of member actions of bes action whose (id of it is 15341)), ((name of computer of it, name of action of it, status of it) of results of member actions of bes action whose (id of it is 15341))) whose (item 0 of it contains (item 0 of item 1 of it))