)]}'
{"doc/source/configuration.rst":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"6e4e71696296c6d381e90da5be8009b83c0de1ee","unresolved":false,"context_lines":[{"line_number":583,"context_line":""},{"line_number":584,"context_line":"     If greater than 0, nodepool will assume it is the only user of the"},{"line_number":585,"context_line":"     OpenStack project and will attempt to clean ports in `DOWN` state after"},{"line_number":586,"context_line":"     `cleanup-interval` has passed. This value can be reduced if the instance"},{"line_number":587,"context_line":"     spawn time on the provider is reliably quicker."},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"  .. attr:: diskimages"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_ca315c5b","line":586,"updated":"2019-10-09 22:15:25.000000000","message":"might be clearer to say `port-cleanup-interval` or just \"the interval\" ... this looks a bit like a separate config option.","commit_id":"6789c4b61882782db5eac8c3f5af202fb2c9142e"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"2ebc3449e1d5e20da252a5b592f6a6da37f1a71c","unresolved":false,"context_lines":[{"line_number":583,"context_line":""},{"line_number":584,"context_line":"     If greater than 0, nodepool will assume it is the only user of the"},{"line_number":585,"context_line":"     OpenStack project and will attempt to clean ports in `DOWN` state after"},{"line_number":586,"context_line":"     `cleanup-interval` has passed. This value can be reduced if the instance"},{"line_number":587,"context_line":"     spawn time on the provider is reliably quicker."},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"  .. attr:: diskimages"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_6f4cf3c7","line":586,"in_reply_to":"3fa7e38b_ca315c5b","updated":"2019-10-10 09:26:42.000000000","message":"Argh, yeah, sorry, this is supposed to be \"the interval\". vermiform appendix from a previous version.","commit_id":"6789c4b61882782db5eac8c3f5af202fb2c9142e"}],"nodepool/tests/unit/test_launcher.py":[{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"92a0f17943f723ac1ca4a932723392ffd9dacb0c","unresolved":false,"context_lines":[{"line_number":2105,"context_line":"        self.waitForNodes(\u0027fake-label\u0027)"},{"line_number":2106,"context_line":""},{"line_number":2107,"context_line":"        manager \u003d pool.getProviderManager(\u0027fake-provider\u0027)"},{"line_number":2108,"context_line":"        down_ports \u003d manager.listPorts(status\u003d\u0027DOWN\u0027)"},{"line_number":2109,"context_line":"        self.assertEqual(2, len(down_ports))"},{"line_number":2110,"context_line":"        self.log.debug(\"Down ports: %s\", down_ports)"},{"line_number":2111,"context_line":""},{"line_number":2112,"context_line":"        # Port cleanup in the fixture is set to 5 seconds"},{"line_number":2113,"context_line":"        while manager.listPorts(status\u003d\u0027DOWN\u0027):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_5e7240af","line":2110,"range":{"start_line":2108,"start_character":8,"end_line":2110,"end_character":52},"updated":"2019-10-07 16:39:52.000000000","message":"Note to reviewers: this section seems a bit racey. Specifically it\u0027s trying to assert that there are two ports that have leaked.\n\nI think this check is unnecessary because of the stat check at the end of this check.","commit_id":"9d060018250cfb9873fc886422f19c9e5db76eac"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"611314af8acb3e5a8bfeea03dff04c62a0ee2ec4","unresolved":false,"context_lines":[{"line_number":2105,"context_line":"        self.waitForNodes(\u0027fake-label\u0027)"},{"line_number":2106,"context_line":""},{"line_number":2107,"context_line":"        manager \u003d pool.getProviderManager(\u0027fake-provider\u0027)"},{"line_number":2108,"context_line":"        down_ports \u003d manager.listPorts(status\u003d\u0027DOWN\u0027)"},{"line_number":2109,"context_line":"        self.assertEqual(2, len(down_ports))"},{"line_number":2110,"context_line":"        self.log.debug(\"Down ports: %s\", down_ports)"},{"line_number":2111,"context_line":""},{"line_number":2112,"context_line":"        # Port cleanup in the fixture is set to 5 seconds"},{"line_number":2113,"context_line":"        while manager.listPorts(status\u003d\u0027DOWN\u0027):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_794cf675","line":2110,"range":{"start_line":2108,"start_character":8,"end_line":2110,"end_character":52},"in_reply_to":"3fa7e38b_5e7240af","updated":"2019-10-07 17:29:07.000000000","message":"Well, the thing about only depending on stats reporting assert is that you are only asserting stats reporting. :)\n\nIf that were the only check, and it failed, you won\u0027t know if it was the stats reporting itself that failed, or something with cleaning up down ports. You\u0027d then have to go back and add asserts to investigate and validate things you are assuming to be true before you get to the stats reporting part. I believe it\u0027s best to assert your assumptions as early as possible for when the test *does* fail.\n\nAlso, I don\u0027t think this is racey in it\u0027s original form. It may be NOW that you are lowering the cleanup interval early.","commit_id":"9d060018250cfb9873fc886422f19c9e5db76eac"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"afb516ee663d00a27b364b342f34b5d0a0bd73a0","unresolved":false,"context_lines":[{"line_number":2105,"context_line":"        self.waitForNodes(\u0027fake-label\u0027)"},{"line_number":2106,"context_line":""},{"line_number":2107,"context_line":"        manager \u003d pool.getProviderManager(\u0027fake-provider\u0027)"},{"line_number":2108,"context_line":"        down_ports \u003d manager.listPorts(status\u003d\u0027DOWN\u0027)"},{"line_number":2109,"context_line":"        self.assertEqual(2, len(down_ports))"},{"line_number":2110,"context_line":"        self.log.debug(\"Down ports: %s\", down_ports)"},{"line_number":2111,"context_line":""},{"line_number":2112,"context_line":"        # Port cleanup in the fixture is set to 5 seconds"},{"line_number":2113,"context_line":"        while manager.listPorts(status\u003d\u0027DOWN\u0027):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_0a41db0b","line":2110,"range":{"start_line":2108,"start_character":8,"end_line":2110,"end_character":52},"in_reply_to":"3fa7e38b_794cf675","updated":"2019-10-08 06:58:04.000000000","message":"I agree with you on all counts, I was too hasty - an alternative way to model this test is to check if the timeout is semi-accurate by measuring the delay in port cleanup.","commit_id":"9d060018250cfb9873fc886422f19c9e5db76eac"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"92a0f17943f723ac1ca4a932723392ffd9dacb0c","unresolved":false,"context_lines":[{"line_number":2113,"context_line":"        while manager.listPorts(status\u003d\u0027DOWN\u0027):"},{"line_number":2114,"context_line":"            time.sleep(1)"},{"line_number":2115,"context_line":""},{"line_number":2116,"context_line":"        self.assertReportedStat(\u0027nodepool.provider.fake-provider.downPorts\u0027,"},{"line_number":2117,"context_line":"                                value\u003d\u00272\u0027, kind\u003d\u0027c\u0027)"},{"line_number":2118,"context_line":""},{"line_number":2119,"context_line":"    def test_deleteRawNode_exception(self):"},{"line_number":2120,"context_line":"        configfile \u003d self.setup_config(\u0027node.yaml\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_be6254d7","line":2117,"range":{"start_line":2116,"start_character":8,"end_line":2117,"end_character":52},"updated":"2019-10-07 16:39:52.000000000","message":"This assert should cover any possible race conditions. This stat will only be 2 if exactly 2 ports leaked.","commit_id":"9d060018250cfb9873fc886422f19c9e5db76eac"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"a3381cf2e78007a5b4805ff0bc2c742f6de422a9","unresolved":false,"context_lines":[{"line_number":2112,"context_line":"        # Second config decreases cleanup interval to 2 seconds"},{"line_number":2113,"context_line":"        self.replace_config(configfile, \u0027cleanup-port.yaml\u0027)"},{"line_number":2114,"context_line":"        oldmanager \u003d manager"},{"line_number":2115,"context_line":"        while manager \u003d\u003d oldmanager:"},{"line_number":2116,"context_line":"            # Wait for config to update"},{"line_number":2117,"context_line":"            manager \u003d pool.getProviderManager(\u0027fake-provider\u0027)"},{"line_number":2118,"context_line":"            time.sleep(0.1)"},{"line_number":2119,"context_line":"        # Reset the client as a new fake client will have been"},{"line_number":2120,"context_line":"        # created."},{"line_number":2121,"context_line":"        manager.resetClient()"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_7dc35b8a","line":2118,"range":{"start_line":2115,"start_character":0,"end_line":2118,"end_character":27},"updated":"2019-10-09 13:59:58.000000000","message":"I\u0027d like for us to stop using the while-sleep waiting paradigm. We have something better in nodepool.nodeutils called iterate_timeout() that allows us to set a max wait time and throws an exception if that is exceeded. That prevents tests from running out of control until the max job timeout.","commit_id":"cffd8bc2f9fe08258f811148b53cfbe4b6824e06"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"46417cf91c71e8052281b78607f132cc426e02fa","unresolved":false,"context_lines":[{"line_number":2124,"context_line":"        # created."},{"line_number":2125,"context_line":"        manager.resetClient()"},{"line_number":2126,"context_line":""},{"line_number":2127,"context_line":"        for _ in iterate_timeout(4, Exception, \u0027assert ports are cleaned\u0027):"},{"line_number":2128,"context_line":"            try:"},{"line_number":2129,"context_line":"                down_ports \u003d manager.listPorts(status\u003d\u0027DOWN\u0027)"},{"line_number":2130,"context_line":"                self.assertEqual(0, len(down_ports))"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_71ddbf6e","line":2127,"range":{"start_line":2127,"start_character":33,"end_line":2127,"end_character":34},"updated":"2019-10-09 19:01:26.000000000","message":"We *might* need to push this up a bit for any slow running VMs, but we can try it as-is for now.","commit_id":"6789c4b61882782db5eac8c3f5af202fb2c9142e"}]}
