)]}'
{"contrib/vagrant/Vagrantfile":[{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"cf1aa6730adcb4c9d8ce63f0ac66bf6c1450eaec","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"  config.vm.synced_folder \"../..\", \"/home/vagrant/cue\""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"  if File.directory?(\"../../../cue-ansible\")"},{"line_number":58,"context_line":"    config.vm.synced_folder \"../../../cue-ansible\", \"/home/vagrant/cue-ansible\""},{"line_number":59,"context_line":"  end"},{"line_number":60,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"9a1a9d01_89d1eefd","line":57,"updated":"2015-10-04 15:57:34.000000000","message":"will have to remove these :)","commit_id":"5eb152ca87c529060aa5e182403246d7a8863b84"}],"contrib/vagrant/vagrant_config.rb":[{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"cf1aa6730adcb4c9d8ce63f0ac66bf6c1450eaec","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- mode: ruby -*-"},{"line_number":2,"context_line":"# # vi: set ft\u003druby :"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"# Uncomment $hostname and set it to specify an explicit hostname for the VM"},{"line_number":5,"context_line":"# $hostname \u003d \"dev\""}],"source_content_type":"text/x-ruby","patch_set":1,"id":"9a1a9d01_2915429a","line":2,"updated":"2015-10-04 15:57:34.000000000","message":"you can omit this entire file, we should just keep the *.rb.sample file in Cue\u0027s repo.","commit_id":"5eb152ca87c529060aa5e182403246d7a8863b84"}],"cue/cmd/monitor.py":[{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"cf1aa6730adcb4c9d8ce63f0ac66bf6c1450eaec","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from cue.common.i18n import _LI  # noqa"},{"line_number":27,"context_line":"import cue.common.service as cue_service"},{"line_number":28,"context_line":"import cue.monitor.monitor_service as ms"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"import sys"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_a92152fe","line":28,"updated":"2015-10-04 15:57:34.000000000","message":"change to cue_monitor_service.  Short names are harder to comprehend in code.","commit_id":"5eb152ca87c529060aa5e182403246d7a8863b84"},{"author":{"_account_id":15904,"name":"Daniel Allegood","email":"daniel.allegood@hp.com","username":"dkalleg"},"change_message_id":"dda622198a1b23133a4df3fbd3ad06919dc5e0ae","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from cue.common.i18n import _LI  # noqa"},{"line_number":27,"context_line":"import cue.common.service as cue_service"},{"line_number":28,"context_line":"import cue.monitor.monitor_service as ms"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"import sys"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_93ff3334","line":28,"in_reply_to":"9a1a9d01_a92152fe","updated":"2015-10-05 21:18:33.000000000","message":"Done","commit_id":"5eb152ca87c529060aa5e182403246d7a8863b84"},{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"c658a371c832fef92adaddbb207dfbed1b8d5a5d","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    # Log configuration and other startup information"},{"line_number":39,"context_line":"    LOG \u003d log.getLogger(__name__)"},{"line_number":40,"context_line":"    LOG.info(_LI(\"Starting cue workers\"))"},{"line_number":41,"context_line":"    LOG.info(_LI(\"Configuration:\"))"},{"line_number":42,"context_line":"    CONF.log_opt_values(LOG, logging.INFO)"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_21b037f4","line":40,"updated":"2015-10-06 02:06:55.000000000","message":"this should be starting cue monitors?","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":15904,"name":"Daniel Allegood","email":"daniel.allegood@hp.com","username":"dkalleg"},"change_message_id":"db33848a11daf43463eec8f93d74e4eb5827b42c","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    # Log configuration and other startup information"},{"line_number":39,"context_line":"    LOG \u003d log.getLogger(__name__)"},{"line_number":40,"context_line":"    LOG.info(_LI(\"Starting cue workers\"))"},{"line_number":41,"context_line":"    LOG.info(_LI(\"Configuration:\"))"},{"line_number":42,"context_line":"    CONF.log_opt_values(LOG, logging.INFO)"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_7be6b0b5","line":40,"in_reply_to":"7a2fa921_21b037f4","updated":"2015-10-06 23:28:37.000000000","message":"Done","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"}],"cue/monitor/__init__.py":[{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"c658a371c832fef92adaddbb207dfbed1b8d5a5d","unresolved":false,"context_lines":[{"line_number":21,"context_line":"MONITOR_OPTS \u003d ["},{"line_number":22,"context_line":"    cfg.StrOpt(\u0027loop_interval_seconds\u0027,"},{"line_number":23,"context_line":"               help\u003d\u0027How often Cluster Status is checked.\u0027,"},{"line_number":24,"context_line":"               default\u003d10)"},{"line_number":25,"context_line":"]"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"opt_group \u003d cfg.OptGroup("}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_41dd3313","line":24,"updated":"2015-10-06 02:06:55.000000000","message":"10 seconds seems pretty often, don\u0027t we want this to be closer to a minute?","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":15904,"name":"Daniel Allegood","email":"daniel.allegood@hp.com","username":"dkalleg"},"change_message_id":"db33848a11daf43463eec8f93d74e4eb5827b42c","unresolved":false,"context_lines":[{"line_number":21,"context_line":"MONITOR_OPTS \u003d ["},{"line_number":22,"context_line":"    cfg.StrOpt(\u0027loop_interval_seconds\u0027,"},{"line_number":23,"context_line":"               help\u003d\u0027How often Cluster Status is checked.\u0027,"},{"line_number":24,"context_line":"               default\u003d10)"},{"line_number":25,"context_line":"]"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"opt_group \u003d cfg.OptGroup("}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_3befd888","line":24,"in_reply_to":"7a2fa921_41dd3313","updated":"2015-10-06 23:28:37.000000000","message":"Done","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"}],"cue/monitor/monitor_service.py":[{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"cf1aa6730adcb4c9d8ce63f0ac66bf6c1450eaec","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from cue.common import context as cue_context"},{"line_number":26,"context_line":"from cue.common import policy"},{"line_number":27,"context_line":"from cue import objects"},{"line_number":28,"context_line":"import cue.taskflow.client as tf_client"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class MonitorService(service.Service):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_4920b6f7","line":28,"updated":"2015-10-04 15:57:34.000000000","message":"taskflow_client","commit_id":"5eb152ca87c529060aa5e182403246d7a8863b84"},{"author":{"_account_id":15904,"name":"Daniel Allegood","email":"daniel.allegood@hp.com","username":"dkalleg"},"change_message_id":"dda622198a1b23133a4df3fbd3ad06919dc5e0ae","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from cue.common import context as cue_context"},{"line_number":26,"context_line":"from cue.common import policy"},{"line_number":27,"context_line":"from cue import objects"},{"line_number":28,"context_line":"import cue.taskflow.client as tf_client"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class MonitorService(service.Service):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_d3712be2","line":28,"in_reply_to":"9a1a9d01_4920b6f7","updated":"2015-10-05 21:18:33.000000000","message":"Done","commit_id":"5eb152ca87c529060aa5e182403246d7a8863b84"},{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"cf1aa6730adcb4c9d8ce63f0ac66bf6c1450eaec","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        super(MonitorService, self).__init__()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        #TODO (dan) May want to go grab zk_url from cue.conf"},{"line_number":37,"context_line":"        zk_url \u003d \u0027zookeeper://127.0.0.1:2181\u0027"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        self.coordinator \u003d coordination.get_coordinator(zk_url, \u0027foobar\u0027)"},{"line_number":40,"context_line":"        self.coordinator.start()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_09c71e13","line":37,"updated":"2015-10-04 15:57:34.000000000","message":"yes, we should already have a zookeeper connection string in cue.conf:\noslo_config.CONF.taskflow.zk_hosts.  Since it\u0027s the same zookeeper the monitoring service will connect to, we will not need a new connection string.\n\nSee: cue/cue/taskflow/client.py","commit_id":"5eb152ca87c529060aa5e182403246d7a8863b84"},{"author":{"_account_id":15904,"name":"Daniel Allegood","email":"daniel.allegood@hp.com","username":"dkalleg"},"change_message_id":"dda622198a1b23133a4df3fbd3ad06919dc5e0ae","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        super(MonitorService, self).__init__()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        #TODO (dan) May want to go grab zk_url from cue.conf"},{"line_number":37,"context_line":"        zk_url \u003d \u0027zookeeper://127.0.0.1:2181\u0027"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        self.coordinator \u003d coordination.get_coordinator(zk_url, \u0027foobar\u0027)"},{"line_number":40,"context_line":"        self.coordinator.start()"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_963e41b7","line":37,"in_reply_to":"9a1a9d01_09c71e13","updated":"2015-10-05 21:18:33.000000000","message":"Done","commit_id":"5eb152ca87c529060aa5e182403246d7a8863b84"},{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"cf1aa6730adcb4c9d8ce63f0ac66bf6c1450eaec","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def start(self):"},{"line_number":45,"context_line":"        # May want to put this in cue.conf?"},{"line_number":46,"context_line":"        loop_interval \u003d 5"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        pulse \u003d loopingcall.FixedIntervalLoopingCall("},{"line_number":49,"context_line":"            self.check"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_e9d3cad3","line":46,"updated":"2015-10-04 15:57:34.000000000","message":"Parameters like check interval, retries, etc.. should be configurable at least in cue.conf.  For any parameter, units should be clear and a description of what it is used for.","commit_id":"5eb152ca87c529060aa5e182403246d7a8863b84"},{"author":{"_account_id":15904,"name":"Daniel Allegood","email":"daniel.allegood@hp.com","username":"dkalleg"},"change_message_id":"dda622198a1b23133a4df3fbd3ad06919dc5e0ae","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def start(self):"},{"line_number":45,"context_line":"        # May want to put this in cue.conf?"},{"line_number":46,"context_line":"        loop_interval \u003d 5"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        pulse \u003d loopingcall.FixedIntervalLoopingCall("},{"line_number":49,"context_line":"            self.check"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_6adb711c","line":46,"in_reply_to":"9a1a9d01_e9d3cad3","updated":"2015-10-05 21:18:33.000000000","message":"Done","commit_id":"5eb152ca87c529060aa5e182403246d7a8863b84"},{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"cf1aa6730adcb4c9d8ce63f0ac66bf6c1450eaec","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            tf_client_instance.post(create_flow, job_args)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        else:"},{"line_number":88,"context_line":"            print \"Another monitor process has acquired the lock.\""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"class CheckFlow(taskflow.task.Task):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_a9d632c1","line":88,"updated":"2015-10-04 15:57:34.000000000","message":"this is probably for debugging, in the final implementation I don\u0027t think we should log anything if a monitoring process is not able to get a lock.","commit_id":"5eb152ca87c529060aa5e182403246d7a8863b84"},{"author":{"_account_id":15904,"name":"Daniel Allegood","email":"daniel.allegood@hp.com","username":"dkalleg"},"change_message_id":"dda622198a1b23133a4df3fbd3ad06919dc5e0ae","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            tf_client_instance.post(create_flow, job_args)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        else:"},{"line_number":88,"context_line":"            print \"Another monitor process has acquired the lock.\""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"class CheckFlow(taskflow.task.Task):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_8ad84d1f","line":88,"in_reply_to":"9a1a9d01_a9d632c1","updated":"2015-10-05 21:18:33.000000000","message":"Done","commit_id":"5eb152ca87c529060aa5e182403246d7a8863b84"},{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"c658a371c832fef92adaddbb207dfbed1b8d5a5d","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    def __init__(self):"},{"line_number":32,"context_line":"        super(MonitorService, self).__init__()"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        zk_url \u003d (\"zookeeper://%s:2181\""},{"line_number":35,"context_line":"                  % cfg.CONF.taskflow.zk_hosts)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        self.coordinator \u003d coordination.get_coordinator(zk_url, \u0027foobar\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_411213b6","line":34,"updated":"2015-10-06 02:06:55.000000000","message":"ideally the port comes from the configuration file.  If zk_hosts usually/should include port.","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":15904,"name":"Daniel Allegood","email":"daniel.allegood@hp.com","username":"dkalleg"},"change_message_id":"db33848a11daf43463eec8f93d74e4eb5827b42c","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    def __init__(self):"},{"line_number":32,"context_line":"        super(MonitorService, self).__init__()"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        zk_url \u003d (\"zookeeper://%s:2181\""},{"line_number":35,"context_line":"                  % cfg.CONF.taskflow.zk_hosts)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        self.coordinator \u003d coordination.get_coordinator(zk_url, \u0027foobar\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_1e720aae","line":34,"in_reply_to":"7a2fa921_411213b6","updated":"2015-10-06 23:28:37.000000000","message":"Done","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"c658a371c832fef92adaddbb207dfbed1b8d5a5d","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        zk_url \u003d (\"zookeeper://%s:2181\""},{"line_number":35,"context_line":"                  % cfg.CONF.taskflow.zk_hosts)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        self.coordinator \u003d coordination.get_coordinator(zk_url, \u0027foobar\u0027)"},{"line_number":38,"context_line":"        self.coordinator.start()"},{"line_number":39,"context_line":"        # Create a lock"},{"line_number":40,"context_line":"        self.lock \u003d self.coordinator.get_lock(\"status_check\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_010c1b93","line":37,"updated":"2015-10-06 02:06:55.000000000","message":"foobar?  this is for testing? :)","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":15904,"name":"Daniel Allegood","email":"daniel.allegood@hp.com","username":"dkalleg"},"change_message_id":"db33848a11daf43463eec8f93d74e4eb5827b42c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        zk_url \u003d (\"zookeeper://%s:2181\""},{"line_number":35,"context_line":"                  % cfg.CONF.taskflow.zk_hosts)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        self.coordinator \u003d coordination.get_coordinator(zk_url, \u0027foobar\u0027)"},{"line_number":38,"context_line":"        self.coordinator.start()"},{"line_number":39,"context_line":"        # Create a lock"},{"line_number":40,"context_line":"        self.lock \u003d self.coordinator.get_lock(\"status_check\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_9e5e1a11","line":37,"in_reply_to":"7a2fa921_010c1b93","updated":"2015-10-06 23:28:37.000000000","message":"Yup.  :) Changed it to something more appropriate.","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"c658a371c832fef92adaddbb207dfbed1b8d5a5d","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        pass"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def reset(self):"},{"line_number":60,"context_line":"        pass"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def check(self):"},{"line_number":63,"context_line":"        if not self.lock.acquired:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_015adb83","line":60,"updated":"2015-10-06 02:06:55.000000000","message":"should we release the lock on reset? does reset trigger the constructor again?","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":15904,"name":"Daniel Allegood","email":"daniel.allegood@hp.com","username":"dkalleg"},"change_message_id":"db33848a11daf43463eec8f93d74e4eb5827b42c","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        pass"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def reset(self):"},{"line_number":60,"context_line":"        pass"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def check(self):"},{"line_number":63,"context_line":"        if not self.lock.acquired:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_dec0127f","line":60,"in_reply_to":"7a2fa921_015adb83","updated":"2015-10-06 23:28:37.000000000","message":"You\u0027re right, I believe the reset will occur on a SIGHUP (when the user loses connection to the terminal), so in that case it makes sense to ensure the lock is released, even though it would likely be released as that monitor service would die.  Being explicit is better :)","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"c658a371c832fef92adaddbb207dfbed1b8d5a5d","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"            clusters \u003d get_cluster_ids()"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"            print \"Clusters IDS: \\n\" + str(clusters) + \"\\n\""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"            taskflow_client_instance \u003d taskflow_client.get_client_instance()"},{"line_number":73,"context_line":"            job_list \u003d taskflow_client_instance.joblist()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_a1e2079e","line":70,"updated":"2015-10-06 02:06:55.000000000","message":"should log as debug here","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":15904,"name":"Daniel Allegood","email":"daniel.allegood@hp.com","username":"dkalleg"},"change_message_id":"db33848a11daf43463eec8f93d74e4eb5827b42c","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"            clusters \u003d get_cluster_ids()"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"            print \"Clusters IDS: \\n\" + str(clusters) + \"\\n\""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"            taskflow_client_instance \u003d taskflow_client.get_client_instance()"},{"line_number":73,"context_line":"            job_list \u003d taskflow_client_instance.joblist()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_9eba9a09","line":70,"in_reply_to":"7a2fa921_a1e2079e","updated":"2015-10-06 23:28:37.000000000","message":"Done","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"c658a371c832fef92adaddbb207dfbed1b8d5a5d","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            job_list \u003d taskflow_client_instance.joblist()"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"            for job in job_list:"},{"line_number":76,"context_line":"                if \u0027cluster_status_check\u0027 in job.details[\u0027store\u0027]:"},{"line_number":77,"context_line":"                    # Nothing to do here"},{"line_number":78,"context_line":"                    # taskflow_client_instance.delete(job\u003djob)"},{"line_number":79,"context_line":"                    print \"Debug: Job already exists, not adding it again.\""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_81fcab3f","line":76,"updated":"2015-10-06 02:06:55.000000000","message":"we want to check for cluster status check for specific cluster id.  The job will take in a cluster id and list of node ids","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":15904,"name":"Daniel Allegood","email":"daniel.allegood@hp.com","username":"dkalleg"},"change_message_id":"db33848a11daf43463eec8f93d74e4eb5827b42c","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            job_list \u003d taskflow_client_instance.joblist()"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"            for job in job_list:"},{"line_number":76,"context_line":"                if \u0027cluster_status_check\u0027 in job.details[\u0027store\u0027]:"},{"line_number":77,"context_line":"                    # Nothing to do here"},{"line_number":78,"context_line":"                    # taskflow_client_instance.delete(job\u003djob)"},{"line_number":79,"context_line":"                    print \"Debug: Job already exists, not adding it again.\""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_3e06e6ce","line":76,"in_reply_to":"7a2fa921_81fcab3f","updated":"2015-10-06 23:28:37.000000000","message":"The design is such that one monitor service will handle the status check for all clusters.  Trying to spread the work among multiple monitor services is a future enhancement.  So this will post a job containing all cluster checks, and this line is to check to see if one is already on the jobboard.","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"c658a371c832fef92adaddbb207dfbed1b8d5a5d","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                if \u0027cluster_status_check\u0027 in job.details[\u0027store\u0027]:"},{"line_number":77,"context_line":"                    # Nothing to do here"},{"line_number":78,"context_line":"                    # taskflow_client_instance.delete(job\u003djob)"},{"line_number":79,"context_line":"                    print \"Debug: Job already exists, not adding it again.\""},{"line_number":80,"context_line":"                    return"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"            for cluster_id, node_id_list in clusters.iteritems():"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_419533e2","line":79,"updated":"2015-10-06 02:06:55.000000000","message":"debug log","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":15904,"name":"Daniel Allegood","email":"daniel.allegood@hp.com","username":"dkalleg"},"change_message_id":"db33848a11daf43463eec8f93d74e4eb5827b42c","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                if \u0027cluster_status_check\u0027 in job.details[\u0027store\u0027]:"},{"line_number":77,"context_line":"                    # Nothing to do here"},{"line_number":78,"context_line":"                    # taskflow_client_instance.delete(job\u003djob)"},{"line_number":79,"context_line":"                    print \"Debug: Job already exists, not adding it again.\""},{"line_number":80,"context_line":"                    return"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"            for cluster_id, node_id_list in clusters.iteritems():"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_5e0962dc","line":79,"in_reply_to":"7a2fa921_419533e2","updated":"2015-10-06 23:28:37.000000000","message":"Done","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"c658a371c832fef92adaddbb207dfbed1b8d5a5d","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                    # Nothing to do here"},{"line_number":78,"context_line":"                    # taskflow_client_instance.delete(job\u003djob)"},{"line_number":79,"context_line":"                    print \"Debug: Job already exists, not adding it again.\""},{"line_number":80,"context_line":"                    return"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"            for cluster_id, node_id_list in clusters.iteritems():"},{"line_number":83,"context_line":"                job_args \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_c18943cc","line":80,"updated":"2015-10-06 02:06:55.000000000","message":"if job exists, we want to skip to next cluster instead of returning","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":15904,"name":"Daniel Allegood","email":"daniel.allegood@hp.com","username":"dkalleg"},"change_message_id":"db33848a11daf43463eec8f93d74e4eb5827b42c","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                    # Nothing to do here"},{"line_number":78,"context_line":"                    # taskflow_client_instance.delete(job\u003djob)"},{"line_number":79,"context_line":"                    print \"Debug: Job already exists, not adding it again.\""},{"line_number":80,"context_line":"                    return"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"            for cluster_id, node_id_list in clusters.iteritems():"},{"line_number":83,"context_line":"                job_args \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_7e045ebf","line":80,"in_reply_to":"7a2fa921_c18943cc","updated":"2015-10-06 23:28:37.000000000","message":"Not with this implementation.  All clusters are post in the same job.  One \u0027cluster_status_check\u0027 on the job board represents every cluster.","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"c658a371c832fef92adaddbb207dfbed1b8d5a5d","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                    print \"Debug: Job already exists, not adding it again.\""},{"line_number":80,"context_line":"                    return"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"            for cluster_id, node_id_list in clusters.iteritems():"},{"line_number":83,"context_line":"                job_args \u003d {"},{"line_number":84,"context_line":"                    \u0027cluster_status_check\u0027: \u0027\u0027,"},{"line_number":85,"context_line":"                    \u0027cluster_id\u0027: cluster_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_01b65b8a","line":82,"updated":"2015-10-06 02:06:55.000000000","message":"this part seems to create jobs for all clusters anyways, should only create jobs for clusters that don\u0027t already have a cluster check job in zookeeper","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":15904,"name":"Daniel Allegood","email":"daniel.allegood@hp.com","username":"dkalleg"},"change_message_id":"db33848a11daf43463eec8f93d74e4eb5827b42c","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                    print \"Debug: Job already exists, not adding it again.\""},{"line_number":80,"context_line":"                    return"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"            for cluster_id, node_id_list in clusters.iteritems():"},{"line_number":83,"context_line":"                job_args \u003d {"},{"line_number":84,"context_line":"                    \u0027cluster_status_check\u0027: \u0027\u0027,"},{"line_number":85,"context_line":"                    \u0027cluster_id\u0027: cluster_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_3e2d8646","line":82,"in_reply_to":"7a2fa921_01b65b8a","updated":"2015-10-06 23:28:37.000000000","message":"As above, current design is to put all cluster checks into one flow and put it in the jobboard.  Breaking it up into multiple jobs will be a future enhancement.","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"c658a371c832fef92adaddbb207dfbed1b8d5a5d","unresolved":false,"context_lines":[{"line_number":89,"context_line":"                taskflow_client_instance.post(check_cluster_status, job_args)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"def get_cluster_ids():"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    dbapi \u003d db_api.get_instance()"},{"line_number":95,"context_line":"    clusters \u003d dbapi.get_clusters(None, project_only\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_e1747fd0","line":92,"updated":"2015-10-06 02:06:55.000000000","message":"name should be updated to something like cluster id and node ids","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":15904,"name":"Daniel Allegood","email":"daniel.allegood@hp.com","username":"dkalleg"},"change_message_id":"db33848a11daf43463eec8f93d74e4eb5827b42c","unresolved":false,"context_lines":[{"line_number":89,"context_line":"                taskflow_client_instance.post(check_cluster_status, job_args)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"def get_cluster_ids():"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    dbapi \u003d db_api.get_instance()"},{"line_number":95,"context_line":"    clusters \u003d dbapi.get_clusters(None, project_only\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_feddce42","line":92,"in_reply_to":"7a2fa921_e1747fd0","updated":"2015-10-06 23:28:37.000000000","message":"Done","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"c658a371c832fef92adaddbb207dfbed1b8d5a5d","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        node_ids \u003d []"},{"line_number":100,"context_line":"        for node in dbapi.get_nodes_in_cluster(None, cluster.id):"},{"line_number":101,"context_line":"            node_ids.append(node.id)"},{"line_number":102,"context_line":"        cluster_ids[cluster.id] \u003d node_ids"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    return cluster_ids"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_e437ade1","line":102,"updated":"2015-10-06 02:06:55.000000000","message":"I don\u0027t think using cluster id as an index is a good idea, Cue will never have 2^128 active clusters :)  something like this might work better:\n[ {cluster_id:  xxxxxx\n   node_ids: [...] } ,\n...\n]","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":15904,"name":"Daniel Allegood","email":"daniel.allegood@hp.com","username":"dkalleg"},"change_message_id":"db33848a11daf43463eec8f93d74e4eb5827b42c","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        node_ids \u003d []"},{"line_number":100,"context_line":"        for node in dbapi.get_nodes_in_cluster(None, cluster.id):"},{"line_number":101,"context_line":"            node_ids.append(node.id)"},{"line_number":102,"context_line":"        cluster_ids[cluster.id] \u003d node_ids"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    return cluster_ids"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_9eee1ab3","line":102,"in_reply_to":"7a2fa921_e437ade1","updated":"2015-10-06 23:28:37.000000000","message":"Done","commit_id":"2695643afbdf2a15aa3c49253603b5b9c0e6e400"},{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"337af74e66c19a65db76f22b9e47eb7feb379871","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            job_list \u003d taskflow_client_instance.joblist()"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"            for job in job_list:"},{"line_number":75,"context_line":"                if \u0027cluster_status_check\u0027 in job.details[\u0027store\u0027]:"},{"line_number":76,"context_line":"                    # Nothing to do here"},{"line_number":77,"context_line":"                    return"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7a2fa921_0fcbb2a6","line":75,"updated":"2015-10-07 01:25:40.000000000","message":"read your comments from previous revision.  From reviewing Abitha\u0027s work on the cluster check flow, it seems that one flow will check the status for one cluster only.  In this case you would have to submit a separate job for each cluster check.  If you want one overall clusters check flow, Abitha would have to add that but I think it makes more sense to have separate jobs for each cluster check.  We can discuss more over irc.","commit_id":"4b17b383dbc2d241ace6f5502d1bd5061a7f4ded"},{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"c3c1756ffb79d70e141913c2fd8bd2a871284cd0","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            job_list \u003d taskflow_client_instance.joblist()"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"            for job in job_list:"},{"line_number":75,"context_line":"                if \u0027cluster_status_check\u0027 in job.details[\u0027store\u0027]:"},{"line_number":76,"context_line":"                    # Nothing to do here"},{"line_number":77,"context_line":"                    return"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7a2fa921_8b5b2187","line":75,"in_reply_to":"7a2fa921_0f672f26","updated":"2015-10-07 13:04:24.000000000","message":"ok thanks for clarifying, we are on the same page then :)","commit_id":"4b17b383dbc2d241ace6f5502d1bd5061a7f4ded"},{"author":{"_account_id":15904,"name":"Daniel Allegood","email":"daniel.allegood@hp.com","username":"dkalleg"},"change_message_id":"8172b642c647a041585b269981dc05da23a23ad6","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            job_list \u003d taskflow_client_instance.joblist()"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"            for job in job_list:"},{"line_number":75,"context_line":"                if \u0027cluster_status_check\u0027 in job.details[\u0027store\u0027]:"},{"line_number":76,"context_line":"                    # Nothing to do here"},{"line_number":77,"context_line":"                    return"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7a2fa921_0f672f26","line":75,"in_reply_to":"7a2fa921_0fcbb2a6","updated":"2015-10-07 04:42:25.000000000","message":"I definitely misspoke in my previous comment about all the cluster checks going into one flow..  There is actually separate a job posted for every cluster.  So the flow created by Abitha is posted one per cluster with a set of (1 cluster id, many node ids).  A cue-monitor service should be able to churn through a large number of clusters/nodes since all it would be doing is going to the database, getting the ids, then posting it to the jobboard; so having one cue-monitor service handling all cluster checking should yield little performance impact.  From there the worker(s) will pick up those jobs (if this isn\u0027t correct, please let me know).  Also, all line 75 is doing is checking if the previous cluster check is still running, and if so, end the \u0027check\u0027 function (which will get executed again after \u0027loop_interval_seconds\u0027 seconds.  In short, we are already submitting separate jobs to the jobboard for each cluster :)","commit_id":"4b17b383dbc2d241ace6f5502d1bd5061a7f4ded"},{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"337af74e66c19a65db76f22b9e47eb7feb379871","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    dbapi \u003d db_api.get_instance()"},{"line_number":97,"context_line":"    clusters \u003d dbapi.get_clusters(None, project_only\u003dFalse)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    cluster_ids \u003d []"},{"line_number":100,"context_line":"    for cluster in clusters:"},{"line_number":101,"context_line":"        node_ids \u003d []"},{"line_number":102,"context_line":"        for node in dbapi.get_nodes_in_cluster(None, cluster.id):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a2fa921_2f80ee45","line":99,"updated":"2015-10-07 01:25:40.000000000","message":"nit, but \u0027cluster\u0027 would make more sense.  cluster contains a cluster_id and node_ids","commit_id":"4b17b383dbc2d241ace6f5502d1bd5061a7f4ded"},{"author":{"_account_id":15904,"name":"Daniel Allegood","email":"daniel.allegood@hp.com","username":"dkalleg"},"change_message_id":"8172b642c647a041585b269981dc05da23a23ad6","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    dbapi \u003d db_api.get_instance()"},{"line_number":97,"context_line":"    clusters \u003d dbapi.get_clusters(None, project_only\u003dFalse)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    cluster_ids \u003d []"},{"line_number":100,"context_line":"    for cluster in clusters:"},{"line_number":101,"context_line":"        node_ids \u003d []"},{"line_number":102,"context_line":"        for node in dbapi.get_nodes_in_cluster(None, cluster.id):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a2fa921_6f7823c5","line":99,"in_reply_to":"7a2fa921_2f80ee45","updated":"2015-10-07 04:42:25.000000000","message":"Started to do that, then realized thered a name collision with the cluster objects returned from the db query on line 97.  Will come up with alternate naming.","commit_id":"4b17b383dbc2d241ace6f5502d1bd5061a7f4ded"},{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"8ea2081ccb740337513063a09c03b00c9e094666","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            clusters \u003d get_cluster_id_node_ids()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"            taskflow_client_instance \u003d taskflow_client.get_client_instance()"},{"line_number":72,"context_line":"            job_list \u003d taskflow_client_instance.joblist()"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"            for job in job_list:"},{"line_number":75,"context_line":"                if \u0027cluster_status_check\u0027 in job.details[\u0027store\u0027]:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a2fa921_b03bde9b","line":72,"updated":"2015-10-07 16:32:57.000000000","message":"so here you retrieve the list of jobs from zookeeper, Task flow\u0027s job board","commit_id":"f00dc49acd618ad7fc5b0a150a96c0e290fe8686"},{"author":{"_account_id":13771,"name":"Davide Agnello","email":"dagnello@hp.com","username":"dagnello"},"change_message_id":"8ea2081ccb740337513063a09c03b00c9e094666","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            job_list \u003d taskflow_client_instance.joblist()"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"            for job in job_list:"},{"line_number":75,"context_line":"                if \u0027cluster_status_check\u0027 in job.details[\u0027store\u0027]:"},{"line_number":76,"context_line":"                    # Nothing to do here"},{"line_number":77,"context_line":"                    return"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7a2fa921_50b12ae0","line":75,"updated":"2015-10-07 16:32:57.000000000","message":"if there is a cluster_status_check job, we are returning.  Shouldn\u0027t we check for which cluster the job is for?  My understanding for this task is:\n\n1.  Retrieve a list of all \u0027ACTIVE\u0027 Clusters (from DB)\n2.  Retrieve list of all jobs in zookeeper\n3.  Iterate through list of clusters (from step 1)\n4.  For each cluster (From step 3) iterate through jobs (from step 2)\n5   If a cluster_status_check job for this cluster already exists, continue to the next cluster.  Otherwise, submit a cluster_status_check job for this cluster","commit_id":"f00dc49acd618ad7fc5b0a150a96c0e290fe8686"}]}
