)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"aad9e3b1a8b0ca8120c88a18f4bc11360503ddca","unresolved":false,"context_lines":[{"line_number":10,"context_line":"consumption. All these params can be used as instance type attributes and"},{"line_number":11,"context_line":"are set as key-values in the instance_type_extra_specs."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"implement bp/quota-instance-resource"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I723c6df2579dd0161067fc5bf1c311f7ee66b3e9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAALH%2F%2FLaw%3D","line":13,"updated":"2012-10-09 18:20:52.000000000","message":"Can you change the format so a link will be created here","commit_id":"f4362e50bd811e253cc6ca3fa2c146206a372b87"}],"nova/compute/__init__.py":[{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"6ddea31df6199f02ff5b77a4bf49a5dd7ece2bc5","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def API(*args, **kwargs):"},{"line_number":26,"context_line":"    importutils \u003d nova.openstack.common.importutils"},{"line_number":27,"context_line":"    cls \u003d importutils.import_class(\"nova.compute.api.API\")"},{"line_number":28,"context_line":"    return cls(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2F31Q%3D","line":27,"updated":"2012-12-28 12:54:51.000000000","message":"Just wanna know any reason to replace CONF.compute_api_class with this hard coded version?","commit_id":"d128ff5ee80d82e77040e8b2073010bb078afb8b"},{"author":{"_account_id":1313,"name":"yaguang","display_name":"Yaguang Tang","email":"heut2008@gmail.com","username":"heut2008"},"change_message_id":"8961c30fd3167b2f2475be2a44944e8d92be9197","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def API(*args, **kwargs):"},{"line_number":26,"context_line":"    importutils \u003d nova.openstack.common.importutils"},{"line_number":27,"context_line":"    cls \u003d importutils.import_class(\"nova.compute.api.API\")"},{"line_number":28,"context_line":"    return cls(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2F3IM%3D","line":27,"in_reply_to":"AAAAM3%2F%2F31Q%3D","updated":"2012-12-30 15:29:10.000000000","message":"my flalt,.this is intend for anther bug fix.","commit_id":"d128ff5ee80d82e77040e8b2073010bb078afb8b"}],"nova/scheduler/filters/compute_capabilities_filter.py":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"aad9e3b1a8b0ca8120c88a18f4bc11360503ddca","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                continue"},{"line_number":38,"context_line":"            cap \u003d capabilities.get(key, None)"},{"line_number":39,"context_line":"            # NOTE(yaguang) extra_specs may contains more attributes that"},{"line_number":40,"context_line":"            # describle instances which compute drivers don\u0027t have."},{"line_number":41,"context_line":"            if not extra_specs_ops.match(cap, req) and cap is not None:"},{"line_number":42,"context_line":"                return False"},{"line_number":43,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2FLas%3D","line":40,"updated":"2012-10-09 18:20:52.000000000","message":"describle?","commit_id":"f4362e50bd811e253cc6ca3fa2c146206a372b87"},{"author":{"_account_id":3217,"name":"Ian Wells","username":"ijw-ubuntu"},"change_message_id":"174921f10bf15aba35ae315424f05cc9086a13c2","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            # NOTE(yaguang) extra_specs may contains more attributes that"},{"line_number":40,"context_line":"            # not only for scheduler."},{"line_number":41,"context_line":"            if not extra_specs_ops.match(cap, req) and cap is not None:"},{"line_number":42,"context_line":"                return False"},{"line_number":43,"context_line":"        return True"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def host_passes(self, host_state, filter_properties):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2FG0A%3D","line":42,"updated":"2012-10-24 03:56:27.000000000","message":"What should you be doing when the compute node\u0027s hypervisor doesn\u0027t support the extra_specs you have supplied?  \n\nIn a mixed-hypervisor system (libvirt+bare is the canonical case) perhaps you shouldn\u0027t schedule something with constraints on a node that doesn\u0027t support the constraints.  If that\u0027s the case, then the scheduler should be taking note of these extra_specs rather than ignoring them.","commit_id":"757773189c2236a20eae737296ff25b4f9279301"},{"author":{"_account_id":3217,"name":"Ian Wells","username":"ijw-ubuntu"},"change_message_id":"ad50f96aa51b43f3c3688e43bea231db2d2f81d2","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            # by a `:\u0027) will be ignored by this filter. (bug 1039386)"},{"line_number":36,"context_line":"            if key.count(\u0027:\u0027):"},{"line_number":37,"context_line":"                continue"},{"line_number":38,"context_line":"            cap \u003d capabilities.get(key, None)"},{"line_number":39,"context_line":"            # NOTE(yaguang) extra_specs may contains more attributes that"},{"line_number":40,"context_line":"            # not only for scheduler."},{"line_number":41,"context_line":"            if not extra_specs_ops.match(cap, req) and cap is not None:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F9HE%3D","line":38,"updated":"2012-11-14 14:00:13.000000000","message":"Previous comment about scheduling stands, quoted below.  TODO perhaps, and a bug post-commit?\n\n\"What should you be doing when the compute node\u0027s hypervisor doesn\u0027t support the extra_specs you have supplied?\n\nIn a mixed-hypervisor system (libvirt+bare is the canonical case) perhaps you shouldn\u0027t schedule something with constraints on a node that doesn\u0027t support the constraints. If that\u0027s the case, then the scheduler should be taking note of these extra_specs rather than ignoring them.\"","commit_id":"0f6812961764307ae2373611b5c82154af0a1b16"},{"author":{"_account_id":3217,"name":"Ian Wells","username":"ijw-ubuntu"},"change_message_id":"fbb43c4536996a7c5140d514054bb5511ef5dfce","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            # by a `:\u0027) will be ignored by this filter. (bug 1039386)"},{"line_number":36,"context_line":"            if key.count(\u0027:\u0027):"},{"line_number":37,"context_line":"                continue"},{"line_number":38,"context_line":"            cap \u003d capabilities.get(key, None)"},{"line_number":39,"context_line":"            # NOTE(yaguang) extra_specs may contains more attributes that"},{"line_number":40,"context_line":"            # not only for scheduler."},{"line_number":41,"context_line":"            if not extra_specs_ops.match(cap, req) and cap is not None:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F32g%3D","line":38,"in_reply_to":"AAAAMH%2F%2F79M%3D","updated":"2012-11-19 10:14:06.000000000","message":"Fine with me.  It wants solving but it wants doing as a separate problem; this is not the only thing it will affect.","commit_id":"0f6812961764307ae2373611b5c82154af0a1b16"},{"author":{"_account_id":1313,"name":"yaguang","display_name":"Yaguang Tang","email":"heut2008@gmail.com","username":"heut2008"},"change_message_id":"bb19ef68df49828f9c9c82627f69a861d33c39e9","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            # by a `:\u0027) will be ignored by this filter. (bug 1039386)"},{"line_number":36,"context_line":"            if key.count(\u0027:\u0027):"},{"line_number":37,"context_line":"                continue"},{"line_number":38,"context_line":"            cap \u003d capabilities.get(key, None)"},{"line_number":39,"context_line":"            # NOTE(yaguang) extra_specs may contains more attributes that"},{"line_number":40,"context_line":"            # not only for scheduler."},{"line_number":41,"context_line":"            if not extra_specs_ops.match(cap, req) and cap is not None:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F79M%3D","line":38,"in_reply_to":"AAAAMH%2F%2F9HE%3D","updated":"2012-11-19 02:46:54.000000000","message":"a simple way to slove this is we should add hypervisor type into the instance extra_specs, to tell the scheduler only the specified compute node support this instance_type ,what do you think about this.","commit_id":"0f6812961764307ae2373611b5c82154af0a1b16"},{"author":{"_account_id":3217,"name":"Ian Wells","username":"ijw-ubuntu"},"change_message_id":"ad50f96aa51b43f3c3688e43bea231db2d2f81d2","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                continue"},{"line_number":38,"context_line":"            cap \u003d capabilities.get(key, None)"},{"line_number":39,"context_line":"            # NOTE(yaguang) extra_specs may contains more attributes that"},{"line_number":40,"context_line":"            # not only for scheduler."},{"line_number":41,"context_line":"            if not extra_specs_ops.match(cap, req) and cap is not None:"},{"line_number":42,"context_line":"                return False"},{"line_number":43,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F9HM%3D","line":40,"updated":"2012-11-14 14:00:13.000000000","message":"... and if it does, then what?  Complete the thought in your comment.","commit_id":"0f6812961764307ae2373611b5c82154af0a1b16"},{"author":{"_account_id":1313,"name":"yaguang","display_name":"Yaguang Tang","email":"heut2008@gmail.com","username":"heut2008"},"change_message_id":"c06bda0b8d739f910ad8d6afdbd84006741ecf05","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                continue"},{"line_number":38,"context_line":"            cap \u003d capabilities.get(key, None)"},{"line_number":39,"context_line":"            # NOTE(yaguang) extra_specs may contains more attributes that"},{"line_number":40,"context_line":"            # not only for scheduler."},{"line_number":41,"context_line":"            if not extra_specs_ops.match(cap, req) and cap is not None:"},{"line_number":42,"context_line":"                return False"},{"line_number":43,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F2TM%3D","line":40,"in_reply_to":"AAAAMH%2F%2F9HM%3D","updated":"2012-11-20 07:00:23.000000000","message":"Instead of making changes here, I think it would be better to enhance the capabilities\n the driver provide, we can add hardware related such as GPU, PCI-passthrough, and \nbandwidth to the capabilities.","commit_id":"0f6812961764307ae2373611b5c82154af0a1b16"}],"nova/virt/libvirt/designer.py":[{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"0993fff531c51a4970b16c578afce889b61b93e1","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            conf.add_filter_param(\"PROJMASK6\", prefix)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"def set_vif_bandwidth_config(conf, instance):"},{"line_number":105,"context_line":"    \"\"\"Config vif inbound/outbound bandwidth limit.\"\"\""},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    bandwidth_items \u003d [\u0027inbound_average\u0027, \u0027inbound_peak\u0027, \u0027inbound_burst\u0027,"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAM3%2F%2FXa8%3D","line":104,"updated":"2013-01-25 11:25:20.000000000","message":"I\u0027m a little uncomfortable with this interface passing by the whole instance reference. If \u0027extra_spec\u0027 is the only information here to construct the bandwidth control, then \u0027extra_spec\u0027 should be the input argument instead of instance.","commit_id":"98ba7a4950226efc1d124da22cde2ed1fffaa0da"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":4468,"name":"Wangpan","email":"hzwangpan@corp.netease.com","username":"hzwangpan"},"change_message_id":"3d9a3e2c328222a1c78dbb3c153077c15e903d96","unresolved":false,"context_lines":[{"line_number":1690,"context_line":"        quota_items \u003d [\u0027cpu_shares\u0027, \u0027cpu_period\u0027, \u0027cpu_quota\u0027]"},{"line_number":1691,"context_line":"        for key, value in inst_type[\u0027extra_specs\u0027].iteritems():"},{"line_number":1692,"context_line":"            if key in quota_items:"},{"line_number":1693,"context_line":"                guest.key \u003d value"},{"line_number":1694,"context_line":"        guest.cpu \u003d self.get_guest_cpu_config()"},{"line_number":1695,"context_line":""},{"line_number":1696,"context_line":"        root_device_name \u003d driver.block_device_info_get_root(block_device_info)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2F0EY%3D","line":1693,"updated":"2012-11-05 06:01:45.000000000","message":"This line will only add a \u0027key\u0027 attribute to \u0027guest\u0027, will NOT change the value of the attribute in quota_items which you really want to change.","commit_id":"757773189c2236a20eae737296ff25b4f9279301"},{"author":{"_account_id":1313,"name":"yaguang","display_name":"Yaguang Tang","email":"heut2008@gmail.com","username":"heut2008"},"change_message_id":"12ae5ed2f9d49c929bb1c8cf2379e01bf7af00e0","unresolved":false,"context_lines":[{"line_number":1690,"context_line":"        quota_items \u003d [\u0027cpu_shares\u0027, \u0027cpu_period\u0027, \u0027cpu_quota\u0027]"},{"line_number":1691,"context_line":"        for key, value in inst_type[\u0027extra_specs\u0027].iteritems():"},{"line_number":1692,"context_line":"            if key in quota_items:"},{"line_number":1693,"context_line":"                guest.key \u003d value"},{"line_number":1694,"context_line":"        guest.cpu \u003d self.get_guest_cpu_config()"},{"line_number":1695,"context_line":""},{"line_number":1696,"context_line":"        root_device_name \u003d driver.block_device_info_get_root(block_device_info)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2Fz88%3D","line":1693,"in_reply_to":"AAAALn%2F%2F0EY%3D","updated":"2012-11-05 10:29:19.000000000","message":"thanks hzwangpan,I will change to update the guest dict.","commit_id":"757773189c2236a20eae737296ff25b4f9279301"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"0d3c48560c89ff5bdd13d822fbc0b6f9bd515cff","unresolved":false,"context_lines":[{"line_number":1730,"context_line":"        guest.vcpus \u003d inst_type[\u0027vcpus\u0027]"},{"line_number":1731,"context_line":""},{"line_number":1732,"context_line":"        cpu_quota \u003d {\u0027cpu_quota\u0027: 0, \u0027cpu_period\u0027: 100000}"},{"line_number":1733,"context_line":"        # NOTE(yaguang): set instance vcpu to psychical CPU ratio using cgroup."},{"line_number":1734,"context_line":"        # \u0027period\u0027 should be in range [1000, 1000000], and \u0027quota\u0027 in range"},{"line_number":1735,"context_line":"        # [1000, 18446744073709551], \u0027quota\u0027 with value 0 means no value."},{"line_number":1736,"context_line":"        if instance[\u0027extra_specs\u0027] is not None:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2F73o%3D","line":1733,"updated":"2012-12-19 23:03:28.000000000","message":"psychcal\u003d\u003ephysical","commit_id":"80e2e2b51ad2dd1ade0d46ff8022d1a00e6087d7"},{"author":{"_account_id":4468,"name":"Wangpan","email":"hzwangpan@corp.netease.com","username":"hzwangpan"},"change_message_id":"2b0ce55853a1c07bd2b0236b691bb3aac02a84db","unresolved":false,"context_lines":[{"line_number":1738,"context_line":"        # NOTE(yaguang): set instance vcpu to physical ratio using cgroup."},{"line_number":1739,"context_line":"        # \u0027period\u0027 should be in range [1000, 1000000], and \u0027quota\u0027 in range"},{"line_number":1740,"context_line":"        # [1000, 18446744073709551], \u0027quota\u0027 with value 0 means no value."},{"line_number":1741,"context_line":"        if instance[\u0027extra_specs\u0027] is not None:"},{"line_number":1742,"context_line":"            for key, value in instance[\u0027extra_specs\u0027].iteritems():"},{"line_number":1743,"context_line":"                if key \u003d\u003d \"cpu_unit\" and float(value) \u003e 0.01:"},{"line_number":1744,"context_line":"                    cpu_quota[\u0027cpu_quota\u0027] \u003d int(cpu_quota[\u0027cpu_period\u0027] *"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2F6aU%3D","line":1741,"updated":"2012-12-21 06:06:19.000000000","message":"question: is instance has this key \u0027extra_specs\u0027?","commit_id":"dec0e2fc1289e26b5e0bfe65a6cd4f9e2471ee95"},{"author":{"_account_id":1313,"name":"yaguang","display_name":"Yaguang Tang","email":"heut2008@gmail.com","username":"heut2008"},"change_message_id":"b5a06297e1d194373b8694540f13cf7b1e6e30da","unresolved":false,"context_lines":[{"line_number":1738,"context_line":"        # NOTE(yaguang): set instance vcpu to physical ratio using cgroup."},{"line_number":1739,"context_line":"        # \u0027period\u0027 should be in range [1000, 1000000], and \u0027quota\u0027 in range"},{"line_number":1740,"context_line":"        # [1000, 18446744073709551], \u0027quota\u0027 with value 0 means no value."},{"line_number":1741,"context_line":"        if instance[\u0027extra_specs\u0027] is not None:"},{"line_number":1742,"context_line":"            for key, value in instance[\u0027extra_specs\u0027].iteritems():"},{"line_number":1743,"context_line":"                if key \u003d\u003d \"cpu_unit\" and float(value) \u003e 0.01:"},{"line_number":1744,"context_line":"                    cpu_quota[\u0027cpu_quota\u0027] \u003d int(cpu_quota[\u0027cpu_period\u0027] *"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2F6ZY%3D","line":1741,"in_reply_to":"AAAAM3%2F%2F6aU%3D","updated":"2012-12-21 06:46:32.000000000","message":"yes, this has been added in the db layer. but still need to fix the issue with the compute_capability filter. it checks the capabiliity that updated by the compute node to match the extra_specs, the \"cpu_unit\" isn\u0027t in the dict.","commit_id":"dec0e2fc1289e26b5e0bfe65a6cd4f9e2471ee95"},{"author":{"_account_id":4468,"name":"Wangpan","email":"hzwangpan@corp.netease.com","username":"hzwangpan"},"change_message_id":"3cc54b1c2a7a8975ca90c405893d8b52bb34cd26","unresolved":false,"context_lines":[{"line_number":1762,"context_line":"        # [1000, 18446744073709551], \u0027quota\u0027 with value 0 means no value."},{"line_number":1763,"context_line":"        if instance[\u0027extra_specs\u0027] is not None:"},{"line_number":1764,"context_line":"            for key, value in instance[\u0027extra_specs\u0027].iteritems():"},{"line_number":1765,"context_line":"                if key \u003d\u003d \"cpu_unit\" and float(value) \u003e 0.01:"},{"line_number":1766,"context_line":"                    cpu_quota[\u0027cpu_quota\u0027] \u003d int(cpu_quota[\u0027cpu_period\u0027] *"},{"line_number":1767,"context_line":"                         float(value))"},{"line_number":1768,"context_line":"            for k, v in cpu_quota.iteritems():"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2F6Y8%3D","line":1765,"updated":"2012-12-21 07:59:16.000000000","message":"why not to add a \u0027:\u0027 at the end of keys which you add to extra_specs? like \u0027cpu_unit:\u0027, then the compute capabilities filter will ignore this key.","commit_id":"0792a919bc3074733861ac8ca0e6c83080ea37d3"},{"author":{"_account_id":4468,"name":"Wangpan","email":"hzwangpan@corp.netease.com","username":"hzwangpan"},"change_message_id":"3cacc3fdd49f5cffe3bb8d51147572fd37bcd4b0","unresolved":false,"context_lines":[{"line_number":1762,"context_line":"        # [1000, 18446744073709551], \u0027quota\u0027 with value 0 means no value."},{"line_number":1763,"context_line":"        if instance[\u0027extra_specs\u0027] is not None:"},{"line_number":1764,"context_line":"            for key, value in instance[\u0027extra_specs\u0027].iteritems():"},{"line_number":1765,"context_line":"                if key \u003d\u003d \"cpu_unit\" and float(value) \u003e 0.01:"},{"line_number":1766,"context_line":"                    cpu_quota[\u0027cpu_quota\u0027] \u003d int(cpu_quota[\u0027cpu_period\u0027] *"},{"line_number":1767,"context_line":"                         float(value))"},{"line_number":1768,"context_line":"            for k, v in cpu_quota.iteritems():"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2F6WU%3D","line":1765,"in_reply_to":"AAAAM3%2F%2F6Y0%3D","updated":"2012-12-21 09:46:28.000000000","message":"Done","commit_id":"0792a919bc3074733861ac8ca0e6c83080ea37d3"},{"author":{"_account_id":1313,"name":"yaguang","display_name":"Yaguang Tang","email":"heut2008@gmail.com","username":"heut2008"},"change_message_id":"49fb862227d9f26f78e07134fa0f5e8de32a9f83","unresolved":false,"context_lines":[{"line_number":1762,"context_line":"        # [1000, 18446744073709551], \u0027quota\u0027 with value 0 means no value."},{"line_number":1763,"context_line":"        if instance[\u0027extra_specs\u0027] is not None:"},{"line_number":1764,"context_line":"            for key, value in instance[\u0027extra_specs\u0027].iteritems():"},{"line_number":1765,"context_line":"                if key \u003d\u003d \"cpu_unit\" and float(value) \u003e 0.01:"},{"line_number":1766,"context_line":"                    cpu_quota[\u0027cpu_quota\u0027] \u003d int(cpu_quota[\u0027cpu_period\u0027] *"},{"line_number":1767,"context_line":"                         float(value))"},{"line_number":1768,"context_line":"            for k, v in cpu_quota.iteritems():"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2F6Y0%3D","line":1765,"in_reply_to":"AAAAM3%2F%2F6Y8%3D","updated":"2012-12-21 08:11:00.000000000","message":"yes, it is a way to solve the problem, but in a mix hyper env, hince both kvm and xen, the instance which want to use this feather should  be scheduled to kvm based servers. add cpu_unit to server capabilities dict which is updated by the hyperv driver can slove this in a  more simple way.","commit_id":"0792a919bc3074733861ac8ca0e6c83080ea37d3"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"9ab6cc47bea974b744f3fbee214743ea50888fe0","unresolved":false,"context_lines":[{"line_number":1669,"context_line":"        guest.memory \u003d inst_type[\u0027memory_mb\u0027] * 1024"},{"line_number":1670,"context_line":"        guest.vcpus \u003d inst_type[\u0027vcpus\u0027]"},{"line_number":1671,"context_line":""},{"line_number":1672,"context_line":"        cpu_quota \u003d {\u0027cpu_quota\u0027: 0, \u0027cpu_period\u0027: 100000}"},{"line_number":1673,"context_line":"        # NOTE(yaguang): set instance vcpu to physical ratio using cgroup."},{"line_number":1674,"context_line":"        # \u0027period\u0027 should be in range [1000, 1000000], and \u0027quota\u0027 in range"},{"line_number":1675,"context_line":"        # [1000, 18446744073709551], \u0027quota\u0027 with value 0 means no value."}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2F2sk%3D","line":1672,"updated":"2013-01-01 14:37:20.000000000","message":"I think you also need to make this cpu_period value configurable. \n\nSo, together with cpu_period (enforcement interval) *AND* cpu_unit (ratio), libvirt driver can determine the the quota value.\n\nBTW, I\u0027m also having another question here. Why not directly expose libvirt quota/period value for CPU tuning? Which is much more straing forward and flexible in my opinion.","commit_id":"ab7bf7608864190d070bfed69304dccf146cd76b"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"cba4a46ffa7ce30707035a9814d76a8a924afa65","unresolved":false,"context_lines":[{"line_number":1669,"context_line":"        guest.memory \u003d inst_type[\u0027memory_mb\u0027] * 1024"},{"line_number":1670,"context_line":"        guest.vcpus \u003d inst_type[\u0027vcpus\u0027]"},{"line_number":1671,"context_line":""},{"line_number":1672,"context_line":"        cpu_quota \u003d {\u0027cpu_quota\u0027: 0, \u0027cpu_period\u0027: 100000}"},{"line_number":1673,"context_line":"        # NOTE(yaguang): set instance vcpu to physical ratio using cgroup."},{"line_number":1674,"context_line":"        # \u0027period\u0027 should be in range [1000, 1000000], and \u0027quota\u0027 in range"},{"line_number":1675,"context_line":"        # [1000, 18446744073709551], \u0027quota\u0027 with value 0 means no value."}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2F2kk%3D","line":1672,"in_reply_to":"AAAAM3%2F%2F2pg%3D","updated":"2013-01-02 12:26:46.000000000","message":"Well, according to blueprint description, this change is solely for libvirt driver, taking advantage of underlying cgroup resource limiting feature, to provide better instance resource control.\n\nSo the question here is, since Libvirt has already provide abstraction for resource control, \u0027cputune\u0027 in this case, for cpu share in \u0027cpu\u0027 cgroup subsystem, and for \u0027period\u0027 and \u0027quota\u0027 for cfs_period/cfs_quota. Why bother creating another \u0027cpu_unit\u0027 here?\n\nAfterall, with shares/period/quota, cloud admins could achieve much more other flexible resource limiting features, as well as so called cpu_unit here.\n\nSo, in my opinion, \u0027cpu_unit\u0027 concept here is unnecessary. Even it is desirable as a high level feature, we should still preserve the flexibility to allow configurable cpu_quota and cpu_period, instead of hardcoded \u0027cpu_period\u0027 as shown above.","commit_id":"ab7bf7608864190d070bfed69304dccf146cd76b"},{"author":{"_account_id":1313,"name":"yaguang","display_name":"Yaguang Tang","email":"heut2008@gmail.com","username":"heut2008"},"change_message_id":"c0fa0f8480ab24797904f27bba43467bef98d945","unresolved":false,"context_lines":[{"line_number":1669,"context_line":"        guest.memory \u003d inst_type[\u0027memory_mb\u0027] * 1024"},{"line_number":1670,"context_line":"        guest.vcpus \u003d inst_type[\u0027vcpus\u0027]"},{"line_number":1671,"context_line":""},{"line_number":1672,"context_line":"        cpu_quota \u003d {\u0027cpu_quota\u0027: 0, \u0027cpu_period\u0027: 100000}"},{"line_number":1673,"context_line":"        # NOTE(yaguang): set instance vcpu to physical ratio using cgroup."},{"line_number":1674,"context_line":"        # \u0027period\u0027 should be in range [1000, 1000000], and \u0027quota\u0027 in range"},{"line_number":1675,"context_line":"        # [1000, 18446744073709551], \u0027quota\u0027 with value 0 means no value."}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2F2pg%3D","line":1672,"in_reply_to":"AAAAM3%2F%2F2sk%3D","updated":"2013-01-02 05:20:13.000000000","message":"Actualy, I have submitted patches that directly expose libvirt cpu tune params which totaly configurable to user, but think openstack supports more than one hyper\u0027,other\nhyper drivers may have different way implement this feather, so make a high level abstract for this. and provide a unified configuration for user view. does it make any sense?","commit_id":"ab7bf7608864190d070bfed69304dccf146cd76b"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"0993fff531c51a4970b16c578afce889b61b93e1","unresolved":false,"context_lines":[{"line_number":1705,"context_line":"        guest.vcpus \u003d inst_type[\u0027vcpus\u0027]"},{"line_number":1706,"context_line":""},{"line_number":1707,"context_line":"        quota_items \u003d [\u0027cpu_shares\u0027, \u0027cpu_period\u0027, \u0027cpu_quota\u0027]"},{"line_number":1708,"context_line":"        for key, value in instance[\u0027extra_specs\u0027].iteritems():"},{"line_number":1709,"context_line":"            if key in quota_items:"},{"line_number":1710,"context_line":"                setattr(self.key, value)"},{"line_number":1711,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAM3%2F%2FXbI%3D","line":1708,"updated":"2013-01-25 11:25:20.000000000","message":"I don\u0027t think \u0027instance\u0027 object contains \u0027extra_specs\u0027 key here, because it was not serialized / packed into \u0027instance\u0027 in compute rpcapi layer.","commit_id":"98ba7a4950226efc1d124da22cde2ed1fffaa0da"},{"author":{"_account_id":1313,"name":"yaguang","display_name":"Yaguang Tang","email":"heut2008@gmail.com","username":"heut2008"},"change_message_id":"252ab21b85f591390753d774c3aacb8abe37f44b","unresolved":false,"context_lines":[{"line_number":1705,"context_line":"        guest.vcpus \u003d inst_type[\u0027vcpus\u0027]"},{"line_number":1706,"context_line":""},{"line_number":1707,"context_line":"        quota_items \u003d [\u0027cpu_shares\u0027, \u0027cpu_period\u0027, \u0027cpu_quota\u0027]"},{"line_number":1708,"context_line":"        for key, value in instance[\u0027extra_specs\u0027].iteritems():"},{"line_number":1709,"context_line":"            if key in quota_items:"},{"line_number":1710,"context_line":"                setattr(self.key, value)"},{"line_number":1711,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAM3%2F%2FMxY%3D","line":1708,"in_reply_to":"AAAAM3%2F%2FXbI%3D","updated":"2013-02-03 15:39:13.000000000","message":"This is done at the db layer. see db/sqlalchemy/api.py from line #1835 to #1855","commit_id":"98ba7a4950226efc1d124da22cde2ed1fffaa0da"},{"author":{"_account_id":1711,"name":"Yun Mao","email":"yunmao@gmail.com","username":"yunmao"},"change_message_id":"63a40ef2546de3d2345668762fb208cb7f52ac7f","unresolved":false,"context_lines":[{"line_number":1789,"context_line":"        quota_items \u003d [\u0027cpu_shares\u0027, \u0027cpu_period\u0027, \u0027cpu_quota\u0027]"},{"line_number":1790,"context_line":"        for key, value in instance[\u0027extra_specs\u0027].iteritems():"},{"line_number":1791,"context_line":"            if key in quota_items:"},{"line_number":1792,"context_line":"                setattr(guest.key, value)"},{"line_number":1793,"context_line":""},{"line_number":1794,"context_line":"        guest.cpu \u003d self.get_guest_cpu_config()"},{"line_number":1795,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAM3%2F%2FD6w%3D","line":1792,"updated":"2013-02-08 14:14:36.000000000","message":"did you mean setattr(guest, key, value)?","commit_id":"782e087950c768ddfe1310dddbdd6f8fe4478be6"}],"nova/virt/libvirt/imagebackend.py":[{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"282b83d585eca252f784cbe6532b2d6189fc6e41","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        info.driver_name \u003d driver_name"},{"line_number":102,"context_line":"        info.source_path \u003d self.path"},{"line_number":103,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":104,"context_line":"        inst_type \u003d db.instance_type_get(ctxt, instance[\u0027instance_type_id\u0027])"},{"line_number":105,"context_line":"        quota_items \u003d [\u0027read_bytes_sec\u0027, \u0027read_iops_sec\u0027, \u0027write_bytes_sec\u0027,"},{"line_number":106,"context_line":"                       \u0027write_iops_sec\u0027, \u0027total_bytes_sec\u0027, \u0027total_iops_sec\u0027]"},{"line_number":107,"context_line":"        # Currently, the only tuning available is Block I/O throttling for"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2FJwg%3D","line":104,"updated":"2012-10-10 20:46:45.000000000","message":"ditto","commit_id":"757773189c2236a20eae737296ff25b4f9279301"},{"author":{"_account_id":3217,"name":"Ian Wells","username":"ijw-ubuntu"},"change_message_id":"ad50f96aa51b43f3c3688e43bea231db2d2f81d2","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        driver_name \u003d libvirt_utils.pick_disk_driver_name(self.is_block_dev)"},{"line_number":103,"context_line":"        info.driver_name \u003d driver_name"},{"line_number":104,"context_line":"        info.source_path \u003d self.path"},{"line_number":105,"context_line":"        quota_items \u003d [\u0027read_bytes_sec\u0027, \u0027read_iops_sec\u0027, \u0027write_bytes_sec\u0027,"},{"line_number":106,"context_line":"                      \u0027write_iops_sec\u0027, \u0027total_bytes_sec\u0027, \u0027total_iops_sec\u0027]"},{"line_number":107,"context_line":"        inst_type \u003d instance[\u0027instance_type\u0027]"},{"line_number":108,"context_line":"        # Note(Yaguang): Currently, the only tuning available is Block I/O"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F9Hc%3D","line":105,"updated":"2012-11-14 14:00:13.000000000","message":"If you\u0027re willing to use a loop here then why not in the code in driver.py as well?","commit_id":"0f6812961764307ae2373611b5c82154af0a1b16"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"0993fff531c51a4970b16c578afce889b61b93e1","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        pass"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def libvirt_info(self, disk_bus, disk_dev, device_type, cache_mode,"},{"line_number":86,"context_line":"            instance):"},{"line_number":87,"context_line":"        \"\"\"Get `LibvirtConfigGuestDisk` filled for this image."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        :disk_dev: Disk bus device name"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAM3%2F%2FXa4%3D","line":86,"updated":"2013-01-25 11:25:20.000000000","message":"Same comments in designer.py, and here\u0027s the quote.\n\nI\u0027m a little uncomfortable with this interface passing by the whole instance reference. If \u0027extra_spec\u0027 is the only information here to construct the bandwidth control, then \u0027extra_spec\u0027 should be the input argument instead of instance.","commit_id":"98ba7a4950226efc1d124da22cde2ed1fffaa0da"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"0993fff531c51a4970b16c578afce889b61b93e1","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        # Note(yaguang): Currently, the only tuning available is Block I/O"},{"line_number":109,"context_line":"        # throttling for qemu."},{"line_number":110,"context_line":"        if self.source_type \u003d\u003d \"file\":"},{"line_number":111,"context_line":"            for key, value in instance[\u0027extra_specs\u0027].iteritems():"},{"line_number":112,"context_line":"                if key in tune_items:"},{"line_number":113,"context_line":"                    setattr(self.key, value)"},{"line_number":114,"context_line":"        return info"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAM3%2F%2FXa0%3D","line":111,"updated":"2013-01-25 11:25:20.000000000","message":"Same comment in driver.py, and here\u0027s the quote.\n\nI don\u0027t think \u0027instance\u0027 object contains \u0027extra_specs\u0027 key here, because it was not serialized / packed into \u0027instance\u0027 in compute rpcapi layer.","commit_id":"98ba7a4950226efc1d124da22cde2ed1fffaa0da"},{"author":{"_account_id":1711,"name":"Yun Mao","email":"yunmao@gmail.com","username":"yunmao"},"change_message_id":"63a40ef2546de3d2345668762fb208cb7f52ac7f","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        if self.source_type \u003d\u003d \"file\":"},{"line_number":111,"context_line":"            for key, value in extra_specs.iteritems():"},{"line_number":112,"context_line":"                if key in tune_items:"},{"line_number":113,"context_line":"                    setattr(self.key, value)"},{"line_number":114,"context_line":"        return info"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def cache(self, fetch_func, filename, size\u003dNone, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAM3%2F%2FD7A%3D","line":113,"updated":"2013-02-08 14:14:36.000000000","message":"setattr takes 3 parameters. and there is no self.key","commit_id":"782e087950c768ddfe1310dddbdd6f8fe4478be6"}],"nova/virt/libvirt/vif.py":[{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"282b83d585eca252f784cbe6532b2d6189fc6e41","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        inst_type_id \u003d instance[\u0027instance_type_id\u0027]"},{"line_number":89,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":90,"context_line":"        inst_type \u003d db.instance_type_get(ctxt, instance[\u0027instance_type_id\u0027])"},{"line_number":91,"context_line":"        bandwidth_items \u003d [\u0027inbound_average\u0027, \u0027inbound_peak\u0027, \u0027inbound_burst\u0027,"},{"line_number":92,"context_line":"            \u0027outbound_average\u0027, \u0027outbound_peak\u0027, \u0027outbound_burst\u0027]"},{"line_number":93,"context_line":"        for key, value in inst_type[\u0027extra_specs\u0027].iteritems():"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2FJwo%3D","line":90,"updated":"2012-10-10 20:46:45.000000000","message":"we really need to avoid adding db requests at this level. Is there any way we can pass the extra specs much earlier?\n\nAt the very least this should be using the common instance type code:\n\ninstance_types.get_instance_type(inst_type_id)\n\nSo that it can be moved later. But I really think the right solution here is to copy the instance_type data (and maybe the extra spec data?) into the instances table (or perhaps system_metadata table) so that we don\u0027t have to be making db requests down here.","commit_id":"757773189c2236a20eae737296ff25b4f9279301"},{"author":{"_account_id":1313,"name":"yaguang","display_name":"Yaguang Tang","email":"heut2008@gmail.com","username":"heut2008"},"change_message_id":"e386ab6ce2309a25ac81db84723b18b878941a45","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        inst_type_id \u003d instance[\u0027instance_type_id\u0027]"},{"line_number":89,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":90,"context_line":"        inst_type \u003d db.instance_type_get(ctxt, instance[\u0027instance_type_id\u0027])"},{"line_number":91,"context_line":"        bandwidth_items \u003d [\u0027inbound_average\u0027, \u0027inbound_peak\u0027, \u0027inbound_burst\u0027,"},{"line_number":92,"context_line":"            \u0027outbound_average\u0027, \u0027outbound_peak\u0027, \u0027outbound_burst\u0027]"},{"line_number":93,"context_line":"        for key, value in inst_type[\u0027extra_specs\u0027].iteritems():"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2FIsg%3D","line":90,"in_reply_to":"AAAALH%2F%2FJwo%3D","updated":"2012-10-12 12:53:24.000000000","message":"How about  add a  system_meta dict param to the libvirt spawn() driver ,it can contains\nextra_specs key-values,and in the future,instance pci-passthrough params  may also be pass to driver by this way.","commit_id":"757773189c2236a20eae737296ff25b4f9279301"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"282b83d585eca252f784cbe6532b2d6189fc6e41","unresolved":false,"context_lines":[{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        inst_type_id \u003d instance[\u0027instance_type_id\u0027]"},{"line_number":184,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":185,"context_line":"        inst_type \u003d db.instance_type_get(ctxt, instance[\u0027instance_type_id\u0027])"},{"line_number":186,"context_line":"        bandwidth_items \u003d [\u0027inbound_average\u0027, \u0027inbound_peak\u0027, \u0027inbound_burst\u0027,"},{"line_number":187,"context_line":"            \u0027outbound_average\u0027, \u0027outbound_peak\u0027, \u0027outbound_burst\u0027]"},{"line_number":188,"context_line":"        for key, value in inst_type[\u0027extra_specs\u0027].iteritems():"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2FJwk%3D","line":185,"updated":"2012-10-10 20:46:45.000000000","message":"ditto","commit_id":"757773189c2236a20eae737296ff25b4f9279301"}]}
