When calculating the global quota headroom, we subtract all unallocated reservations by doing
We only traverse roles with reservation. In the presence of hierarchal reservation, this is problematic. Consider a child role (e.g. "a/b") with no reservations, it can still get reserved resources if its ancestor has reservations (e.g. "a" has reservations). However, allocated reserved resources of role “a/b” will be ignored given the above code.
The consequence is that availableHeadroom will be underestimated because allocated reservations are underestimated. This would lead to excessive resources set aside for quota headroom.