)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"35f300156f9e25a9228645e10c954633b0f049ea","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This model is used to check amphora health"},{"line_number":10,"context_line":"Add a column \u0027busy\u0027 and primary key  for data table amphora health"},{"line_number":11,"context_line":"Add mutiprocessing code in cmd/health_manager, one for health check, the other is for UDP pacakge listening,"},{"line_number":12,"context_line":"which needs to work with Carlos\u0027s code---wip."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I8aeb6b82b58b59951a414e7c2e4c2c58c33a5d15"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":31,"id":"1a4dcd0f_cd66f0ba","line":12,"updated":"2015-08-11 17:21:52.000000000","message":"Let\u0027s remove the last sentence about Carlos\u0027s code and WIP.\nI think this is close to merge","commit_id":"b9fa090c4c1fd9132e216592a266740443a4fa0b"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"1f9ff65583fabf9031e55773bf36e3b02545f7b0","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This model is used to check amphora health"},{"line_number":10,"context_line":"Add a column \u0027busy\u0027 and primary key  for data table amphora health"},{"line_number":11,"context_line":"Add mutiprocessing code in cmd/health_manager, one for health check, the other is for UDP pacakge listening,"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Co-Authored-By: Michael Johnson \u003cjohnsomor@gmail.com\u003e"},{"line_number":14,"context_line":"Co-Authored-By: min wang \u003cswiftwangster@gmail.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":43,"id":"da20952f_508f3f23","line":11,"updated":"2015-08-27 03:54:15.000000000","message":"This should be more detailed, but we all need to work on that.","commit_id":"1bc3dddcd2001ac0c09f6032870004b7ca63d515"}],"etc/octavia.conf":[{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"72a8f6b7c245f81f40aff44dc464782707ca6c1b","unresolved":false,"context_lines":[{"line_number":34,"context_line":"[health_manager]"},{"line_number":35,"context_line":"# failover_threads \u003d 10"},{"line_number":36,"context_line":"# interval \u003d 3"},{"line_number":37,"context_line":"# heartbeat_timeout \u003d 10"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"[keystone_authtoken]"},{"line_number":40,"context_line":"# auth_uri \u003d https://localhost:5000/v3"}],"source_content_type":"text/plain","patch_set":42,"id":"fa1b9901_9e2361a7","line":37,"updated":"2015-08-25 11:32:00.000000000","message":"I believe it would be good to specify units in conf file. Either by adding a comment \"timeout in seconds\" or changing the attribute name to \"heartbeat_timeout_sec\"","commit_id":"91cb8a2ea44eec134d8859d0c7e453af92bca874"}],"octavia/cmd/health_manager.py":[{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"fce3795d7a91a8993f24ee5260d31a12f8deeb4a","unresolved":false,"context_lines":[{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class HeartbeatProcess():"},{"line_number":31,"context_line":"    def __init__(self, RUN):"},{"line_number":32,"context_line":"        self.RUN \u003d RUN"},{"line_number":33,"context_line":"        self.hm \u003d health_manager.HealthManager()"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a50d1a3_de4824cf","line":30,"updated":"2015-07-24 22:29:53.000000000","message":"change to ListenerProcess(Process)","commit_id":"eb6fdb7028b6ef897997cddfd696095e6d233915"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"fce3795d7a91a8993f24ee5260d31a12f8deeb4a","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        self.hm \u003d health_manager.HealthManager()"},{"line_number":34,"context_line":"        print (\u0027Initialized Heartbeat Process.\u0027)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def do_health_check(self):"},{"line_number":37,"context_line":"        time.sleep(5)"},{"line_number":38,"context_line":"        self.hm.health_check()"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a50d1a3_fe45e0b2","line":36,"updated":"2015-07-24 22:29:53.000000000","message":"remove","commit_id":"eb6fdb7028b6ef897997cddfd696095e6d233915"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"fce3795d7a91a8993f24ee5260d31a12f8deeb4a","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        time.sleep(5)"},{"line_number":38,"context_line":"        self.hm.health_check()"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def listen_pool(self):"},{"line_number":41,"context_line":"        # to do by Carlos"},{"line_number":42,"context_line":"        pass"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a50d1a3_be1678a5","line":40,"updated":"2015-07-24 22:29:53.000000000","message":"call this run()","commit_id":"eb6fdb7028b6ef897997cddfd696095e6d233915"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"fce3795d7a91a8993f24ee5260d31a12f8deeb4a","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        # to do by Carlos"},{"line_number":42,"context_line":"        pass"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def run(self):"},{"line_number":45,"context_line":"        s \u003d signal.signal(signal.SIGINT, signal.SIG_IGN)"},{"line_number":46,"context_line":"        threading.Thread(target\u003dself.listen_pool()).start()"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a50d1a3_5e0bb47d","line":44,"updated":"2015-07-24 22:29:53.000000000","message":"remove","commit_id":"eb6fdb7028b6ef897997cddfd696095e6d233915"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"fce3795d7a91a8993f24ee5260d31a12f8deeb4a","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        pass"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def run(self):"},{"line_number":45,"context_line":"        s \u003d signal.signal(signal.SIGINT, signal.SIG_IGN)"},{"line_number":46,"context_line":"        threading.Thread(target\u003dself.listen_pool()).start()"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        while self.RUN.value:"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a50d1a3_9e8e1c26","line":45,"updated":"2015-07-24 22:29:53.000000000","message":"not sure why we need signals","commit_id":"eb6fdb7028b6ef897997cddfd696095e6d233915"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"fce3795d7a91a8993f24ee5260d31a12f8deeb4a","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def run(self):"},{"line_number":45,"context_line":"        s \u003d signal.signal(signal.SIGINT, signal.SIG_IGN)"},{"line_number":46,"context_line":"        threading.Thread(target\u003dself.listen_pool()).start()"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        while self.RUN.value:"},{"line_number":49,"context_line":"            self.do_health_check()"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a50d1a3_7e9d5058","line":46,"updated":"2015-07-24 22:29:53.000000000","message":"why are we running this in a thread instead of a process?","commit_id":"eb6fdb7028b6ef897997cddfd696095e6d233915"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"fce3795d7a91a8993f24ee5260d31a12f8deeb4a","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        signal.signal(signal.SIGINT, s)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"class HM_Process(multiprocessing.Process):"},{"line_number":55,"context_line":"    def __init__(self):"},{"line_number":56,"context_line":"        multiprocessing.Process.__init__(self)"},{"line_number":57,"context_line":"        self.RUN \u003d True"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a50d1a3_9eb5bcd1","line":54,"updated":"2015-07-24 22:29:53.000000000","message":"This class feels like an unnecessary complication","commit_id":"eb6fdb7028b6ef897997cddfd696095e6d233915"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"fce3795d7a91a8993f24ee5260d31a12f8deeb4a","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def run(self):"},{"line_number":60,"context_line":"        self.RUN.value \u003d True"},{"line_number":61,"context_line":"        heartbeat \u003d HeartbeatProcess(self.RUN)"},{"line_number":62,"context_line":"        heartbeat.run()"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def stop_working(self):"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a50d1a3_be2f58f5","line":61,"updated":"2015-07-24 22:29:53.000000000","message":"this passed int he value so whatever you di will never stop","commit_id":"eb6fdb7028b6ef897997cddfd696095e6d233915"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"fce3795d7a91a8993f24ee5260d31a12f8deeb4a","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"def main():"},{"line_number":69,"context_line":"    service.prepare_service(sys.argv)"},{"line_number":70,"context_line":"    hm_process \u003d HM_Process()"},{"line_number":71,"context_line":"    hm_process.start()"},{"line_number":72,"context_line":"    while 1:"},{"line_number":73,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a50d1a3_5e59748d","line":70,"updated":"2015-07-24 22:29:53.000000000","message":"replace with:\n\np \u003d ListenerProcess()\np.start()\nwhile True:\n  try:\n       time.sleep(5)\t37\n        self.hm.health_check()\nexcept KeyboardInterrupt:\n  p.terminate()","commit_id":"eb6fdb7028b6ef897997cddfd696095e6d233915"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"753742484eef96279586ef512f522af84c888921","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class ListenerProcess(multiprocessing.Process):"},{"line_number":29,"context_line":"    def __init__(self):"},{"line_number":30,"context_line":"        multiprocessing.Process.__init__(self)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def run(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a50d1a3_3485a858","line":29,"updated":"2015-07-24 22:57:31.000000000","message":"You can probably skip that, too","commit_id":"94bbd27b729b410b3860c69aaad77902a0985cc4"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"753742484eef96279586ef512f522af84c888921","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    while 1:"},{"line_number":42,"context_line":"        try:"},{"line_number":43,"context_line":"            time.sleep(5)"},{"line_number":44,"context_line":"            hm \u003d health_manager()"},{"line_number":45,"context_line":"            hm.health_check()"},{"line_number":46,"context_line":"        except KeyboardInterrupt:"},{"line_number":47,"context_line":"            listener_pro.terminate()"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a50d1a3_f47e6069","line":44,"updated":"2015-07-24 22:57:31.000000000","message":"move that out of the loop","commit_id":"94bbd27b729b410b3860c69aaad77902a0985cc4"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"289283a6f869a8ef8efcfe2ffafa08aa26e2615e","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"def HM_listener():"},{"line_number":32,"context_line":"    while True:"},{"line_number":33,"context_line":"        time.sleep(CONF.health_manager.heartbeat_timeout)"},{"line_number":34,"context_line":"        # to do by Carlos"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"3a50d1a3_729fd250","line":33,"updated":"2015-07-30 19:45:49.000000000","message":"i dont see how this sleep has anything to do with what the description of heartbeat_timeout says it does.  since the listener is just binding to a socket and listening, is this needed?","commit_id":"ae35e1c99d5c1d3097ddb486c53c86a8e98aad17"},{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"72a8f6b7c245f81f40aff44dc464782707ca6c1b","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    while True:"},{"line_number":39,"context_line":"        time.sleep(CONF.health_manager.interval)"},{"line_number":40,"context_line":"        hm \u003d health_manager.HealthManager()"},{"line_number":41,"context_line":"        hm.health_check()"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":42,"id":"fa1b9901_e12ae68f","line":41,"updated":"2015-08-25 11:32:00.000000000","message":"I may be wrong but isn\u0027t it redundant to have the interval checks for calling health manager logic at both files viz; here and octavia/controller/healthmanager/health_manager.py ? Unless there\u0027s the possibility of exception raising in the ThreadPoolExecutor under the other file.\n\nAlso, I think it\u0027s better to instantiate the class outside the loop.","commit_id":"91cb8a2ea44eec134d8859d0c7e453af92bca874"},{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"7174d41571fe9c1a8bd1d43314ad39345505a7de","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    while True:"},{"line_number":39,"context_line":"        time.sleep(CONF.health_manager.interval)"},{"line_number":40,"context_line":"        hm \u003d health_manager.HealthManager()"},{"line_number":41,"context_line":"        hm.health_check()"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":42,"id":"fa1b9901_078b4ec4","line":41,"in_reply_to":"fa1b9901_addff9d4","updated":"2015-08-25 20:31:10.000000000","message":"Didn\u0027t know that. Thanks for clarifying.","commit_id":"91cb8a2ea44eec134d8859d0c7e453af92bca874"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"1b65a6a11a546ae1ac0ff75e985e7f7cd7171efb","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    while True:"},{"line_number":39,"context_line":"        time.sleep(CONF.health_manager.interval)"},{"line_number":40,"context_line":"        hm \u003d health_manager.HealthManager()"},{"line_number":41,"context_line":"        hm.health_check()"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":42,"id":"fa1b9901_addff9d4","line":41,"in_reply_to":"fa1b9901_e12ae68f","updated":"2015-08-25 14:09:28.000000000","message":"Both were fixed in a separate patch as this one was expected to merge.","commit_id":"91cb8a2ea44eec134d8859d0c7e453af92bca874"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"1f9ff65583fabf9031e55773bf36e3b02545f7b0","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        for process in processes:"},{"line_number":61,"context_line":"            process.join()"},{"line_number":62,"context_line":"    except KeyboardInterrupt:"},{"line_number":63,"context_line":"        LOG.info(_LI(\"Health Manager existing due to signal\"))"}],"source_content_type":"text/x-python","patch_set":43,"id":"da20952f_30872b11","line":63,"updated":"2015-08-27 03:54:15.000000000","message":"s/existing/exiting","commit_id":"1bc3dddcd2001ac0c09f6032870004b7ca63d515"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"2a2937ec3c300920fcb13ec2a563456404f837b1","unresolved":false,"context_lines":[{"line_number":31,"context_line":"def HM_listener():"},{"line_number":32,"context_line":"    while True:"},{"line_number":33,"context_line":"        time.sleep(5)"},{"line_number":34,"context_line":"        # to do by Carlos"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def HM_health_check():"}],"source_content_type":"text/x-python","patch_set":46,"id":"da20952f_8efbb946","line":34,"updated":"2015-08-31 20:19:42.000000000","message":"can we follow this guidelines  # TODO(name): what todo","commit_id":"38d3e09e1f492abccf42d98ce8e4bac0721e8b28"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"db39ee8b795e062e5ff27b9a5959ce43429682b2","unresolved":false,"context_lines":[{"line_number":31,"context_line":"def HM_listener():"},{"line_number":32,"context_line":"    while True:"},{"line_number":33,"context_line":"        time.sleep(5)"},{"line_number":34,"context_line":"        # to do by Carlos"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def HM_health_check():"}],"source_content_type":"text/x-python","patch_set":46,"id":"da20952f_c185c4ad","line":34,"in_reply_to":"da20952f_8efbb946","updated":"2015-09-01 20:58:28.000000000","message":"Normally yes, but this literally goes away immediately in the next CR so I\u0027m not worried about it.","commit_id":"38d3e09e1f492abccf42d98ce8e4bac0721e8b28"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"2a2937ec3c300920fcb13ec2a563456404f837b1","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        for process in processes:"},{"line_number":61,"context_line":"            process.join()"},{"line_number":62,"context_line":"    except KeyboardInterrupt:"},{"line_number":63,"context_line":"        LOG.info(_LI(\"Health Manager existing due to signal\"))"}],"source_content_type":"text/x-python","patch_set":46,"id":"da20952f_68d3b8d5","line":63,"updated":"2015-08-31 20:19:42.000000000","message":"should we add terminate() ?","commit_id":"38d3e09e1f492abccf42d98ce8e4bac0721e8b28"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"db39ee8b795e062e5ff27b9a5959ce43429682b2","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        for process in processes:"},{"line_number":61,"context_line":"            process.join()"},{"line_number":62,"context_line":"    except KeyboardInterrupt:"},{"line_number":63,"context_line":"        LOG.info(_LI(\"Health Manager existing due to signal\"))"}],"source_content_type":"text/x-python","patch_set":46,"id":"da20952f_e16b28f0","line":63,"in_reply_to":"da20952f_68d3b8d5","updated":"2015-09-01 20:58:28.000000000","message":"Good catch, this should be \"Health Manager exiting due to signal.\"\nSmall typo.","commit_id":"38d3e09e1f492abccf42d98ce8e4bac0721e8b28"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"4df87d6f52300deeca365599e58b23be2317c4ee","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        for process in processes:"},{"line_number":61,"context_line":"            process.join()"},{"line_number":62,"context_line":"    except KeyboardInterrupt:"},{"line_number":63,"context_line":"        LOG.info(_LI(\"Health Manager existing due to signal\"))"}],"source_content_type":"text/x-python","patch_set":46,"id":"da20952f_9709002f","line":63,"in_reply_to":"da20952f_e16b28f0","updated":"2015-09-03 08:55:47.000000000","message":"Err, just realized my wording here was not great -- I meant to have an \"and\" there. Yes, this should probably terminate() the processes.","commit_id":"38d3e09e1f492abccf42d98ce8e4bac0721e8b28"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"6c9f0e6583cf6bb8114fd10a8d4267777463d7dd","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    try:"},{"line_number":60,"context_line":"        for process in processes:"},{"line_number":61,"context_line":"            process.join()"},{"line_number":62,"context_line":"    except KeyboardInterrupt:"},{"line_number":63,"context_line":"        LOG.info(_LI(\"Health Manager existing due to signal\"))"}],"source_content_type":"text/x-python","patch_set":47,"id":"da20952f_9757c001","line":62,"updated":"2015-09-03 08:57:16.000000000","message":"As Banashankar pointed out last patchset, this should probably terminate() all of the processes on interrupt.","commit_id":"f601e1e3b6b3ed63c5ae072b302888e66e134d34"}],"octavia/common/config.py":[{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"d91748853f03b2b43e75744cdbc775cb11d0941f","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"healthmanager_opts \u003d ["},{"line_number":85,"context_line":"    cfg.IntOpt(\u0027sleep_time\u0027, default\u003d3, help\u003d_(\u0027sleep time between health \u0027"},{"line_number":86,"context_line":"                                               \u0027check\u0027)),"},{"line_number":87,"context_line":"    cfg.IntOpt(\u0027time_stamp\u0027, default\u003d10, help\u003d_(\u0027A timestamp which\u0027"},{"line_number":88,"context_line":"                                                \u0027 is set for getting\u0027"},{"line_number":89,"context_line":"                                                \u0027stale amphora time\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_b7d77abe","line":86,"updated":"2015-07-20 22:32:56.000000000","message":"We need to specify the unit here.\n\"Sleep time between health checks in seconds.\"","commit_id":"d817c3d2a918e7fe7fc97b9956edfe7fbdad218d"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"d91748853f03b2b43e75744cdbc775cb11d0941f","unresolved":false,"context_lines":[{"line_number":84,"context_line":"healthmanager_opts \u003d ["},{"line_number":85,"context_line":"    cfg.IntOpt(\u0027sleep_time\u0027, default\u003d3, help\u003d_(\u0027sleep time between health \u0027"},{"line_number":86,"context_line":"                                               \u0027check\u0027)),"},{"line_number":87,"context_line":"    cfg.IntOpt(\u0027time_stamp\u0027, default\u003d10, help\u003d_(\u0027A timestamp which\u0027"},{"line_number":88,"context_line":"                                                \u0027 is set for getting\u0027"},{"line_number":89,"context_line":"                                                \u0027stale amphora time\u0027"},{"line_number":90,"context_line":"                                                \u0027 (default: 10s)\u0027)),"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_f770a2de","line":87,"updated":"2015-07-20 22:32:56.000000000","message":"Maybe:\n\"Interval, in seconds, to wait before failing over an amphora.\"","commit_id":"d817c3d2a918e7fe7fc97b9956edfe7fbdad218d"},{"author":{"_account_id":10477,"name":"min wang","email":"swiftwangster@gmail.com","username":"minwang"},"change_message_id":"812ebf9fa3000b88adf2409016b481741fed0df5","unresolved":false,"context_lines":[{"line_number":84,"context_line":"healthmanager_opts \u003d ["},{"line_number":85,"context_line":"    cfg.IntOpt(\u0027sleep_time\u0027, default\u003d3, help\u003d_(\u0027sleep time between health \u0027"},{"line_number":86,"context_line":"                                               \u0027check\u0027)),"},{"line_number":87,"context_line":"    cfg.IntOpt(\u0027time_stamp\u0027, default\u003d10, help\u003d_(\u0027A timestamp which\u0027"},{"line_number":88,"context_line":"                                                \u0027 is set for getting\u0027"},{"line_number":89,"context_line":"                                                \u0027stale amphora time\u0027"},{"line_number":90,"context_line":"                                                \u0027 (default: 10s)\u0027)),"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_3d64ab47","line":87,"in_reply_to":"3a50d1a3_f770a2de","updated":"2015-07-20 23:38:42.000000000","message":"thanks for the input, will change them abased on the suggestion above.","commit_id":"d817c3d2a918e7fe7fc97b9956edfe7fbdad218d"},{"author":{"_account_id":10806,"name":"Trevor Vardeman","email":"tvardema@redhat.com","username":"tvardeman"},"change_message_id":"a06dc76017263016e645fab709ec88dc1c6fe476","unresolved":false,"context_lines":[{"line_number":82,"context_line":"]"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"healthmanager_opts \u003d ["},{"line_number":85,"context_line":"    cfg.IntOpt(\u0027sleep_time\u0027, default\u003d3, help\u003d_(\u0027Sleep time between health \u0027"},{"line_number":86,"context_line":"                                               \u0027checks in seconds.\u0027)),"},{"line_number":87,"context_line":"    cfg.IntOpt(\u0027time_stamp\u0027, default\u003d10, help\u003d_(\u0027Interval, in seconds, to \u0027"},{"line_number":88,"context_line":"                                                \u0027wait before failing over \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_4d0afb22","line":85,"updated":"2015-07-21 17:01:22.000000000","message":"nit: should probably call this \"interval\"","commit_id":"3f511d1e6d66d452c2cddf2f8fed3be0665eef32"},{"author":{"_account_id":10806,"name":"Trevor Vardeman","email":"tvardema@redhat.com","username":"tvardeman"},"change_message_id":"a06dc76017263016e645fab709ec88dc1c6fe476","unresolved":false,"context_lines":[{"line_number":84,"context_line":"healthmanager_opts \u003d ["},{"line_number":85,"context_line":"    cfg.IntOpt(\u0027sleep_time\u0027, default\u003d3, help\u003d_(\u0027Sleep time between health \u0027"},{"line_number":86,"context_line":"                                               \u0027checks in seconds.\u0027)),"},{"line_number":87,"context_line":"    cfg.IntOpt(\u0027time_stamp\u0027, default\u003d10, help\u003d_(\u0027Interval, in seconds, to \u0027"},{"line_number":88,"context_line":"                                                \u0027wait before failing over \u0027"},{"line_number":89,"context_line":"                                                \u0027an amphora.\u0027)),"},{"line_number":90,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_ea540d22","line":87,"updated":"2015-07-21 17:01:22.000000000","message":"nit: timestamp is one word.","commit_id":"3f511d1e6d66d452c2cddf2f8fed3be0665eef32"},{"author":{"_account_id":10477,"name":"min wang","email":"swiftwangster@gmail.com","username":"minwang"},"change_message_id":"ac1c1bb5ec9f1a3117271fc6075125d52b8efe9a","unresolved":false,"context_lines":[{"line_number":84,"context_line":"healthmanager_opts \u003d ["},{"line_number":85,"context_line":"    cfg.IntOpt(\u0027sleep_time\u0027, default\u003d3, help\u003d_(\u0027Sleep time between health \u0027"},{"line_number":86,"context_line":"                                               \u0027checks in seconds.\u0027)),"},{"line_number":87,"context_line":"    cfg.IntOpt(\u0027time_stamp\u0027, default\u003d10, help\u003d_(\u0027Interval, in seconds, to \u0027"},{"line_number":88,"context_line":"                                                \u0027wait before failing over \u0027"},{"line_number":89,"context_line":"                                                \u0027an amphora.\u0027)),"},{"line_number":90,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_7983f556","line":87,"in_reply_to":"3a50d1a3_ea540d22","updated":"2015-07-21 17:42:41.000000000","message":"thanks for the input, will correct them based on the suggestion","commit_id":"3f511d1e6d66d452c2cddf2f8fed3be0665eef32"},{"author":{"_account_id":7398,"name":"Carlos Garza","email":"carlos.garza@rackspace.com","username":"crc32"},"change_message_id":"5693ca9ed6b51615f2b3b8fb7d922515f11d7d3a","unresolved":false,"context_lines":[{"line_number":84,"context_line":"healthmanager_opts \u003d ["},{"line_number":85,"context_line":"    cfg.IntOpt(\u0027interval\u0027, default\u003d3, help\u003d_(\u0027Sleep time between health \u0027"},{"line_number":86,"context_line":"                                               \u0027checks in seconds.\u0027)),"},{"line_number":87,"context_line":"    cfg.IntOpt(\u0027timestamp\u0027, default\u003d10, help\u003d_(\u0027Interval, in seconds, to \u0027"},{"line_number":88,"context_line":"                                                \u0027wait before failing over \u0027"},{"line_number":89,"context_line":"                                                \u0027an amphora.\u0027)),"},{"line_number":90,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_8c546cff","line":87,"updated":"2015-07-22 03:45:48.000000000","message":"Can you name this ssomething other then \"timestamp\" since its more of a TTL countdown untill the amp is considered stale.","commit_id":"efc15f13868c3d32d8c2bb63f62096ebdc34d237"},{"author":{"_account_id":10477,"name":"min wang","email":"swiftwangster@gmail.com","username":"minwang"},"change_message_id":"a486b04c138dbad3b029c7f001be32e7103bd702","unresolved":false,"context_lines":[{"line_number":84,"context_line":"healthmanager_opts \u003d ["},{"line_number":85,"context_line":"    cfg.IntOpt(\u0027interval\u0027, default\u003d3, help\u003d_(\u0027Sleep time between health \u0027"},{"line_number":86,"context_line":"                                               \u0027checks in seconds.\u0027)),"},{"line_number":87,"context_line":"    cfg.IntOpt(\u0027timestamp\u0027, default\u003d10, help\u003d_(\u0027Interval, in seconds, to \u0027"},{"line_number":88,"context_line":"                                                \u0027wait before failing over \u0027"},{"line_number":89,"context_line":"                                                \u0027an amphora.\u0027)),"},{"line_number":90,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_3c2e7b43","line":87,"in_reply_to":"3a50d1a3_8c546cff","updated":"2015-07-22 17:54:29.000000000","message":"how about waiting_time?","commit_id":"efc15f13868c3d32d8c2bb63f62096ebdc34d237"}],"octavia/common/service.py":[{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"d91748853f03b2b43e75744cdbc775cb11d0941f","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    argv \u003d argv or []"},{"line_number":27,"context_line":"    config.init(argv[1:])"},{"line_number":28,"context_line":"    LOG.info(_LI(\u0027Starting Octavia API server\u0027))"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    log.set_defaults()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    config.setup_logging(cfg.CONF)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_975fde40","line":29,"updated":"2015-07-20 22:32:56.000000000","message":"We should not check this in if it is only white space changes.","commit_id":"d817c3d2a918e7fe7fc97b9956edfe7fbdad218d"},{"author":{"_account_id":10477,"name":"min wang","email":"swiftwangster@gmail.com","username":"minwang"},"change_message_id":"812ebf9fa3000b88adf2409016b481741fed0df5","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    argv \u003d argv or []"},{"line_number":27,"context_line":"    config.init(argv[1:])"},{"line_number":28,"context_line":"    LOG.info(_LI(\u0027Starting Octavia API server\u0027))"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    log.set_defaults()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    config.setup_logging(cfg.CONF)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_3dcb4b20","line":29,"in_reply_to":"3a50d1a3_975fde40","updated":"2015-07-20 23:38:42.000000000","message":"will delete the extra space line.","commit_id":"d817c3d2a918e7fe7fc97b9956edfe7fbdad218d"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"289283a6f869a8ef8efcfe2ffafa08aa26e2615e","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    config.init(argv[1:])"},{"line_number":28,"context_line":"    LOG.info(_LI(\u0027Starting Octavia API server\u0027))"},{"line_number":29,"context_line":"    log.set_defaults()"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    config.setup_logging(cfg.CONF)"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a50d1a3_72f4b286","line":30,"updated":"2015-07-30 19:45:49.000000000","message":"no need to have this whitespace.   not relevant to the review","commit_id":"ae35e1c99d5c1d3097ddb486c53c86a8e98aad17"}],"octavia/controller/healthmanager/health_manager.py":[{"author":{"_account_id":12403,"name":"Al Miller","email":"al.miller@ajmiller.net","username":"ajmiller"},"change_message_id":"24adc8d464256d09f1ed402116c5a4e2aa239d8e","unresolved":false,"context_lines":[{"line_number":40,"context_line":"            res \u003d self.amphora_health_repo.get_expired_amphorae("},{"line_number":41,"context_line":"                session)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"            if len(res) is not 0:"},{"line_number":44,"context_line":"                # Todo(mwang) initiate failover"},{"line_number":45,"context_line":"                pass"},{"line_number":46,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aa745d1_72acbeed","line":43,"updated":"2015-04-15 22:13:46.000000000","message":"TODOs need to be done...","commit_id":"7bd162c88fa5f1c5d113e65b9938759304bbc96b"},{"author":{"_account_id":10477,"name":"min wang","email":"swiftwangster@gmail.com","username":"minwang"},"change_message_id":"40ebbd83c85051b5edc1346dcf87d52c5a000307","unresolved":false,"context_lines":[{"line_number":40,"context_line":"            res \u003d self.amphora_health_repo.get_expired_amphorae("},{"line_number":41,"context_line":"                session)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"            if len(res) is not 0:"},{"line_number":44,"context_line":"                # Todo(mwang) initiate failover"},{"line_number":45,"context_line":"                pass"},{"line_number":46,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aa745d1_b2800648","line":43,"in_reply_to":"5aa745d1_72acbeed","updated":"2015-04-15 22:14:56.000000000","message":"will change it","commit_id":"7bd162c88fa5f1c5d113e65b9938759304bbc96b"},{"author":{"_account_id":10477,"name":"min wang","email":"swiftwangster@gmail.com","username":"minwang"},"change_message_id":"b64053b4966303ec32d551a3255388f05d6e73db","unresolved":false,"context_lines":[{"line_number":40,"context_line":"            res \u003d self.amphora_health_repo.get_expired_amphorae("},{"line_number":41,"context_line":"                session)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"            if len(res) is not 0:"},{"line_number":44,"context_line":"                # Todo(mwang) initiate failover"},{"line_number":45,"context_line":"                pass"},{"line_number":46,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aa745d1_630a8dd4","line":43,"in_reply_to":"5aa745d1_b2800648","updated":"2015-04-16 17:11:22.000000000","message":"Michael is working on this part","commit_id":"7bd162c88fa5f1c5d113e65b9938759304bbc96b"},{"author":{"_account_id":10806,"name":"Trevor Vardeman","email":"tvardema@redhat.com","username":"tvardeman"},"change_message_id":"a06dc76017263016e645fab709ec88dc1c6fe476","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        while True:"},{"line_number":44,"context_line":"            time.sleep(CONF.health_manager.sleep_time)"},{"line_number":45,"context_line":"            while True:"},{"line_number":46,"context_line":"                # get a staled amphora"},{"line_number":47,"context_line":"                res \u003d self.amp_health_repo.get_stale_amphorae(session)"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_0d74f365","line":45,"updated":"2015-07-21 17:01:22.000000000","message":"You won\u0027t need a second while loop here.  If you ran this right now, and res was equal to \"None\", it would infinitely loop in place without doing the sleep.  After removing the second \"while True\", you\u0027ll also need to remove the \"break\" inside the if body below, because you\u0027ll just want it to iterate with the sleeps appropriately between checks regardless of failover behavior.","commit_id":"3f511d1e6d66d452c2cddf2f8fed3be0665eef32"},{"author":{"_account_id":10806,"name":"Trevor Vardeman","email":"tvardema@redhat.com","username":"tvardeman"},"change_message_id":"a06dc76017263016e645fab709ec88dc1c6fe476","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                res \u003d self.amp_health_repo.get_stale_amphorae(session)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"                if res is not None:"},{"line_number":50,"context_line":"                    # make sure only one writing operation is happening by"},{"line_number":51,"context_line":"                    # using lock"},{"line_number":52,"context_line":"                    thread_event.set()"},{"line_number":53,"context_line":"                    # fail over process for the staled amphora"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_0dfb93c2","line":50,"updated":"2015-07-21 17:01:22.000000000","message":"nit:  \"lock to ensure only one write operation\"","commit_id":"3f511d1e6d66d452c2cddf2f8fed3be0665eef32"},{"author":{"_account_id":10806,"name":"Trevor Vardeman","email":"tvardema@redhat.com","username":"tvardeman"},"change_message_id":"a06dc76017263016e645fab709ec88dc1c6fe476","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                    # make sure only one writing operation is happening by"},{"line_number":51,"context_line":"                    # using lock"},{"line_number":52,"context_line":"                    thread_event.set()"},{"line_number":53,"context_line":"                    # fail over process for the staled amphora"},{"line_number":54,"context_line":"                    self.cw.failover_amphora(res.id)"},{"line_number":55,"context_line":"                    # update the busy status of the staled amphora"},{"line_number":56,"context_line":"                    self.amp_health_repo.update(session, res.id, busy\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_cd6dab99","line":53,"updated":"2015-07-21 17:01:22.000000000","message":"nit-typo:  \"stale\"","commit_id":"3f511d1e6d66d452c2cddf2f8fed3be0665eef32"},{"author":{"_account_id":10806,"name":"Trevor Vardeman","email":"tvardema@redhat.com","username":"tvardeman"},"change_message_id":"a06dc76017263016e645fab709ec88dc1c6fe476","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                    thread_event.set()"},{"line_number":53,"context_line":"                    # fail over process for the staled amphora"},{"line_number":54,"context_line":"                    self.cw.failover_amphora(res.id)"},{"line_number":55,"context_line":"                    # update the busy status of the staled amphora"},{"line_number":56,"context_line":"                    self.amp_health_repo.update(session, res.id, busy\u003dFalse)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"                    # thread unclocking"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_8dbb23e5","line":55,"updated":"2015-07-21 17:01:22.000000000","message":"nit-typo: \"stale\"","commit_id":"3f511d1e6d66d452c2cddf2f8fed3be0665eef32"},{"author":{"_account_id":10806,"name":"Trevor Vardeman","email":"tvardema@redhat.com","username":"tvardeman"},"change_message_id":"a06dc76017263016e645fab709ec88dc1c6fe476","unresolved":false,"context_lines":[{"line_number":55,"context_line":"                    # update the busy status of the staled amphora"},{"line_number":56,"context_line":"                    self.amp_health_repo.update(session, res.id, busy\u003dFalse)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"                    # thread unclocking"},{"line_number":59,"context_line":"                    thread_event.clear()"},{"line_number":60,"context_line":"                    break"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_4dde7b40","line":58,"updated":"2015-07-21 17:01:22.000000000","message":"nit: \"unlock thread\"","commit_id":"3f511d1e6d66d452c2cddf2f8fed3be0665eef32"},{"author":{"_account_id":7398,"name":"Carlos Garza","email":"carlos.garza@rackspace.com","username":"crc32"},"change_message_id":"d0edce4b2a11b10f79b129b35b459718dd7d877a","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"            if res is not None:"},{"line_number":50,"context_line":"                # lock to ensure only one write operation"},{"line_number":51,"context_line":"                thread_event.set()"},{"line_number":52,"context_line":"                # fail over process for the stale amphora"},{"line_number":53,"context_line":"                self.cw.failover_amphora(res.id)"},{"line_number":54,"context_line":"                # update the busy status of the stale amphora"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_8c678c4c","line":51,"updated":"2015-07-22 04:13:11.000000000","message":"Where is the other thread that participates in this lock? (The one that\u0027s calling wait? Also be advised if you use fork then this locking mechanism will not function for you.","commit_id":"efc15f13868c3d32d8c2bb63f62096ebdc34d237"},{"author":{"_account_id":10477,"name":"min wang","email":"swiftwangster@gmail.com","username":"minwang"},"change_message_id":"a486b04c138dbad3b029c7f001be32e7103bd702","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"            if res is not None:"},{"line_number":50,"context_line":"                # lock to ensure only one write operation"},{"line_number":51,"context_line":"                thread_event.set()"},{"line_number":52,"context_line":"                # fail over process for the stale amphora"},{"line_number":53,"context_line":"                self.cw.failover_amphora(res.id)"},{"line_number":54,"context_line":"                # update the busy status of the stale amphora"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_7c32c3f3","line":51,"in_reply_to":"3a50d1a3_8c678c4c","updated":"2015-07-22 17:54:29.000000000","message":"at this moment, we did not fork the 2 child thread yet, it is still wip.","commit_id":"efc15f13868c3d32d8c2bb63f62096ebdc34d237"},{"author":{"_account_id":7398,"name":"Carlos Garza","email":"carlos.garza@rackspace.com","username":"crc32"},"change_message_id":"d0edce4b2a11b10f79b129b35b459718dd7d877a","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                # fail over process for the stale amphora"},{"line_number":53,"context_line":"                self.cw.failover_amphora(res.id)"},{"line_number":54,"context_line":"                # update the busy status of the stale amphora"},{"line_number":55,"context_line":"                self.amp_health_repo.update(session, res.id, busy\u003dFalse)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"                # unlock thread"},{"line_number":58,"context_line":"                thread_event.clear()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_ac74c835","line":55,"updated":"2015-07-22 04:13:11.000000000","message":"I thought only the UDP listener would be writing to the AmphoraHealthRepository and your manager would read from it. \nAfter failing over an amp I think you are intending to write to the AmphoraRepository not the AmphoraHealthRepositor since there is no status colunm on the AmphoraHealth repo.","commit_id":"efc15f13868c3d32d8c2bb63f62096ebdc34d237"},{"author":{"_account_id":10806,"name":"Trevor Vardeman","email":"tvardema@redhat.com","username":"tvardeman"},"change_message_id":"5da1c5f7734b073a3435844c1244c54597f3412d","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                # fail over process for the stale amphora"},{"line_number":53,"context_line":"                self.cw.failover_amphora(res.id)"},{"line_number":54,"context_line":"                # update the busy status of the stale amphora"},{"line_number":55,"context_line":"                self.amp_health_repo.update(session, res.id, busy\u003dFalse)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"                # unlock thread"},{"line_number":58,"context_line":"                thread_event.clear()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_89d670ef","line":55,"in_reply_to":"3a50d1a3_9c50efd5","updated":"2015-07-22 19:08:13.000000000","message":"I believe that is slightly inaccurate.  The busy field is necessary under the circumstance that multiple amphorae are being failed over, that is true.  However, during fail over the original amphora should be deleted, and thus won\u0027t be able to be failed-over because it won\u0027t exist.  In other words, there is no reason to update the field back to \"False\".  The row will be cleaned up by the cleanup job in the housekeeping agent.  If I\u0027ve remembered incorrectly, please let me know.","commit_id":"efc15f13868c3d32d8c2bb63f62096ebdc34d237"},{"author":{"_account_id":10477,"name":"min wang","email":"swiftwangster@gmail.com","username":"minwang"},"change_message_id":"a486b04c138dbad3b029c7f001be32e7103bd702","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                # fail over process for the stale amphora"},{"line_number":53,"context_line":"                self.cw.failover_amphora(res.id)"},{"line_number":54,"context_line":"                # update the busy status of the stale amphora"},{"line_number":55,"context_line":"                self.amp_health_repo.update(session, res.id, busy\u003dFalse)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"                # unlock thread"},{"line_number":58,"context_line":"                thread_event.clear()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_9c50efd5","line":55,"in_reply_to":"3a50d1a3_ac74c835","updated":"2015-07-22 17:54:29.000000000","message":"we add a column in amphora health table called busy, when you call the method get_stale_amphorae, at a certain moment, we only call an amphora whose busy status is false, by which means this guy needs to failover,  so we mark it as true, and after the failover is done, we need to mark it as false again since it is eligible for failover again.","commit_id":"efc15f13868c3d32d8c2bb63f62096ebdc34d237"},{"author":{"_account_id":7398,"name":"Carlos Garza","email":"carlos.garza@rackspace.com","username":"crc32"},"change_message_id":"6e0f7e7d5ff430d2e229d88ce83efd6be45df547","unresolved":false,"context_lines":[{"line_number":28,"context_line":"CONF.import_group(\u0027health_manager\u0027, \u0027octavia.common.config\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"thread_event \u003d threading.Event()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class HealthManager(object):"},{"line_number":34,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_f1fd4a09","line":31,"updated":"2015-07-23 22:23:52.000000000","message":"an example for locking a thread is to use\nlock \u003d thread.allocate_lock()\n\nthen in your critical section running\nlock.acquire_lock()\n# do your critical code\nlock.releease_lock()\n\nbut we should really try to find a way to another way to gain mutual exclusion cause if you use this stradegy you\u0027ll only be able to fail over 1 amphora at a time. causing other amphora fail overs to start Queing up.\nwe should find a way to lock based on the amphora id rather then.\n\nThe code below will spawn a child thread when it first discovers a amp that needs to be failed over.  Notice that the lock is protecting the already_failing_over from read write hazards and not the acual database. To protect the database in a multiprocess environment we\u0027d be forced to add \n\"select for update\" semantics which is another can of worms\nto becareful with. Don\u0027t forget its still up in the air if we need to use redis or not.\n\n\nAn example in psudo code\n\nlock \u003d thread.allocate_lock()\nalready_failling_over \u003d  set()\n\ndef failover_amp(amp):\n    # do your fail over\n    lock.aquire_lock()\n        already_failing_over.remove(amp.id) # unmark this amp as failed.\n        lock.release_lock()\n\nin your main body:\n\nwhile True:\n    stale_amps \u003d get_stale_amps()\n    lock.aquire_lock()\n    for amp in stale_amps:\n        if amp.id in already_failing_over:\n            continue #This amps already being filed over so skip it\n       # This is a new amp to fail over so start a child thread\n       th \u003d threading.Thread(taret\u003dfailover_amp, args\u003d(amp,))\n       th.start()\n       already_failing_over.add(amp.id) #Let every one else know this amp is already being failed over\n       lock.release_lock)","commit_id":"7dda5ea8cd1b932920aa5f4af91b62b456721a7e"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"fce3795d7a91a8993f24ee5260d31a12f8deeb4a","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            # get a staled amphora"},{"line_number":46,"context_line":"            amp \u003d self.amp_health_repo.get_stale_amphora(session)"},{"line_number":47,"context_line":"            if amp is not None:"},{"line_number":48,"context_line":"                lock.acquire()"},{"line_number":49,"context_line":"                th \u003d threading.Thread(target\u003dself.cw.failover_amphora,"},{"line_number":50,"context_line":"                                      args\u003d(amp.id,))"},{"line_number":51,"context_line":"                th.start()"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a50d1a3_fe1640f0","line":48,"updated":"2015-07-24 22:29:53.000000000","message":"This lock doesn\u0027t make sense","commit_id":"eb6fdb7028b6ef897997cddfd696095e6d233915"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"fce3795d7a91a8993f24ee5260d31a12f8deeb4a","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            amp \u003d self.amp_health_repo.get_stale_amphora(session)"},{"line_number":47,"context_line":"            if amp is not None:"},{"line_number":48,"context_line":"                lock.acquire()"},{"line_number":49,"context_line":"                th \u003d threading.Thread(target\u003dself.cw.failover_amphora,"},{"line_number":50,"context_line":"                                      args\u003d(amp.id,))"},{"line_number":51,"context_line":"                th.start()"},{"line_number":52,"context_line":"                lock.release()"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a50d1a3_9eb93cef","line":49,"updated":"2015-07-24 22:29:53.000000000","message":"starting a new thread for each failover will crash the machine if there is a big failover event","commit_id":"eb6fdb7028b6ef897997cddfd696095e6d233915"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"753742484eef96279586ef512f522af84c888921","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            # get a staled amphora"},{"line_number":46,"context_line":"            amp \u003d self.amp_health_repo.get_stale_amphora(session)"},{"line_number":47,"context_line":"            if amp is not None:"},{"line_number":48,"context_line":"                lock.acquire()"},{"line_number":49,"context_line":"                th \u003d threading.Thread(target\u003dself.cw.failover_amphora,"},{"line_number":50,"context_line":"                                      args\u003d(amp.id,))"},{"line_number":51,"context_line":"                th.start()"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a50d1a3_f4f500ed","line":48,"updated":"2015-07-24 22:57:31.000000000","message":"still not sure why we need that lock - I assume you want to make sure that you are not failing over the same amphora twice. The way the locking should work (and we discussed that at tech mid cycle) is to use the new busy flag in the DB. So you can safely remove that lock...","commit_id":"94bbd27b729b410b3860c69aaad77902a0985cc4"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"289283a6f869a8ef8efcfe2ffafa08aa26e2615e","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                                      args\u003d(amp.amphora_id,))"},{"line_number":53,"context_line":"                LOG.info(_LI(\"Failover_amphora finishes.\"))"},{"line_number":54,"context_line":"                th.start()"},{"line_number":55,"context_line":"                lock.release()"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a50d1a3_121f6eb8","line":55,"updated":"2015-07-30 19:45:49.000000000","message":"what do we need the lock for?  could you explain?","commit_id":"ae35e1c99d5c1d3097ddb486c53c86a8e98aad17"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"35f300156f9e25a9228645e10c954633b0f049ea","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def health_check(self):"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        # CONF(default_config_files\u003d[\u0027/etc/octavia/octavia.conf\u0027])"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        while True:"},{"line_number":43,"context_line":"            session \u003d db_api.get_session()"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a4dcd0f_adefe4af","line":40,"updated":"2015-08-11 17:21:52.000000000","message":"Remove","commit_id":"b9fa090c4c1fd9132e216592a266740443a4fa0b"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"35f300156f9e25a9228645e10c954633b0f049ea","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            # get a staled amphora"},{"line_number":46,"context_line":"            amp \u003d self.amp_health_repo.get_stale_amphora(session)"},{"line_number":47,"context_line":"            LOG.info(_LI(\"stale amphora\u0027s is: %s\") % amp)"},{"line_number":48,"context_line":"            if amp is not None:"},{"line_number":49,"context_line":"                lock.acquire()"},{"line_number":50,"context_line":"                LOG.info(_LI(\"Failover_amphora starts.\"))"},{"line_number":51,"context_line":"                th \u003d threading.Thread(target\u003dself.cw.failover_amphora,"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a4dcd0f_1e24fcc2","line":48,"updated":"2015-08-11 17:21:52.000000000","message":"This will only fail over one amphora per interval.  This needs to start threads for more than one amphora failover per interval.","commit_id":"b9fa090c4c1fd9132e216592a266740443a4fa0b"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"b7b221b78d0fb8e877d39f23636779b20e3e9621","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        while True:"},{"line_number":40,"context_line":"            session \u003d db_api.get_session()"},{"line_number":41,"context_line":"            time.sleep(CONF.health_manager.interval)"},{"line_number":42,"context_line":"            LOG.debug(\"Starting amphora health check\")"},{"line_number":43,"context_line":"            failover_count \u003d 0"},{"line_number":44,"context_line":"            with futures.ThreadPoolExecutor("}],"source_content_type":"text/x-python","patch_set":33,"id":"1a4dcd0f_fb6a4280","line":41,"updated":"2015-08-12 19:05:14.000000000","message":"reverse lines... sleep then get session","commit_id":"0d2b1da6f7820bbbca129938a7bda9c542ddbdad"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"b7b221b78d0fb8e877d39f23636779b20e3e9621","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            time.sleep(CONF.health_manager.interval)"},{"line_number":42,"context_line":"            LOG.debug(\"Starting amphora health check\")"},{"line_number":43,"context_line":"            failover_count \u003d 0"},{"line_number":44,"context_line":"            with futures.ThreadPoolExecutor("},{"line_number":45,"context_line":"                    max_workers\u003dself.threads) as executor:"},{"line_number":46,"context_line":"                while True:"},{"line_number":47,"context_line":"                    amp \u003d amp_health_repo.get_stale_amphora(session)"}],"source_content_type":"text/x-python","patch_set":33,"id":"1a4dcd0f_5b7a5625","line":44,"updated":"2015-08-12 19:05:14.000000000","message":"so personally, I would establish the threadppol before the while loop and the just submit thing which need to be failed over... with the busy flag w have a way to exclude stale amphora we are currently failing over","commit_id":"0d2b1da6f7820bbbca129938a7bda9c542ddbdad"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"1f9ff65583fabf9031e55773bf36e3b02545f7b0","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                    failover_count \u003d 0"},{"line_number":46,"context_line":"                    while True:"},{"line_number":47,"context_line":"                        amp \u003d amp_health_repo.get_stale_amphora(session)"},{"line_number":48,"context_line":"                        if amp is None:"},{"line_number":49,"context_line":"                            break"},{"line_number":50,"context_line":"                        failover_count +\u003d 1"},{"line_number":51,"context_line":"                        LOG.info(_LI(\"Stale amphora\u0027s id is: %s\") %"}],"source_content_type":"text/x-python","patch_set":43,"id":"da20952f_30b5ebcc","line":48,"updated":"2015-08-27 03:54:15.000000000","message":"nit:  could shorten to just if not amp","commit_id":"1bc3dddcd2001ac0c09f6032870004b7ca63d515"}],"octavia/db/migration/alembic_migrations/versions/543f5d8e4e56_add_a_column_busy_in_table_amphora_.py":[{"author":{"_account_id":12403,"name":"Al Miller","email":"al.miller@ajmiller.net","username":"ajmiller"},"change_message_id":"4c396fedaaa3dfe0b0cb7c64dd1d874fe5c3a045","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                  sa.Column(u\u0027busy\u0027, sa.Boolean(), nullable\u003dFalse))"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"def downgrade():"},{"line_number":36,"context_line":"    op.drop_column(u\u0027amphora_health\u0027, u\u0027busy\u0027)"}],"source_content_type":"text/x-python","patch_set":26,"id":"3a50d1a3_7a15ab3d","line":35,"updated":"2015-07-29 17:06:08.000000000","message":"Remove downgrade()","commit_id":"290799b7a37d4ff1f8df3ae8f275fdb0efc3c786"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"289283a6f869a8ef8efcfe2ffafa08aa26e2615e","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                  sa.Column(u\u0027busy\u0027, sa.Boolean(), nullable\u003dFalse))"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"def downgrade():"},{"line_number":36,"context_line":"    op.drop_column(u\u0027amphora_health\u0027, u\u0027busy\u0027)"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a50d1a3_55dc0074","line":35,"updated":"2015-07-30 19:45:49.000000000","message":"we shouldnt\u0027 do downgrades now i suppose.","commit_id":"ae35e1c99d5c1d3097ddb486c53c86a8e98aad17"}],"octavia/db/migration/alembic_migrations/versions/92fe9857279_create_healthmanager_table.py":[{"author":{"_account_id":12403,"name":"Al Miller","email":"al.miller@ajmiller.net","username":"ajmiller"},"change_message_id":"4c396fedaaa3dfe0b0cb7c64dd1d874fe5c3a045","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    )"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def downgrade():"},{"line_number":42,"context_line":"    op.drop_table(\u0027amphora_health\u0027)"}],"source_content_type":"text/x-python","patch_set":26,"id":"3a50d1a3_1a2b4783","line":41,"updated":"2015-07-29 17:06:08.000000000","message":"Remove downgrade()","commit_id":"290799b7a37d4ff1f8df3ae8f275fdb0efc3c786"}],"octavia/db/models.py":[{"author":{"_account_id":7398,"name":"Carlos Garza","email":"carlos.garza@rackspace.com","username":"crc32"},"change_message_id":"d0edce4b2a11b10f79b129b35b459718dd7d877a","unresolved":false,"context_lines":[{"line_number":338,"context_line":"        sa.String(36), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":339,"context_line":"    last_update \u003d sa.Column(sa.DateTime, default\u003dfunc.now(),"},{"line_number":340,"context_line":"                            nullable\u003dFalse)"},{"line_number":341,"context_line":"    busy \u003d sa.Column(sa.Boolean(), default\u003dFalse, nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_cc2a7490","line":341,"updated":"2015-07-22 04:13:11.000000000","message":"I tghink you should set this colemn on an the Amphora model (I thought a status colunm existed for this) not here on the AmphoraHealth. I thought our intention was for the AmphoraHealth model was to be used for communication between the UDP listener and the fail over logic on your side. IE the logic is simpler when only the UDP listener writes and the health_manager your working on just reads from the table.\n\n    Also since the UDP listener could very well be running on multiple hosts (Since the sender can round robbin to multiple listeners) there is no way the UDP listener would be able to participate in those locks your attempting to set on this table.\n\n    In short the UDP listener should be the only code that is allowed to write to the AmphoraHealth model. Theres going to be a lot of writing by the way.","commit_id":"efc15f13868c3d32d8c2bb63f62096ebdc34d237"},{"author":{"_account_id":10806,"name":"Trevor Vardeman","email":"tvardema@redhat.com","username":"tvardeman"},"change_message_id":"9aa3d55620036bb6c3ff4e630ea445676af98c0a","unresolved":false,"context_lines":[{"line_number":338,"context_line":"        sa.String(36), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":339,"context_line":"    last_update \u003d sa.Column(sa.DateTime, default\u003dfunc.now(),"},{"line_number":340,"context_line":"                            nullable\u003dFalse)"},{"line_number":341,"context_line":"    busy \u003d sa.Column(sa.Boolean(), default\u003dFalse, nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_cc3ec627","line":341,"in_reply_to":"3a50d1a3_7c740335","updated":"2015-07-22 19:21:31.000000000","message":"Actually what I\u0027d imagine happening here is when the health manager assesses the amphora as stale, it will then toggle the \"busy\" field to True.  After this toggle, even if an entry comes in which COULD update this row, it would be \"too late\" and fail over would still process.  In other words, new entries in the db shouldn\u0027t be affected, just currently failing over amphora.  Also, the row won\u0027t need to be updated to \"false\" after failing over, because that row will then be obsolete since the stale amphora will not exist.","commit_id":"efc15f13868c3d32d8c2bb63f62096ebdc34d237"},{"author":{"_account_id":10477,"name":"min wang","email":"swiftwangster@gmail.com","username":"minwang"},"change_message_id":"a486b04c138dbad3b029c7f001be32e7103bd702","unresolved":false,"context_lines":[{"line_number":338,"context_line":"        sa.String(36), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":339,"context_line":"    last_update \u003d sa.Column(sa.DateTime, default\u003dfunc.now(),"},{"line_number":340,"context_line":"                            nullable\u003dFalse)"},{"line_number":341,"context_line":"    busy \u003d sa.Column(sa.Boolean(), default\u003dFalse, nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_7c740335","line":341,"in_reply_to":"3a50d1a3_cc2a7490","updated":"2015-07-22 17:54:29.000000000","message":"this boolean flag is used to tell if an amphora is eligible for failover or not,only when it is value is false, we can choose this item for failover, once it is value is true, that means this guy is chosen for failover now, you can not choose it until its status is false again. for the status change of table amphora, i think we can put that in the function failover_amphora in Trevor\u0027s code better, which is focus on operating data from amphora table, let me know how do you think of this design, and thanks for the input :)","commit_id":"efc15f13868c3d32d8c2bb63f62096ebdc34d237"}],"octavia/db/repositories.py":[{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"289283a6f869a8ef8efcfe2ffafa08aa26e2615e","unresolved":false,"context_lines":[{"line_number":405,"context_line":"        :returns: [octavia.common.data_model]"},{"line_number":406,"context_line":"        \"\"\""},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"        timestamp \u003d CONF.health_manager.heartbeat_timeout"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"        expired_time \u003d datetime.datetime.utcnow() - datetime.timedelta("},{"line_number":411,"context_line":"            seconds\u003dtimestamp)"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a50d1a3_750fbc2e","line":408,"updated":"2015-07-30 19:45:49.000000000","message":"timestamp is the wrong name for this variable now, its just supposed to be a number of seconds.","commit_id":"ae35e1c99d5c1d3097ddb486c53c86a8e98aad17"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"289283a6f869a8ef8efcfe2ffafa08aa26e2615e","unresolved":false,"context_lines":[{"line_number":420,"context_line":""},{"line_number":421,"context_line":"            amp.busy \u003d True"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"        return amp.to_data_model()"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a50d1a3_753d7cba","line":423,"updated":"2015-07-30 19:45:49.000000000","message":"debug logs woudl be great in this method.","commit_id":"ae35e1c99d5c1d3097ddb486c53c86a8e98aad17"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"db39ee8b795e062e5ff27b9a5959ce43429682b2","unresolved":false,"context_lines":[{"line_number":414,"context_line":"        return amphora_health.last_update \u003c timestamp"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def get_stale_amphora(self, session):"},{"line_number":417,"context_line":"        \"\"\"Retrieves a staled amphora from the health manager database."},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"        :param session: A Sql Alchemy database session."},{"line_number":420,"context_line":"        :returns: [octavia.common.data_model]"}],"source_content_type":"text/x-python","patch_set":46,"id":"da20952f_013f3cd7","line":417,"updated":"2015-09-01 20:58:28.000000000","message":"Technically \"Retrieves a stale amphora\" is correct.","commit_id":"38d3e09e1f492abccf42d98ce8e4bac0721e8b28"}],"octavia/tests/functional/db/test_repositories.py":[{"author":{"_account_id":10806,"name":"Trevor Vardeman","email":"tvardema@redhat.com","username":"tvardeman"},"change_message_id":"a06dc76017263016e645fab709ec88dc1c6fe476","unresolved":false,"context_lines":[{"line_number":1167,"context_line":"            self.session, self.amphora.id)"},{"line_number":1168,"context_line":"        self.assertTrue(checkres)"},{"line_number":1169,"context_line":""},{"line_number":1170,"context_line":"    def test_get_stale_amphorae(self):"},{"line_number":1171,"context_line":"        self.create_amphora_health(self.amphora.id)"},{"line_number":1172,"context_line":"        stale_amphora \u003d self.amphora_health_repo.get_stale_amphorae("},{"line_number":1173,"context_line":"            self.session)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_30f58282","line":1170,"updated":"2015-07-21 17:01:22.000000000","message":"This test no longer tests lists.  It \"amphorae\" should now be \"amphora\"","commit_id":"3f511d1e6d66d452c2cddf2f8fed3be0665eef32"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"35f300156f9e25a9228645e10c954633b0f049ea","unresolved":false,"context_lines":[{"line_number":1170,"context_line":"            self.session, self.amphora.id)"},{"line_number":1171,"context_line":"        self.assertTrue(checkres)"},{"line_number":1172,"context_line":""},{"line_number":1173,"context_line":"    def test_get_stale_amphora(self):"},{"line_number":1174,"context_line":"        self.create_amphora_health(self.amphora.id)"},{"line_number":1175,"context_line":"        stale_amphora \u003d self.amphora_health_repo.get_stale_amphora("},{"line_number":1176,"context_line":"            self.session)"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a4dcd0f_3909d284","line":1173,"updated":"2015-08-11 17:21:52.000000000","message":"Missing a test for returning \u0027None\u0027","commit_id":"b9fa090c4c1fd9132e216592a266740443a4fa0b"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"1f9ff65583fabf9031e55773bf36e3b02545f7b0","unresolved":false,"context_lines":[{"line_number":1194,"context_line":"            self.session, self.amphora.id, exp_age)"},{"line_number":1195,"context_line":"        self.assertTrue(checkres)"},{"line_number":1196,"context_line":""},{"line_number":1197,"context_line":"    def test_get_stale_amphorae(self):"},{"line_number":1198,"context_line":"        self.create_amphora_health(self.amphora.id)"},{"line_number":1199,"context_line":"        stale_amphora \u003d self.amphora_health_repo.get_stale_amphora("},{"line_number":1200,"context_line":"            self.session)"}],"source_content_type":"text/x-python","patch_set":43,"id":"da20952f_1f81d04a","line":1197,"updated":"2015-08-27 03:54:15.000000000","message":"would be nice to also have a test that checked that it didnt grab an amphora that wasn\u0027t stale.","commit_id":"1bc3dddcd2001ac0c09f6032870004b7ca63d515"}],"octavia/tests/unit/controller/healthmanager/__init__.py":[{"author":{"_account_id":10806,"name":"Trevor Vardeman","email":"tvardema@redhat.com","username":"tvardeman"},"change_message_id":"a06dc76017263016e645fab709ec88dc1c6fe476","unresolved":false,"context_lines":[{"line_number":1,"context_line":"__author__ \u003d \u0027minwang1\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_303ca22e","line":1,"updated":"2015-07-21 17:01:22.000000000","message":"Remove the author lines in any files you create.  Its a file-template setting you can change in Pycharm.","commit_id":"3f511d1e6d66d452c2cddf2f8fed3be0665eef32"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"35f300156f9e25a9228645e10c954633b0f049ea","unresolved":false,"context_lines":[{"line_number":1,"context_line":"__author__ \u003d \u0027minwang1\u0027"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a4dcd0f_b9bba20e","line":1,"updated":"2015-08-11 17:21:52.000000000","message":"Remove\nOpenStack doesn\u0027t use author tags anymore:\nhttp://docs.openstack.org/developer/hacking/#general","commit_id":"b9fa090c4c1fd9132e216592a266740443a4fa0b"}],"octavia/tests/unit/controller/healthmanager/test_health_manager.py":[{"author":{"_account_id":10806,"name":"Trevor Vardeman","email":"tvardema@redhat.com","username":"tvardeman"},"change_message_id":"a06dc76017263016e645fab709ec88dc1c6fe476","unresolved":false,"context_lines":[{"line_number":31,"context_line":"class TestHealthManager(base.TestCase):"},{"line_number":32,"context_line":"    FAKE_IP \u003d \"10.0.0.1\""},{"line_number":33,"context_line":"    FAKE_UUID_1 \u003d uuidutils.generate_uuid()"},{"line_number":34,"context_line":"    FAKE_UUID_3 \u003d uuidutils.generate_uuid()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def setUp(self):"},{"line_number":37,"context_line":"        super(TestHealthManager, self).setUp()"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_102886e1","line":34,"updated":"2015-07-21 17:01:22.000000000","message":"Is there supposed to be a \"FAKE_UUID_2\"?","commit_id":"3f511d1e6d66d452c2cddf2f8fed3be0665eef32"},{"author":{"_account_id":10806,"name":"Trevor Vardeman","email":"tvardema@redhat.com","username":"tvardeman"},"change_message_id":"a06dc76017263016e645fab709ec88dc1c6fe476","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        self.amp_health_repo.get_stale_amphorae.return_value \u003d amphora"},{"line_number":58,"context_line":"        self.hm.health_check()"},{"line_number":59,"context_line":"        time.sleep.assert_called_once_with(3)"},{"line_number":60,"context_line":"        self.assertTrue(self.amp_health_repo.get_stale_amphorae.called)"},{"line_number":61,"context_line":"        self.cw.failover_amphora.assert_any_call(amphora.id)"},{"line_number":62,"context_line":"        self.assertTrue(self.amp_health_repo.update.called)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_50136e66","line":59,"updated":"2015-07-21 17:01:22.000000000","message":"3 here is actually a config value right?  Should use that.  Otherwise we have to manually update these tests if that default is changed.","commit_id":"3f511d1e6d66d452c2cddf2f8fed3be0665eef32"},{"author":{"_account_id":7398,"name":"Carlos Garza","email":"carlos.garza@rackspace.com","username":"crc32"},"change_message_id":"a54f005341078c2bb9799efb8f6db183f956ea5a","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    def test_health_check_none_staleones(self, mock_sleep, session):"},{"line_number":73,"context_line":"        session.return_value \u003d \u0027blah\u0027"},{"line_number":74,"context_line":"        self.amp_health_repo.get_stale_amphora.return_value \u003d None"},{"line_number":75,"context_line":"        self.hm.health_check()"},{"line_number":76,"context_line":"        time.sleep.assert_called_once_with(CONF.health_manager.interval)"},{"line_number":77,"context_line":"        self.assertTrue(self.amp_health_repo.get_stale_amphora.called)"},{"line_number":78,"context_line":"        self.assertFalse(self.cw.failover_amphora.called)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_9c3985f5","line":75,"updated":"2015-07-23 19:55:38.000000000","message":"health_check runs in an infinate loop so this line of code never completes. I\u0027m not sure if its mock or what but during the looping something in the health_manager check is gobling up memory so the test will just keep consuming memory forever untill you run out or worse your computer will freeze as it swaps out of control and you can\u0027t even kill the process.\n\nyou can verify this in your IDE.","commit_id":"7dda5ea8cd1b932920aa5f4af91b62b456721a7e"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"35f300156f9e25a9228645e10c954633b0f049ea","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                                  vrrp_ip\u003dself.FAKE_IP,"},{"line_number":85,"context_line":"                                  ha_ip\u003dself.FAKE_IP)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        p \u003d multiprocessing.Process(target\u003dself.staled_amphora,"},{"line_number":88,"context_line":"                                    args\u003d(session, amphora))"},{"line_number":89,"context_line":"        p.start()"},{"line_number":90,"context_line":"        time.sleep(10)"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a4dcd0f_b973a24d","line":87,"updated":"2015-08-11 17:21:52.000000000","message":"I don\u0027t think we should be forking a process in the unit test.","commit_id":"b9fa090c4c1fd9132e216592a266740443a4fa0b"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"35f300156f9e25a9228645e10c954633b0f049ea","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    @mock.patch(\u0027octavia.db.api.get_session\u0027)"},{"line_number":94,"context_line":"    @mock.patch(\u0027time.sleep\u0027)"},{"line_number":95,"context_line":"    def test_health_check_nonestale_amphora(self, mock_sleep, session):"},{"line_number":96,"context_line":"        p \u003d multiprocessing.Process(target\u003dself.non_staled_amphora,"},{"line_number":97,"context_line":"                                    args\u003d(session))"},{"line_number":98,"context_line":"        p.start()"},{"line_number":99,"context_line":"        time.sleep(10)"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a4dcd0f_7990ba43","line":96,"updated":"2015-08-11 17:21:52.000000000","message":"Same here","commit_id":"b9fa090c4c1fd9132e216592a266740443a4fa0b"}]}
