)]}'
{"networking_bagpipe/bagpipe_bgp/vpn/manager.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"ed9f33bc5f58fce5baffa63998a49ccdddbd821b","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        # VPN instance dict"},{"line_number":86,"context_line":"        self.vpn_instances \u003d {}"},{"line_number":87,"context_line":"        self.next_vpn_instance_id \u003d 1"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        LOG.debug(\"Creating label allocator\")"},{"line_number":90,"context_line":"        self.label_allocator \u003d label_allocator.LabelAllocator()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f93b717_e36e6f2d","line":87,"updated":"2018-02-02 21:21:26.000000000","message":"is this meant to be an integer at all costs? Can\u0027t you seed from a random number? Also, what happens if this crashes?","commit_id":"7d3678889fb21a9b31a911e1d8247f5ebe3707e3"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"45b62634bf1342a1aa12c3604508308f3473ae0f","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        # VPN instance dict"},{"line_number":86,"context_line":"        self.vpn_instances \u003d {}"},{"line_number":87,"context_line":"        self.next_vpn_instance_id \u003d 1"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        LOG.debug(\"Creating label allocator\")"},{"line_number":90,"context_line":"        self.label_allocator \u003d label_allocator.LabelAllocator()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_b73baf9a","line":87,"in_reply_to":"3fa0c359_2283ea06","updated":"2018-02-05 09:24:51.000000000","message":"\u003e \u003e \u003e what happens if this crashes ?\n \u003e \u003e\n \u003e \u003e Not sure what is \"this\" in your question.\n \u003e \n \u003e This \u003d\u003d the process.\n \u003e \n \u003e \u003e If \u0027this\u0027 is the bagpipe-bgp process, then on restart the\n \u003e dataplane\n \u003e \u003e and routes are all reset, and we restart from scratch without\n \u003e \u003e colliding with what was allocated in the previous run.\n \u003e \n \u003e Are you saying that across the restart of the python process alone\n \u003e (the one holding memory of next_vpn_instance_id), the entire\n \u003e dataplane is rebuilt and thus no collision occurs? If so, that\n \u003e makes sense.\n\nYes, this is how restarts are handled.\n\n \u003e \u003e \u003e Can\u0027t you seed from a random number?\n \u003e \u003e\n \u003e \u003e I haven\u0027t found a rationale to do so.\n \u003e \u003e The answer to the previous question explains some context on why\n \u003e \u003e not add randomness here.\n \u003e \n \u003e OK, as you learned the hard way, I suppose you only need for this\n \u003e ID to be monotonic. What\u0027s the upper limit in case this (the\n \u003e process) runs for a very very long time?\n\nYou raise a good point.\n\nThis id is used in different places:\n- in the OVS dataplane for IPVPNs: in an OVS register (4 bytes)\n- in the linux dataplane for IPVPNs: used to derive the route table id (4 bytes), and embedded as a decimal in the VRF interface name (limited to 15 chars minus the 5 chars prefix, so we\u0027ve 10 decimal digits max, which is more than 2**32)\n\nSo, we ought to at least fail-safe when the max 2**32 is reached, and then work on an implementation that will be able to reuse ids.\n\nI\u0027ve filed bug 1747379 to track this, and work on a separate fix.","commit_id":"7d3678889fb21a9b31a911e1d8247f5ebe3707e3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"75d5aed38848da05d77a8f0c35d017e61687d79a","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        # VPN instance dict"},{"line_number":86,"context_line":"        self.vpn_instances \u003d {}"},{"line_number":87,"context_line":"        self.next_vpn_instance_id \u003d 1"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        LOG.debug(\"Creating label allocator\")"},{"line_number":90,"context_line":"        self.label_allocator \u003d label_allocator.LabelAllocator()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_2283ea06","line":87,"in_reply_to":"3fa0c359_9f49f761","updated":"2018-02-04 15:57:09.000000000","message":"\u003e \u003e is this meant to be an integer at all costs?\n \u003e \n \u003e Yes, it ends up in places in the dataplane that have to be integers\n \u003e (OVS register or linux routing table numbers).\n \u003e \n \u003e \u003e what happens if this crashes ?\n \u003e \n \u003e Not sure what is \"this\" in your question.\n\nThis \u003d\u003d the process.\n\n \u003e If \u0027this\u0027 is the bagpipe-bgp process, then on restart the dataplane\n \u003e and routes are all reset, and we restart from scratch without\n \u003e colliding with what was allocated in the previous run.\n\nAre you saying that across the restart of the python process alone (the one holding memory of next_vpn_instance_id), the entire dataplane is rebuilt and thus no collision occurs? If so, that makes sense.\n\n \u003e \n \u003e \u003e Can\u0027t you seed from a random number?\n \u003e \n \u003e I haven\u0027t found a rationale to do so.\n \u003e The answer to the previous question explains some context on why\n \u003e not add randomness here.\n\nOK, as you learned the hard way, I suppose you only need for this ID to be monotonic. What\u0027s the upper limit in case this (the process) runs for a very very long time?","commit_id":"7d3678889fb21a9b31a911e1d8247f5ebe3707e3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"65a819a8fcc44347fc32bca138257ba723c59758","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        # VPN instance dict"},{"line_number":86,"context_line":"        self.vpn_instances \u003d {}"},{"line_number":87,"context_line":"        self.next_vpn_instance_id \u003d 1"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        LOG.debug(\"Creating label allocator\")"},{"line_number":90,"context_line":"        self.label_allocator \u003d label_allocator.LabelAllocator()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_c33b169a","line":87,"in_reply_to":"3fa0c359_b73baf9a","updated":"2018-02-05 16:20:47.000000000","message":"OK, then!","commit_id":"7d3678889fb21a9b31a911e1d8247f5ebe3707e3"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"6e3f4feca37c1082ae4832fcc8d9f75b9ff0347e","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        # VPN instance dict"},{"line_number":86,"context_line":"        self.vpn_instances \u003d {}"},{"line_number":87,"context_line":"        self.next_vpn_instance_id \u003d 1"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        LOG.debug(\"Creating label allocator\")"},{"line_number":90,"context_line":"        self.label_allocator \u003d label_allocator.LabelAllocator()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_9f49f761","line":87,"in_reply_to":"5f93b717_e36e6f2d","updated":"2018-02-04 10:19:37.000000000","message":"\u003e is this meant to be an integer at all costs?\n\nYes, it ends up in places in the dataplane that have to be integers (OVS register or linux routing table numbers).\n\n\u003e what happens if this crashes ?\n\nNot sure what is \"this\" in your question.\nIf \u0027this\u0027 is the bagpipe-bgp process, then on restart the dataplane and routes are all reset, and we restart from scratch without colliding with what was allocated in the previous run.\n\n\u003e Can\u0027t you seed from a random number?\n\nI haven\u0027t found a rationale to do so.\nThe answer to the previous question explains some context on why not add randomness here.","commit_id":"7d3678889fb21a9b31a911e1d8247f5ebe3707e3"}]}
