A new Flexera Community experience is coming on November 25th. Click here for more information.
Im wondering how the "enable collection cleanup on failure" is related to the timer for "Automatically fail software requests with no change in status after xx hours".
If i have the timer set to 72 hours does App portal wait for 72 hours to confirm the failed deployment status before removing the device from a collection or is it possible that these settings conflict with each other?
‎Mar 10, 2021 12:12 PM
I thought that it was a great question as well, and I had to dig around a bit to remember the actual behavior, as collection cleans are not cut and dried.
For packages and task sequences, the cleanup will occur the first time that we get a status which matches those defined under settings->deployment->ConfigMgr for the setting "Program Collection Cleanup Status ID's" or Settings->deployment->OS Deployment for the setting "Task sequence collection cleanup status ID's". This, of course, assumes that you have the "remove from collection when complete" setting selected for your catalog item... Note that the monitor flag in the WD_PackageRequests is not taken into consideration for packages and Task Sequences.
Applications are a bit different in that they only get cleaned on a success, or *optionally, a failure..
First, you need to have the "remove from collection when complete" setting selected for your catalog item. If you have only this selected, then a cleanup will occur only on a successfully install.. Second, if you have the "Enable collection cleanup on failure" setting under settings->deployment->ConfigMgr selected, then the device will be removed from the collection on a failure. It is important to note that for applications, the "monitor" flag in WD_PackageRequests must be set to "0" (false), meaning that the application is no longer being monitored..
Long story short, It appears that App Broker is handling the cleanup correctly even when we receive an initial failure, and App Broker is waiting for a success ( See the setting "Monitor Threshold for failed deployments to prevent false flags" under settings->timers)
As an added bonus, if you have verbose logging enabled, you can look at the CollectionClean_<server>.log file, and see the actual query being used to get the list of requests which need to be cleaned.. The query will probably explain it better than I can 🙂
‎Mar 12, 2021 08:49 AM
To actually answer your question: The setting "Automatically fail software requests with no change in status after xx hours" is indirectly tied to collection cleanup... Once this timer elapses, App Broker will fail the request by setting the monitor flag = 0, and by writing a failure status into the LastStateID and LastStatusID columns in WD_PackageRequests.. The collection clean routine will pick up on the fact that the request is no longer being monitored, and has failed, so it should clean up the device from the collection at this point.
‎Mar 12, 2021 08:55 AM - edited ‎Mar 12, 2021 08:56 AM
That's a great question. I've actually wondered that myself before but never had time to look into it. My assumption is that the target stays in the collection until the timer expires, as if it doesn't, then the timer is kind of useless. Perhaps @CharlesW can provide some insight?
‎Mar 11, 2021 03:02 PM
I thought that it was a great question as well, and I had to dig around a bit to remember the actual behavior, as collection cleans are not cut and dried.
For packages and task sequences, the cleanup will occur the first time that we get a status which matches those defined under settings->deployment->ConfigMgr for the setting "Program Collection Cleanup Status ID's" or Settings->deployment->OS Deployment for the setting "Task sequence collection cleanup status ID's". This, of course, assumes that you have the "remove from collection when complete" setting selected for your catalog item... Note that the monitor flag in the WD_PackageRequests is not taken into consideration for packages and Task Sequences.
Applications are a bit different in that they only get cleaned on a success, or *optionally, a failure..
First, you need to have the "remove from collection when complete" setting selected for your catalog item. If you have only this selected, then a cleanup will occur only on a successfully install.. Second, if you have the "Enable collection cleanup on failure" setting under settings->deployment->ConfigMgr selected, then the device will be removed from the collection on a failure. It is important to note that for applications, the "monitor" flag in WD_PackageRequests must be set to "0" (false), meaning that the application is no longer being monitored..
Long story short, It appears that App Broker is handling the cleanup correctly even when we receive an initial failure, and App Broker is waiting for a success ( See the setting "Monitor Threshold for failed deployments to prevent false flags" under settings->timers)
As an added bonus, if you have verbose logging enabled, you can look at the CollectionClean_<server>.log file, and see the actual query being used to get the list of requests which need to be cleaned.. The query will probably explain it better than I can 🙂
‎Mar 12, 2021 08:49 AM
To actually answer your question: The setting "Automatically fail software requests with no change in status after xx hours" is indirectly tied to collection cleanup... Once this timer elapses, App Broker will fail the request by setting the monitor flag = 0, and by writing a failure status into the LastStateID and LastStatusID columns in WD_PackageRequests.. The collection clean routine will pick up on the fact that the request is no longer being monitored, and has failed, so it should clean up the device from the collection at this point.
‎Mar 12, 2021 08:55 AM - edited ‎Mar 12, 2021 08:56 AM