> On Dec. 8, 2014, 9:21 p.m., Bill Farner wrote: > > src/main/python/apache/aurora/admin/host_maintenance.py, line 85 > > <https://reviews.apache.org/r/28811/diff/1/?file=785748#file785748line85> > > > > Should this be: > > > > `self.check_if_drained(drainable_hostnames)` > > > > It seems strange that if we're watching 2 hosts, and 1 moves to > > DRAINED, we keep querying for its state. > > > > Coupled with the logging change in this diff, it appears that you'll > > keep logging the same hostnames over and over.
Not sure I understand. The `not_drained_hostnames =` assignment takes care of progressively reducing the logged hostset, so a DRAINED host will never show up in any of the subsequent iterations. > On Dec. 8, 2014, 9:21 p.m., Bill Farner wrote: > > src/main/python/apache/aurora/admin/host_maintenance.py, line 61 > > <https://reviews.apache.org/r/28811/diff/1/?file=785748#file785748line61> > > > > Can you elaborate why this is an improvement? AFAICT the former > > messaging was more accurate - we print out the hosts that you're waiting > > for, and will be queried/tracked. > > > > This change might make sense if we did _not_ do the initial DRAINED > > filtering here, and allow the caller to report that these hosts are ready. > > > > Finally - you should consider inlining this function - there's hardly > > any behavior here, and there's only one caller. The current log placement may generate an empty message when draining is done faster than the initial wait interval, giving a somewhat confusing user experience. The reordering here makes sure a user sees the initial draining batch in the log at least once. I am fine with inlining if it makes things easier to read. - Maxim ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/28811/#review64283 ----------------------------------------------------------- On Dec. 8, 2014, 9:13 p.m., Maxim Khutornenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/28811/ > ----------------------------------------------------------- > > (Updated Dec. 8, 2014, 9:13 p.m.) > > > Review request for Aurora and Bill Farner. > > > Bugs: AURORA-943 > https://issues.apache.org/jira/browse/AURORA-943 > > > Repository: aurora > > > Description > ------- > > Improving logging experience in admin drain_hosts. > > > Diffs > ----- > > src/main/python/apache/aurora/admin/host_maintenance.py > bff8afd2b52fdf3977f681a73c97000a38773498 > src/test/python/apache/aurora/admin/test_host_maintenance.py > 4b8072c0349a9b0905ebb249ed97c7dfe8e8b1de > > Diff: https://reviews.apache.org/r/28811/diff/ > > > Testing > ------- > > ./pants src/test/python/apache/aurora/admin:host_maintenance > > > Thanks, > > Maxim Khutornenko > >
