)]}'
{"networking_baremetal/agent/ironic_neutron_agent.py":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"940ed2a9c409a1a1f11494b97fe31b607883631f","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import eventlet"},{"line_number":17,"context_line":"eventlet.monkey_patch()"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import sys"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_05ce4981","line":17,"updated":"2017-12-08 13:57:32.000000000","message":"nit: I feel like we need a note as to why we are eventlet.monkey_patch\u0027ing here.","commit_id":"71f8b4ae60be744791ff2409bd04da5ddc4dd713"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"cb71818e1fcb60ca6daff044bfa2208cf64935ef","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import eventlet"},{"line_number":17,"context_line":"eventlet.monkey_patch()"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import sys"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_0fb3bf4e","line":17,"in_reply_to":"df87a7cf_05ce4981","updated":"2017-12-08 18:09:29.000000000","message":"Done","commit_id":"71f8b4ae60be744791ff2409bd04da5ddc4dd713"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"940ed2a9c409a1a1f11494b97fe31b607883631f","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"class HashRingMemberManagerNotificationEndpoint(object):"},{"line_number":114,"context_line":"    \"\"\"Class variables members and hasring is shared by all instances\"\"\""},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    filter_rule \u003d oslo_messaging.NotificationFilter("},{"line_number":117,"context_line":"        publisher_id\u003d\u0027^ironic-neutron-agent.*\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_25a82d8a","line":114,"range":{"start_line":114,"start_character":35,"end_line":114,"end_character":38},"updated":"2017-12-08 13:57:32.000000000","message":"s/has/hash/ ?","commit_id":"71f8b4ae60be744791ff2409bd04da5ddc4dd713"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"cb71818e1fcb60ca6daff044bfa2208cf64935ef","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"class HashRingMemberManagerNotificationEndpoint(object):"},{"line_number":114,"context_line":"    \"\"\"Class variables members and hasring is shared by all instances\"\"\""},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    filter_rule \u003d oslo_messaging.NotificationFilter("},{"line_number":117,"context_line":"        publisher_id\u003d\u0027^ironic-neutron-agent.*\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_af85f35b","line":114,"range":{"start_line":114,"start_character":35,"end_line":114,"end_character":38},"in_reply_to":"df87a7cf_25a82d8a","updated":"2017-12-08 18:09:29.000000000","message":"Done","commit_id":"71f8b4ae60be744791ff2409bd04da5ddc4dd713"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"0f952d318b3fef3cfe160c7e9711f55e40332e2f","unresolved":false,"context_lines":[{"line_number":123,"context_line":"    members \u003d []"},{"line_number":124,"context_line":"    hashring \u003d hashring.HashRing([])"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def info(self, ctxt, publisher_id, event_type, payload, metadata):"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        timestamp \u003d timeutils.utcnow_ts()"},{"line_number":129,"context_line":"        # Add members or update timestamp for existing members"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f93b717_86c31589","line":126,"updated":"2018-02-01 21:00:34.000000000","message":"Would be good to add some tests for this method (or the whole class)","commit_id":"f995d0f20fea53f6614fccea9add644c6912b0b7"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"c4a1c76a4bef3b1f69b7070f747340e4152cfffc","unresolved":false,"context_lines":[{"line_number":162,"context_line":"    def __init__(self):"},{"line_number":163,"context_line":"        self.context \u003d context.get_admin_context_without_session()"},{"line_number":164,"context_line":"        self.agent_id \u003d uuidutils.generate_uuid(dashed\u003dTrue)"},{"line_number":165,"context_line":"        self.agent_host \u003d socket.gethostname()"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        # Set up oslo_messaging notifier and listener to keep track of other"},{"line_number":168,"context_line":"        # members"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f93b717_2b068a21","line":165,"updated":"2018-02-01 20:57:59.000000000","message":"We may want this to be configurable in the future (like ironic-conductor or nova-compute), so that it\u0027s possible to run more than one agent on the same machine or deal with useless hostnames.\n\nProbably okay for now.","commit_id":"f995d0f20fea53f6614fccea9add644c6912b0b7"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"88daffb4f4a9a8796822ecd6cad437ad75498970","unresolved":false,"context_lines":[{"line_number":162,"context_line":"    def __init__(self):"},{"line_number":163,"context_line":"        self.context \u003d context.get_admin_context_without_session()"},{"line_number":164,"context_line":"        self.agent_id \u003d uuidutils.generate_uuid(dashed\u003dTrue)"},{"line_number":165,"context_line":"        self.agent_host \u003d socket.gethostname()"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        # Set up oslo_messaging notifier and listener to keep track of other"},{"line_number":168,"context_line":"        # members"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f93b717_cc3cdb94","line":165,"in_reply_to":"5f93b717_2b068a21","updated":"2018-02-02 15:57:54.000000000","message":"The hash ring using the agent_id to decide if it is a new member or not. This will be unique even when running multiple agents on the same machine.\n\nThe agent_host is only used in the log message on L133 and L150.\n\nThe idea was that it would be good to have the hostname in the log for centralized log servers. But when I think about it now, the hostname is probably in the data anyways.","commit_id":"f995d0f20fea53f6614fccea9add644c6912b0b7"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"c4a1c76a4bef3b1f69b7070f747340e4152cfffc","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        LOG.info(\u0027Agent networking-baremetal initialized.\u0027)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def start_looping_calls(self):"},{"line_number":182,"context_line":"        self.notify_agents \u003d loopingcall.FixedIntervalLoopingCall("},{"line_number":183,"context_line":"            self._notify_peer_agents)"},{"line_number":184,"context_line":"        self.notify_agents.start(interval\u003d(CONF.AGENT.report_interval / 3))"},{"line_number":185,"context_line":"        self.heartbeat \u003d loopingcall.FixedIntervalLoopingCall("}],"source_content_type":"text/x-python","patch_set":18,"id":"5f93b717_6b62520c","line":182,"updated":"2018-02-01 20:57:59.000000000","message":"BackOffLoopingCall might be better here, so we get some jitter in there. But, not sure if we want it to actually back off on failure. I don\u0027t think it would hurt?\n\nWe heartbeat at (interval/3) rate, and only expire agents that haven\u0027t heartbeated for (interval*3), so there\u0027s room for at least 3 heartbeats with a backoff that doubles each time.\n\nAnd really, the main reason for failure would be rabbit issues, so it would be good to have a backoff there.","commit_id":"f995d0f20fea53f6614fccea9add644c6912b0b7"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"88daffb4f4a9a8796822ecd6cad437ad75498970","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        LOG.info(\u0027Agent networking-baremetal initialized.\u0027)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def start_looping_calls(self):"},{"line_number":182,"context_line":"        self.notify_agents \u003d loopingcall.FixedIntervalLoopingCall("},{"line_number":183,"context_line":"            self._notify_peer_agents)"},{"line_number":184,"context_line":"        self.notify_agents.start(interval\u003d(CONF.AGENT.report_interval / 3))"},{"line_number":185,"context_line":"        self.heartbeat \u003d loopingcall.FixedIntervalLoopingCall("}],"source_content_type":"text/x-python","patch_set":18,"id":"5f93b717_4c48cb2b","line":182,"in_reply_to":"5f93b717_66dfe968","updated":"2018-02-02 15:57:54.000000000","message":"Yes, I have been looking at the docs for that.\nLet\u0027s do it in a follow up.","commit_id":"f995d0f20fea53f6614fccea9add644c6912b0b7"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"a7a18e78ee96b20ac94079dce3242a64148d3f85","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        LOG.info(\u0027Agent networking-baremetal initialized.\u0027)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def start_looping_calls(self):"},{"line_number":182,"context_line":"        self.notify_agents \u003d loopingcall.FixedIntervalLoopingCall("},{"line_number":183,"context_line":"            self._notify_peer_agents)"},{"line_number":184,"context_line":"        self.notify_agents.start(interval\u003d(CONF.AGENT.report_interval / 3))"},{"line_number":185,"context_line":"        self.heartbeat \u003d loopingcall.FixedIntervalLoopingCall("}],"source_content_type":"text/x-python","patch_set":18,"id":"5f93b717_66dfe968","line":182,"in_reply_to":"5f93b717_6b62520c","updated":"2018-02-01 20:59:29.000000000","message":"This could be a follow-up, by the way.","commit_id":"f995d0f20fea53f6614fccea9add644c6912b0b7"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"c4a1c76a4bef3b1f69b7070f747340e4152cfffc","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        for port in ironic_ports:"},{"line_number":238,"context_line":"            node \u003d port.node_uuid"},{"line_number":239,"context_line":"            if (self.agent_id not in"},{"line_number":240,"context_line":"                    self.member_manager.hashring[node.encode(\u0027utf-8\u0027)]):"},{"line_number":241,"context_line":"                continue"},{"line_number":242,"context_line":"            node_states.setdefault(node, self.get_template_node_state(node))"},{"line_number":243,"context_line":"            mapping \u003d node_states[node][\"configurations\"][\"bridge_mappings\"]"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f93b717_a655f1fb","line":240,"updated":"2018-02-01 20:57:59.000000000","message":"Do we actually add the agent to its own hashring? I\u0027m not seeing that, unless the agent gets its own notifications somehow.","commit_id":"f995d0f20fea53f6614fccea9add644c6912b0b7"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"88daffb4f4a9a8796822ecd6cad437ad75498970","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        for port in ironic_ports:"},{"line_number":238,"context_line":"            node \u003d port.node_uuid"},{"line_number":239,"context_line":"            if (self.agent_id not in"},{"line_number":240,"context_line":"                    self.member_manager.hashring[node.encode(\u0027utf-8\u0027)]):"},{"line_number":241,"context_line":"                continue"},{"line_number":242,"context_line":"            node_states.setdefault(node, self.get_template_node_state(node))"},{"line_number":243,"context_line":"            mapping \u003d node_states[node][\"configurations\"][\"bridge_mappings\"]"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f93b717_6cdb474e","line":240,"in_reply_to":"5f93b717_a655f1fb","updated":"2018-02-02 15:57:54.000000000","message":"Yes, we do add it. The agent is both producer and subscriber on messaging. It sends notifications, and subscribes to the topic. So it does receive it\u0027s own notification messages.\n\nThe trick is the pool in the listener. One member of each pool will get all messages, and since we use the agent uuid for the pool. Everyone gets all messages.","commit_id":"f995d0f20fea53f6614fccea9add644c6912b0b7"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"c4a1c76a4bef3b1f69b7070f747340e4152cfffc","unresolved":false,"context_lines":[{"line_number":274,"context_line":"    def run(self):"},{"line_number":275,"context_line":"        self.start_looping_calls()"},{"line_number":276,"context_line":"        self.heartbeat.wait()"},{"line_number":277,"context_line":"        self.notify_agents.wait()"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f93b717_863eb5b5","line":277,"updated":"2018-02-01 20:57:59.000000000","message":"We never call stop() on this looping call, so this will never return, right?\n\nWhich makes me wonder if SIGINT kills the server, I think it would, but is that the recommended way to stop the application, though?","commit_id":"f995d0f20fea53f6614fccea9add644c6912b0b7"}],"releasenotes/notes/distributed-agent-hashring-6b623a7a9caf0425.yaml":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5fd48bf548d41312ac2f841d2f94920ca2bca3ef","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add support for load distribution when multiple instances of"},{"line_number":5,"context_line":"    networking-baremetal agent is running. Each instance will manage a subset"},{"line_number":6,"context_line":"    of ironic nodes. In case one or more instances of networking-baremetal"},{"line_number":7,"context_line":"    agent is lost, the remaining instances will take over the ironic nodes"},{"line_number":8,"context_line":"    previously managed by the the lost instance."}],"source_content_type":"text/x-yaml","patch_set":22,"id":"3fa0c359_2cb631fc","line":5,"updated":"2018-02-07 13:51:52.000000000","message":"s/is/are/","commit_id":"d2afe517ef9f48079581c6a391cd817333a4b224"}]}
