Defrag daemon should ignore draining that it did not initiate


When condor_defrag scans the pool to look for machines to drain, and to count up machines that are already in the drain state, it should ignore machines that are draining, but which where not drained by condor_defrag.

We can do this by looking at the `DrainReason` attribute. Machines that were drained by condor_defrag will have `"Defrag"` as the value for `DrainReason`, Machines that were drained by condor_drain command will have some other value for the reason. Machines that were drained by pre 8.9.11 drain or defrag will not have a `DrainReason`, so we should presume that those machines were drained by condor_defrag for now, since that is consistent with the current behavior.


Greg Thain
January 13, 2021, 4:08 PM

Code Review

Looks good. in defrag.cpp, can we remove the commented out include of compat_classad.h, and remove the include of <sstream>, which I don’t think we need anymore?

Time remaining



John (TJ) Knoeller