)]}'
{"nova/scheduler/host_manager.py":[{"author":{"_account_id":14762,"name":"Zhihai Song","email":"zhhsng@gmail.com","username":"ZhihaiSong"},"change_message_id":"5fc4573a23c7a19de9767dc244a3e4c49b98cf12","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                and self.updated \u003e compute.updated_at):"},{"line_number":164,"context_line":"            return"},{"line_number":165,"context_line":"        # Compute node won\u0027t have useful info if never updated in DB."},{"line_number":166,"context_line":"        if compute.updated_at is None and compute.free_disk_gb is None:"},{"line_number":167,"context_line":"            LOG.warning(_LW(\"Host %(host)s just created wait for update\"),"},{"line_number":168,"context_line":"                {\u0027host\u0027: compute.host})"},{"line_number":169,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_e2b68b89","line":166,"range":{"start_line":166,"start_character":50,"end_line":166,"end_character":62},"updated":"2015-12-24 07:57:00.000000000","message":"I don\u0027t think using free_disk_gb sole here beside the update time is a good idea.","commit_id":"f2de8502683336c026c11a82ae5bfd6f64972519"},{"author":{"_account_id":13790,"name":"Zhenzan Zhou","email":"linuxosa@gmail.com","username":"zhenzanzhou"},"change_message_id":"4c800a7021197d6d939e8dfd49433ddae9ab55f8","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                and self.updated \u003e compute.updated_at):"},{"line_number":164,"context_line":"            return"},{"line_number":165,"context_line":"        # Compute node won\u0027t have useful info if never updated in DB."},{"line_number":166,"context_line":"        if compute.updated_at is None and compute.free_disk_gb is None:"},{"line_number":167,"context_line":"            LOG.warning(_LW(\"Host %(host)s just created wait for update\"),"},{"line_number":168,"context_line":"                {\u0027host\u0027: compute.host})"},{"line_number":169,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_2779eec8","line":166,"range":{"start_line":166,"start_character":50,"end_line":166,"end_character":62},"in_reply_to":"1a7b0d38_e2b68b89","updated":"2015-12-25 01:05:17.000000000","message":"Thanks for review. Any suggestions? Maybe check all three: free_disk_gb, free_ram_mb and vcpus_used?","commit_id":"f2de8502683336c026c11a82ae5bfd6f64972519"},{"author":{"_account_id":14762,"name":"Zhihai Song","email":"zhhsng@gmail.com","username":"ZhihaiSong"},"change_message_id":"5fc4573a23c7a19de9767dc244a3e4c49b98cf12","unresolved":false,"context_lines":[{"line_number":528,"context_line":"                    \"No compute service record found for host %(host)s\"),"},{"line_number":529,"context_line":"                    {\u0027host\u0027: compute.host})"},{"line_number":530,"context_line":"                continue"},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"            host \u003d compute.host"},{"line_number":533,"context_line":"            node \u003d compute.hypervisor_hostname"},{"line_number":534,"context_line":"            state_key \u003d (host, node)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_22649320","line":531,"updated":"2015-12-24 07:57:00.000000000","message":"not relavant to this change. :)","commit_id":"f2de8502683336c026c11a82ae5bfd6f64972519"},{"author":{"_account_id":13790,"name":"Zhenzan Zhou","email":"linuxosa@gmail.com","username":"zhenzanzhou"},"change_message_id":"4c800a7021197d6d939e8dfd49433ddae9ab55f8","unresolved":false,"context_lines":[{"line_number":528,"context_line":"                    \"No compute service record found for host %(host)s\"),"},{"line_number":529,"context_line":"                    {\u0027host\u0027: compute.host})"},{"line_number":530,"context_line":"                continue"},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"            host \u003d compute.host"},{"line_number":533,"context_line":"            node \u003d compute.hypervisor_hostname"},{"line_number":534,"context_line":"            state_key \u003d (host, node)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_077e32ae","line":531,"in_reply_to":"1a7b0d38_22649320","updated":"2015-12-25 01:05:17.000000000","message":"Will remove in next patch set.","commit_id":"f2de8502683336c026c11a82ae5bfd6f64972519"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"90925be8aa88c4889c5872143ba43b38e726ce51","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            LOG.warning(_LW(\"Host %(host)s just created wait for update\"),"},{"line_number":162,"context_line":"                {\u0027host\u0027: compute.host})"},{"line_number":163,"context_line":"            return False"},{"line_number":164,"context_line":"        # Required resource fields should not be None"},{"line_number":165,"context_line":"        if compute.free_disk_gb is None or \\"},{"line_number":166,"context_line":"           compute.free_ram_mb is None or \\"},{"line_number":167,"context_line":"           compute.local_gb_used is None or \\"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_ce095a33","line":164,"updated":"2015-12-30 13:48:16.000000000","message":"What are the circumstances when updated_at can be set and the required resource fields are not? Is that a bug that should be fixed instead?","commit_id":"cd7c5ec0dddfe150a8489d9378b012e755ba4a24"},{"author":{"_account_id":13790,"name":"Zhenzan Zhou","email":"linuxosa@gmail.com","username":"zhenzanzhou"},"change_message_id":"5d4817fffe8c3d924d300928493e57f6f1389ed6","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            LOG.warning(_LW(\"Host %(host)s just created wait for update\"),"},{"line_number":162,"context_line":"                {\u0027host\u0027: compute.host})"},{"line_number":163,"context_line":"            return False"},{"line_number":164,"context_line":"        # Required resource fields should not be None"},{"line_number":165,"context_line":"        if compute.free_disk_gb is None or \\"},{"line_number":166,"context_line":"           compute.free_ram_mb is None or \\"},{"line_number":167,"context_line":"           compute.local_gb_used is None or \\"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_3c5f0274","line":164,"in_reply_to":"fa69d971_ce095a33","updated":"2015-12-31 03:41:58.000000000","message":"You can use \u0027nova host-update\u0027 to update status and maintenance without touch those resource fields.","commit_id":"cd7c5ec0dddfe150a8489d9378b012e755ba4a24"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"90925be8aa88c4889c5872143ba43b38e726ce51","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        if compute.free_disk_gb is None or \\"},{"line_number":166,"context_line":"           compute.free_ram_mb is None or \\"},{"line_number":167,"context_line":"           compute.local_gb_used is None or \\"},{"line_number":168,"context_line":"           compute.vcpus_used is None:"},{"line_number":169,"context_line":"            LOG.warning(_LW(\"Host %(host)s not updated with valid data\"),"},{"line_number":170,"context_line":"                {\u0027host\u0027: compute.host})"},{"line_number":171,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_6e062e22","line":168,"updated":"2015-12-30 13:48:16.000000000","message":"Would it make sense for the required resource fields to be declared somewhere such that when the time comes that a new resource becomes required it can be added easily?\nAlso instead of using \\ line breaks, isn\u0027t the modern convention to enclose the broken statements in ()?","commit_id":"cd7c5ec0dddfe150a8489d9378b012e755ba4a24"},{"author":{"_account_id":13790,"name":"Zhenzan Zhou","email":"linuxosa@gmail.com","username":"zhenzanzhou"},"change_message_id":"5d4817fffe8c3d924d300928493e57f6f1389ed6","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        if compute.free_disk_gb is None or \\"},{"line_number":166,"context_line":"           compute.free_ram_mb is None or \\"},{"line_number":167,"context_line":"           compute.local_gb_used is None or \\"},{"line_number":168,"context_line":"           compute.vcpus_used is None:"},{"line_number":169,"context_line":"            LOG.warning(_LW(\"Host %(host)s not updated with valid data\"),"},{"line_number":170,"context_line":"                {\u0027host\u0027: compute.host})"},{"line_number":171,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_b7554b1e","line":168,"in_reply_to":"fa69d971_6e062e22","updated":"2015-12-31 03:41:58.000000000","message":"Good ideas, thanks.","commit_id":"cd7c5ec0dddfe150a8489d9378b012e755ba4a24"},{"author":{"_account_id":19318,"name":"aginwala","email":"aginwala@ebaysf.com","username":"aginwala"},"change_message_id":"237f797ea288e6db5a7d1a6f61d91db34ea1f906","unresolved":false,"context_lines":[{"line_number":184,"context_line":"                              compute.free_ram_mb,"},{"line_number":185,"context_line":"                              compute.local_gb_used,"},{"line_number":186,"context_line":"                              compute.vcpus_used]"},{"line_number":187,"context_line":"        # Compute node won\u0027t have useful info if never updated in DB."},{"line_number":188,"context_line":"        if compute.updated_at is None:"},{"line_number":189,"context_line":"            LOG.warning(_LW(\"Host %(host)s just created wait for update\"),"},{"line_number":190,"context_line":"                {\u0027host\u0027: compute.host})"},{"line_number":191,"context_line":"            return False"},{"line_number":192,"context_line":"        # Required resource fields should not be None"},{"line_number":193,"context_line":"        for res in required_resources:"},{"line_number":194,"context_line":"            if res is None:"},{"line_number":195,"context_line":"                LOG.warning(_LW(\"Host %(host)s not updated with valid data\"),"},{"line_number":196,"context_line":"                    {\u0027host\u0027: compute.host})"},{"line_number":197,"context_line":"                return False"},{"line_number":198,"context_line":"        return True"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def _update_from_compute_node(self, compute):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a57f1b5_707c4b1f","line":197,"range":{"start_line":187,"start_character":7,"end_line":197,"end_character":28},"updated":"2016-02-12 02:55:20.000000000","message":"You can just set it to 0 and filter will ignore this compute and hence it will not be picked up in scheduling. Also we don\u0027t need extra log I believe. \n\nSince you are covering all the 4 resources, I will abandon the patch @https://review.openstack.org/#/c/250767/","commit_id":"d23a8afa19c5be265ebb02ea0f5d6b1348640e6c"},{"author":{"_account_id":16929,"name":"Giridhar Jayavelu","email":"gjayavelu@vmware.com","username":"gjayavelu"},"change_message_id":"2d5cb5172abb00913bdff9de9183ad09b59584d2","unresolved":false,"context_lines":[{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def _update_from_compute_node(self, compute):"},{"line_number":202,"context_line":"        \"\"\"Update information about a host from a ComputeNode object.\"\"\""},{"line_number":203,"context_line":"        if (self.updated and compute.updated_at"},{"line_number":204,"context_line":"                and self.updated \u003e compute.updated_at):"},{"line_number":205,"context_line":"            return"},{"line_number":206,"context_line":"        # Skip update if it\u0027s not ready yet."}],"source_content_type":"text/x-python","patch_set":5,"id":"bae84128_03e730ad","line":203,"updated":"2016-02-24 17:57:41.000000000","message":"as per L189 if compute.updated_at is None, can we add the check here and return None?\n\nunder what scenario compute.updated_at will be set but NOT compute.vcpus_used and other required attributes?","commit_id":"72fef1de41396e2d265563761f21557b90d9b186"},{"author":{"_account_id":19318,"name":"aginwala","email":"aginwala@ebaysf.com","username":"aginwala"},"change_message_id":"5c4d424a680ab87bced39679c8ee798590865b5b","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                and self.updated \u003e compute.updated_at):"},{"line_number":205,"context_line":"            return"},{"line_number":206,"context_line":"        # Skip update if it\u0027s not ready yet."},{"line_number":207,"context_line":"        if not self._validate_compute_node(compute):"},{"line_number":208,"context_line":"            return"},{"line_number":209,"context_line":"        all_ram_mb \u003d compute.memory_mb"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        # Assume virtual size is all consumed by instances if use qcow2 disk."},{"line_number":212,"context_line":"        free_gb \u003d compute.free_disk_gb"},{"line_number":213,"context_line":"        least_gb \u003d compute.disk_available_least"},{"line_number":214,"context_line":"        if least_gb is not None:"},{"line_number":215,"context_line":"            if least_gb \u003e free_gb:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bae84128_b41b5f72","line":212,"range":{"start_line":207,"start_character":7,"end_line":212,"end_character":38},"updated":"2016-02-23 19:17:27.000000000","message":"Instead of doing revalidation  , I believe resetting the values would be a good pick rather then additional module. Like changing the values in _update_from_compute_node as below:\n\nfree_gb \u003d compute.free_disk_gb or 0\nself.free_ram_mb \u003d compute.free_ram_mb\nself.disk_mb_used \u003d (compute.local_gb_used or 0) * 1024\nself.vcpus_used \u003d compute.vcpus_used or 0\n\n In this way , if these values are None, it will be set to 0 to avoid code crash and hence filter will ignore this compute from the eligible list of computes  . Once the values are updated, it will be picked up .","commit_id":"72fef1de41396e2d265563761f21557b90d9b186"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"1f51d8b1b59d8f5cd5ec11eb19d7e5009ed44fef","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        # NOTE(jogo) free_ram_mb can be negative"},{"line_number":205,"context_line":"        self.free_ram_mb \u003d compute.free_ram_mb or 0"},{"line_number":206,"context_line":"        self.total_usable_ram_mb \u003d compute.memory_mb or 0"},{"line_number":207,"context_line":"        self.total_usable_disk_gb \u003d compute.local_gb"},{"line_number":208,"context_line":"        self.free_disk_mb \u003d free_disk_mb"},{"line_number":209,"context_line":"        self.vcpus_total \u003d compute.vcpus"},{"line_number":210,"context_line":"        self.vcpus_used \u003d compute.vcpus_used or 0"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aed3d3a_5c96da4c","line":207,"updated":"2016-02-27 00:04:34.000000000","message":"why not compute.local_gb or 0 here?","commit_id":"24040070ae0c07ece25c47aba10e73e6602b8806"}]}
