)]}'
{"specs/liberty/approved/cpu-model-per-flavor-or-image.rst":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"e7e4276b7af19df3740b296794c0469597d4beaf","unresolved":false,"context_lines":[{"line_number":39,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"The change would allow allow specifying the desired CPU model as"},{"line_number":42,"context_line":"\"hw:cpu_model\u003d\u003cmodel\u003e\" in the flavor extra specs, or \"hw_cpu_model\u003d\u003cmodel\u003e\" in"},{"line_number":43,"context_line":"the image metadata, where model is specified the same way as in the nova config"},{"line_number":44,"context_line":"file (which is the same as what is understood by libvirt)."},{"line_number":45,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"7ad32947_d1cee3b3","line":42,"updated":"2015-04-27 17:32:43.000000000","message":"In nova.conf we currently allow two configs\n\n cpu_mode\u003dhost-model|host-passthrough|custom\n cpu_model\u003d\u003cnamed CPU\u003e\n\nThe second option is used if the first is set to \u0027custom\u0027.\n\nI think we probably need to map both of those into flavor/image properties, because the ability to ask for a host model is compelling in some use cases.\n\nWe should make it clear that the image property is *only* honoured, if the flavour property is *not* set. This allows the cloud admin to set the CPU on the flavour and prevent the user from overriding it, which is an important resource control mechanism","commit_id":"c96c86e515453bc73ba35443b91d570ee3db7688"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"281623e0e03d7c5bf7887253de24c77e9b0ed734","unresolved":false,"context_lines":[{"line_number":39,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"The change would allow allow specifying the desired CPU model as"},{"line_number":42,"context_line":"\"hw:cpu_model\u003d\u003cmodel\u003e\" in the flavor extra specs, or \"hw_cpu_model\u003d\u003cmodel\u003e\" in"},{"line_number":43,"context_line":"the image metadata, where model is specified the same way as in the nova config"},{"line_number":44,"context_line":"file (which is the same as what is understood by libvirt)."},{"line_number":45,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"5ad0253b_fbdd1e71","line":42,"in_reply_to":"7ad32947_d1cee3b3","updated":"2015-04-29 13:59:15.000000000","message":"thanks that clears it up, +1","commit_id":"c96c86e515453bc73ba35443b91d570ee3db7688"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8784205b17597548a2f393bf113da1b11483fdfb","unresolved":false,"context_lines":[{"line_number":41,"context_line":"The change would allow allow specifying the desired CPU model as"},{"line_number":42,"context_line":"\"hw:cpu_model\u003d\u003cmodel\u003e\" in the flavor extra specs, or \"hw_cpu_model\u003d\u003cmodel\u003e\" in"},{"line_number":43,"context_line":"the image metadata, where model is specified the same way as in the nova config"},{"line_number":44,"context_line":"file (which is the same as what is understood by libvirt)."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"A new scheduler filter will be written to filter out hosts with CPUs that are"},{"line_number":47,"context_line":"lower-grade than the specified model, and libvirt will be modified to set the"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9abe1de1_6c1dff0e","line":44,"updated":"2015-04-27 11:16:19.000000000","message":"I think we are mixing flavor extra specs and image properties too much already. I want to take a step back and understand this more, but I think this makes some sense, as two ways for a user to direct their builds to specific hosts and get the capabilities you need. But let me think about that a little more.","commit_id":"c96c86e515453bc73ba35443b91d570ee3db7688"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8784205b17597548a2f393bf113da1b11483fdfb","unresolved":false,"context_lines":[{"line_number":48,"context_line":"instance CPU model to the specified model."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"All this would only take place if the config file for the compute node"},{"line_number":51,"context_line":"specifies virt_type\u003d\"kvm|qemu\" and cpu_mode\u003d\"none\"."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"Alternatives"},{"line_number":54,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9abe1de1_ac5b172e","line":51,"updated":"2015-04-27 11:16:19.000000000","message":"Can you please define the model concept in a cross hypervisor way?\n\nIt seems reasonable for Xen users to request a host that has SSE available, if thats what they really need.","commit_id":"c96c86e515453bc73ba35443b91d570ee3db7688"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f9708761ebd6c0d481aa2fdd79c7f2d6dd820cc0","unresolved":false,"context_lines":[{"line_number":48,"context_line":"instance CPU model to the specified model."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"All this would only take place if the config file for the compute node"},{"line_number":51,"context_line":"specifies virt_type\u003d\"kvm|qemu\" and cpu_mode\u003d\"none\"."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"Alternatives"},{"line_number":54,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5ad0253b_1b87ba10","line":51,"in_reply_to":"5ad0253b_5b63f2b1","updated":"2015-04-29 14:06:04.000000000","message":"The latest posting of the spec has expanded the property syntax  in the more general format I illustrated, so I think that should allow it to be properly supported in Xen/VMWare/HyperV based on what I know about those platforms.\n\nVMWare supports named CPU models, and/or use of CPUID, which can be described in terms of feature names.\n\nXen supports use of CPUID, which can be described in terms of feature names\n\nHyperV supports a list of named feature flags.","commit_id":"c96c86e515453bc73ba35443b91d570ee3db7688"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"ba82c156335baf84f8fbc9758ca4e27e3bff422d","unresolved":false,"context_lines":[{"line_number":48,"context_line":"instance CPU model to the specified model."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"All this would only take place if the config file for the compute node"},{"line_number":51,"context_line":"specifies virt_type\u003d\"kvm|qemu\" and cpu_mode\u003d\"none\"."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"Alternatives"},{"line_number":54,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7ad32947_ecb34409","line":51,"in_reply_to":"7ad32947_314d1773","updated":"2015-04-27 18:04:18.000000000","message":"I could see us expand the syntax for the cpu_model property a little\n\n - cpu_model\u003dFoo  - use named CPU model Foo\n - cpu_model\u003dFoo,+bar,+wizz - use named CPU model Foo, and also enable features \u0027bar\u0027 and \u0027wizz\u0027\n - cpu_model\u003d+bar,+wizz - use any CPU model, as long as it includes features \u0027bar\u0027 and \u0027wizz\u0027\n\nThat works with our existing object data model and copes with platforms that only have CPU model names, as well as platforms that only support CPU feature names, and both.","commit_id":"c96c86e515453bc73ba35443b91d570ee3db7688"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"ce30e9deeac74d415b92b95f34fbe762a1fb4033","unresolved":false,"context_lines":[{"line_number":48,"context_line":"instance CPU model to the specified model."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"All this would only take place if the config file for the compute node"},{"line_number":51,"context_line":"specifies virt_type\u003d\"kvm|qemu\" and cpu_mode\u003d\"none\"."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"Alternatives"},{"line_number":54,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7ad32947_314d1773","line":51,"in_reply_to":"7ad32947_76f6e5d8","updated":"2015-04-27 17:28:16.000000000","message":"FYI, the named model concept is based on the way libvirt deals with CPU models, and is actually more generic than simply doing a list of features. The idea of CPUID feature lists is very much x86 specific - it doesn\u0027t really exist on other architectures, which just have named CPU models. Hence libvirt took the idea of named CPU models as being shorthand for a specific set of features on x86.  We also already have this concept inside Nova in the VirtCPUModel object, associated with the Instance object.\n\nBoth libvirt and the Nova object model, do in fact allow for extra named features to be added to the base named CPU model, but we\u0027ve not exposed that facility to the host admin / user at this time.\n\nIn terms of Xen support, there\u0027s two ways we could do this. In libvirt the libxl Xen driver could re-use libvirt\u0027s existing CPU model name \u003c-\u003e CPUID feature mapping data to expose the same model names as the KVM driver does. Then Nova would \"just work\". Alternatively Nova could just a dummy \"base\" CPU model and expose the augment this with extra features. Or we could do both.\n\nEither way, I think what\u0027s proposed in this spec doesn\u0027t tie our hands in any way. We can extend it as neccessary in the future if we find a need to.","commit_id":"c96c86e515453bc73ba35443b91d570ee3db7688"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"281623e0e03d7c5bf7887253de24c77e9b0ed734","unresolved":false,"context_lines":[{"line_number":48,"context_line":"instance CPU model to the specified model."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"All this would only take place if the config file for the compute node"},{"line_number":51,"context_line":"specifies virt_type\u003d\"kvm|qemu\" and cpu_mode\u003d\"none\"."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"Alternatives"},{"line_number":54,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5ad0253b_5b63f2b1","line":51,"in_reply_to":"7ad32947_ecb34409","updated":"2015-04-29 13:59:15.000000000","message":"Agreed it can be general, I just think we need to be explicit about leaving that option open really.\n\nI would like us to describe what are possible values here, but I guess thats sort of defined by libvirt, which feels a little too loose to make this cross hypervisor.","commit_id":"c96c86e515453bc73ba35443b91d570ee3db7688"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"78820bd19dfc0e3175bd397d8598507b540c21d5","unresolved":false,"context_lines":[{"line_number":48,"context_line":"instance CPU model to the specified model."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"All this would only take place if the config file for the compute node"},{"line_number":51,"context_line":"specifies virt_type\u003d\"kvm|qemu\" and cpu_mode\u003d\"none\"."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"Alternatives"},{"line_number":54,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7ad32947_76f6e5d8","line":51,"in_reply_to":"9abe1de1_ac5b172e","updated":"2015-04-27 17:17:46.000000000","message":"I can modify the above to make it clear that it\u0027s not necessarily limited to qemu/kvm.  I think that the model concept itself is not hypervisor-specific (even for hypervisors that don\u0027t explicitly export models).\n\nMy experience is that people usually build their code with something like \"gcc -march\u003dcore-avx2\" which could potentially make use of MOVBE, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, FMA, BMI, BMI2 and F16C.\n\nRather than having to explicitly define each of these in the flavor, it\u0027s much simpler to say \"hw:cpu_model\u003dhaswell\" in the flavor.  In essence each CPU model could be considered as shorthand for a set of features.\n\nIn the hypervisor-specific backend code I don\u0027t see any reason why we couldn\u0027t map a request for a specific CPU model into its component features in order to compare against features available on each host.  Libvirt already handles that mapping internally, at least for qemu--how does libvirt\u0027s virConnectCompareCPU() behave when using xen as the hypervisor?\n\nInterestingly xen seems to have some keywords for AMD CPUs (of the form \"fam_X_rev_Y\") but there don\u0027t seem to be similar keywords for Intel CPU models.","commit_id":"c96c86e515453bc73ba35443b91d570ee3db7688"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"4629580cb9324c4bcc85a18d06f75ecc91876cec","unresolved":false,"context_lines":[{"line_number":64,"context_line":"In this implementation there would potentially be quite a few host aggregates"},{"line_number":65,"context_line":"and the end-user wouldn\u0027t get the exact model they requested but rather one"},{"line_number":66,"context_line":"at least that good.  It would also be more work for the admin user to set"},{"line_number":67,"context_line":"everything up."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"Data model impact"},{"line_number":70,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"bab921fb_ec383af0","line":67,"updated":"2015-04-27 05:59:53.000000000","message":"Thanks for including host aggregates as an alternative here, but if you didn\u0027t I\u0027d have asked about it. I think you explain well why that\u0027s not as good a plan as what you propose.","commit_id":"c96c86e515453bc73ba35443b91d570ee3db7688"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"e7e4276b7af19df3740b296794c0469597d4beaf","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    The \"metadata\" request parameter can contain a new optional"},{"line_number":83,"context_line":"    \"hw_cpu_model\u003d\u003cmodel\u003e\" specification"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"In both cases, \"model\" is a string specified the same as the nova config file."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"Security impact"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7ad32947_315e37ea","line":85,"updated":"2015-04-27 17:32:43.000000000","message":"I don\u0027t think we need to really document new params for extra_specs/metadata - its already accepted that those take arbitrary user data.","commit_id":"c96c86e515453bc73ba35443b91d570ee3db7688"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"53ae1f256508e8a5347185e942966816b994d64f","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"The goal is to allow the CPU model to be specified as part of the flavor/image"},{"line_number":30,"context_line":"and allow the scheduler to select a host that can provide a vCPU of the"},{"line_number":31,"context_line":"specified model."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"Project Priority"},{"line_number":34,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"1aca2d91_b47ad0ef","line":31,"updated":"2015-05-08 11:52:07.000000000","message":"I feel like the use case need a much more specific discussion on the expected run time.\n\nIs this an attempt to solve this for taking an image to a random public cloud? solve it within an organization private cloud? within a vendor appliance?\n\nI think they all have different slices of this answer. Because you will not get \"high performance\" out of an environment even with these flags without other guaruntees that you can\u0027t assume unless you own the hardware.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"55ca634d419dafee8840ecdb34f49c3c62df4561","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"The goal is to allow the CPU model to be specified as part of the flavor/image"},{"line_number":30,"context_line":"and allow the scheduler to select a host that can provide a vCPU of the"},{"line_number":31,"context_line":"specified model."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"Project Priority"},{"line_number":34,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9af37de9_62be3b01","line":31,"in_reply_to":"1aca2d91_b47ad0ef","updated":"2015-05-11 06:22:07.000000000","message":"Only cpu feature can be used for random public cloud. It is easy to define unify cpu feature name across all the hypervisors.\n\nThe cpu model can\u0027t be used for random public cloud. Because there isn\u0027t unfiied cpu mode definition across all the hypervisor. As the comment said at line 79.\n\nSo what I\u0027m thinking is cpu feature and cpu model is used for resolve different usecase.\n\nCpu feature solves the use-case for high-performance software depend on specific CPU features.\n\nCpu model solves the use-case for defining cpu model which live-migratable across the cluster.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"753c67a0c530681f47ed5305f818b6989f54b4c4","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"The goal is to allow the CPU model to be specified as part of the flavor/image"},{"line_number":30,"context_line":"and allow the scheduler to select a host that can provide a vCPU of the"},{"line_number":31,"context_line":"specified model."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"Project Priority"},{"line_number":34,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"1aca2d91_4f5510f8","line":31,"in_reply_to":"1aca2d91_b47ad0ef","updated":"2015-05-08 23:16:24.000000000","message":"The use-case that prompted this was in the context of a DPDK app running in the guest, where it\u0027s basically doing a busy-loop in userspace reading off a circular buffer and doing stuff with the packets.  In that context it would be a private cloud (or possibly a \"public\" cloud with known characteristics).\n\nBut I think it applies generally to any use-case where you want to ensure that the guest CPU model has at least a certain level of functionality so that you can optimize for it when building software from scratch.\n\nSo any end-user that wants to build guest software with gcc -march\u003dX for any sort of advanced X is going to need something like this.\n\nEven more so, any end-user doing assembly coding for performance is going to want something like this (since a fallback option might be much slower).","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"41b5f97923da810073f094b644fa1d5129500b58","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"*cpu_mode\u003dhost-model|host-passthrough|custom*"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"*cpu_model\u003d\u003cnamed CPU\u003e*"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"This feature would allow allow specifying each of these these in the flavor"},{"line_number":49,"context_line":"extra specs or image metadata.  In order to give the admin some control over"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5ad0253b_7ba10ea9","line":46,"updated":"2015-04-29 14:08:57.000000000","message":"This works better","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"cdc493c32e449ca8bfd7a3ce1701ae58b7334f08","unresolved":false,"context_lines":[{"line_number":48,"context_line":"This feature would allow allow specifying each of these these in the flavor"},{"line_number":49,"context_line":"extra specs or image metadata.  In order to give the admin some control over"},{"line_number":50,"context_line":"resources the value from the image metadata will be honoured only if the"},{"line_number":51,"context_line":"equivalent flavor property is not set."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"The desired CPU mode would be specified as \"hw:cpu_mode\u003d\u003cmode\u003e\" in the flavor"},{"line_number":54,"context_line":"extra specs, or \"hw_cpu_mode\u003d\u003cmode\u003e\" in the image metadata."}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_5d1d4f0e","line":51,"updated":"2015-04-30 07:16:58.000000000","message":"This looks like image can request any cpu model or feature without flavor limit.\n\nI\u0027m not sure this is model of nova prefered. We use flavor limit and account the resource usage. Image\u0027s requirement should always limited by flavor.\n\nIn my propose is The image only required some feature and some model the flavor allowed.\n\nSo I have table to show how calculate the cpu requirement from the flavor and image  at line 93 https://review.openstack.org/#/c/170396/8/specs/liberty/approved/virt-driver-cpu-features.rst","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"cdc493c32e449ca8bfd7a3ce1701ae58b7334f08","unresolved":false,"context_lines":[{"line_number":54,"context_line":"extra specs, or \"hw_cpu_mode\u003d\u003cmode\u003e\" in the image metadata."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"For the case where the mode is \"custom\", the desired CPU model would be"},{"line_number":57,"context_line":"specified as \"hw:cpu_model\u003d\u003cmodel | +feat\u003e[,+feat]...\" in the flavor extra"},{"line_number":58,"context_line":"specs, or \"hw_cpu_model\u003d\u003cmodel | +feat\u003e[,+feat]...\" in the image metadata,"},{"line_number":59,"context_line":"where \"model\" and \"feat\" are specified as in the libvirt XML.  Either \"model\""},{"line_number":60,"context_line":"or \"feat\" must be specified, and there may also be zero or more additional CPU"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_dc96e893","line":57,"updated":"2015-04-30 07:16:58.000000000","message":"I like this. :) In my propose I separated to two properties, but your way looks like more clear and simple.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":4992,"name":"malini-k-bhandaru","email":"malini.k.bhandaru@intel.com","username":"malini-k-bhandaru"},"change_message_id":"2461e51002b37b03f4406f8c84e4db4964e5b1c1","unresolved":false,"context_lines":[{"line_number":65,"context_line":"*hw:cpu_model\u003dFoo*"},{"line_number":66,"context_line":"  Use named CPU model *Foo*."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"*hw:cpu_model\u003dFoo,+bar,+wizz*"},{"line_number":69,"context_line":"  Use named CPU model *Foo*, and also enable features *bar* and *wizz*."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"*hw:cpu_model\u003d+bar,+wizz*"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_9bbcf36d","line":68,"updated":"2015-04-30 08:41:16.000000000","message":"I believe the OpenSSL library leverages the most advanced instructions available on a processor, via a bunch of #ifdefine in the code. I would argue then it helps to specify a bunch of features in a prioritized manner. If I can get platinum feature, if not gold feature, if not bronze feature.\nAVX2 preferred over AVX and AVX preferred over SSE2 type stuff.\n\nBy the way I see value to a flavor disabling a feature. Not that the feature is harmful if present to a VM. More likely to offer different levels of service, possibly priced differently.\n\nAlex\u0027s feature specification grammar allows for specifying required/disabled/optional. But not the total ordering of functionally equivalent features (AVXi, SSEj)\n\nThe 255 character limit would argue for short forms\n+ required\n- disable\no optional","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2e8fe34d6b0a3ff6582c571567994726ff6cc7b3","unresolved":false,"context_lines":[{"line_number":65,"context_line":"*hw:cpu_model\u003dFoo*"},{"line_number":66,"context_line":"  Use named CPU model *Foo*."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"*hw:cpu_model\u003dFoo,+bar,+wizz*"},{"line_number":69,"context_line":"  Use named CPU model *Foo*, and also enable features *bar* and *wizz*."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"*hw:cpu_model\u003d+bar,+wizz*"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_34c87074","line":68,"updated":"2015-04-29 14:08:41.000000000","message":"The values of these items are limited to 255 characters each. Is there any concern that that\u0027s not enough space to specify some of these strings?","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"1e5a2a30324f65261c5ef11ef5e2078b8a1c7154","unresolved":false,"context_lines":[{"line_number":65,"context_line":"*hw:cpu_model\u003dFoo*"},{"line_number":66,"context_line":"  Use named CPU model *Foo*."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"*hw:cpu_model\u003dFoo,+bar,+wizz*"},{"line_number":69,"context_line":"  Use named CPU model *Foo*, and also enable features *bar* and *wizz*."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"*hw:cpu_model\u003d+bar,+wizz*"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_b4e7e0ab","line":68,"in_reply_to":"3acd31a7_34c87074","updated":"2015-04-29 14:15:39.000000000","message":"It is a small concern, but I\u0027m thinking it is unlikely to be an issue in practice.\n\nI\u0027d anticipate that users are /not/ going to specify the full list of 40+ features they want in the CPU, rather they will be happy with the hypervisor default baseline set of features, and just use this as a means to guarantee a handful of special features.\n\neg they might just use  hw:cpu_model\u003d+sse2  to guarantee the guest has sse2 feature available, and not care about rest of the features.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"55ca634d419dafee8840ecdb34f49c3c62df4561","unresolved":false,"context_lines":[{"line_number":65,"context_line":"*hw:cpu_model\u003dFoo*"},{"line_number":66,"context_line":"  Use named CPU model *Foo*."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"*hw:cpu_model\u003dFoo,+bar,+wizz*"},{"line_number":69,"context_line":"  Use named CPU model *Foo*, and also enable features *bar* and *wizz*."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"*hw:cpu_model\u003d+bar,+wizz*"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9af37de9_a220a34a","line":68,"in_reply_to":"3acd31a7_9bbcf36d","updated":"2015-05-11 06:22:07.000000000","message":"@Malini, this sounds like interesting point. It can reduce the length of cpu feature list. But we need another definition about which feature is gold and which feature is bronze, sounds like we introduce another thing always need maintenance.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"41f3b166630b02875c0b4aa729028e873faaca6b","unresolved":false,"context_lines":[{"line_number":65,"context_line":"*hw:cpu_model\u003dFoo*"},{"line_number":66,"context_line":"  Use named CPU model *Foo*."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"*hw:cpu_model\u003dFoo,+bar,+wizz*"},{"line_number":69,"context_line":"  Use named CPU model *Foo*, and also enable features *bar* and *wizz*."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"*hw:cpu_model\u003d+bar,+wizz*"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_f7043ac7","line":68,"in_reply_to":"3acd31a7_b4e7e0ab","updated":"2015-04-29 14:20:17.000000000","message":"Recently while trying to get a machine suitable for live-migration in a public cloud, we were building cpu model starting with i486 and just adding everything we wanted on top of that instead of trying to figure out the math to start from one model and remove/add the things we wanted.\n\nJust looking at my (several year old) box I have handy, all the flags, including delimiters, in proc/cpuinfo is 1492 characters. If people are looking for compatibility across multiple clouds, I can see them going the more explicit route and bumping up against the 255 char limit.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"48433022b00908db9ac19be39875f405eade67b2","unresolved":false,"context_lines":[{"line_number":65,"context_line":"*hw:cpu_model\u003dFoo*"},{"line_number":66,"context_line":"  Use named CPU model *Foo*."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"*hw:cpu_model\u003dFoo,+bar,+wizz*"},{"line_number":69,"context_line":"  Use named CPU model *Foo*, and also enable features *bar* and *wizz*."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"*hw:cpu_model\u003d+bar,+wizz*"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_d72ffef4","line":68,"in_reply_to":"3acd31a7_b7aa4284","updated":"2015-04-29 14:27:15.000000000","message":"Right, the problem was that we needed a consistent model that was live migratable across the few machine variations at both rax and hp cloud. We ended up reducing it to pentiumpro+$things once we figured out what the fully common set of flags was.\n\nWhat happened was each cloud provider was masking out certain flags, creating what seemed to be a never-existed cpu model and the libvirt tooling failed to ever calculate a common set of flags for us. So, we did it brute force and made it work.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"cdc493c32e449ca8bfd7a3ce1701ae58b7334f08","unresolved":false,"context_lines":[{"line_number":65,"context_line":"*hw:cpu_model\u003dFoo*"},{"line_number":66,"context_line":"  Use named CPU model *Foo*."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"*hw:cpu_model\u003dFoo,+bar,+wizz*"},{"line_number":69,"context_line":"  Use named CPU model *Foo*, and also enable features *bar* and *wizz*."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"*hw:cpu_model\u003d+bar,+wizz*"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_e808db93","line":68,"in_reply_to":"3acd31a7_d72ffef4","updated":"2015-04-30 07:16:58.000000000","message":"@Dan, are you looking for this use-case:\n\n\"When the new host add to the cluster, the operator can ensure the instance will boot up with compatible cpu model with old hosts.\"\n\nThis is from my spec https://review.openstack.org/#/c/170397/10/specs/liberty/approved/virt-driver-cpu-model.rst\n\nI want to use flavor/image properties to define the guest cpu model then can ensure all the guest get same set of cpu capabilites.\n\nBut good point there is limited the length of 255.\n\nIn my propose, the compute node will report the supported model, then there a list of cpu model supported by the cluster, and there is API can used to query those list cpu model. In the list, each cpu model have a id. then we can specified the id in the image/flavor properties. For resolve the custom cpu model, maybe we can add more API to support to define the custom cpu model. The API may looks like at line 262 https://review.openstack.org/#/c/170396/8/specs/liberty/approved/virt-driver-cpu-features.rst","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":4992,"name":"malini-k-bhandaru","email":"malini.k.bhandaru@intel.com","username":"malini-k-bhandaru"},"change_message_id":"2461e51002b37b03f4406f8c84e4db4964e5b1c1","unresolved":false,"context_lines":[{"line_number":65,"context_line":"*hw:cpu_model\u003dFoo*"},{"line_number":66,"context_line":"  Use named CPU model *Foo*."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"*hw:cpu_model\u003dFoo,+bar,+wizz*"},{"line_number":69,"context_line":"  Use named CPU model *Foo*, and also enable features *bar* and *wizz*."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"*hw:cpu_model\u003d+bar,+wizz*"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_5b441b73","line":68,"in_reply_to":"3acd31a7_f7043ac7","updated":"2015-04-30 08:41:16.000000000","message":"Chris and Alex both suggest maintaining with an instance the exact feature set they require. This should help in determining a viable host for migration?","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f51f6dfdb68564166a10e66d7ebfb466a5389e91","unresolved":false,"context_lines":[{"line_number":65,"context_line":"*hw:cpu_model\u003dFoo*"},{"line_number":66,"context_line":"  Use named CPU model *Foo*."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"*hw:cpu_model\u003dFoo,+bar,+wizz*"},{"line_number":69,"context_line":"  Use named CPU model *Foo*, and also enable features *bar* and *wizz*."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"*hw:cpu_model\u003d+bar,+wizz*"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_b7aa4284","line":68,"in_reply_to":"3acd31a7_f7043ac7","updated":"2015-04-29 14:23:59.000000000","message":"Hmm, that kind of approach really shouldn\u0027t be necessary - given a couple hosts, libvirt could have reported the minimally sized CPU configuration that supported both. IIRC, looking at the gate configs, it was just 1 or 2 specific flags from the modern CPU model names that would have needed blacklisting.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"41b5f97923da810073f094b644fa1d5129500b58","unresolved":false,"context_lines":[{"line_number":69,"context_line":"  Use named CPU model *Foo*, and also enable features *bar* and *wizz*."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"*hw:cpu_model\u003d+bar,+wizz*"},{"line_number":72,"context_line":"  Use any CPU model, as long as it includes features *bar* and *wizz*."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"For custom CPU modes, a new scheduler filter will be written to filter out"},{"line_number":75,"context_line":"hosts with CPUs that are lower-grade than the specified model+features, and"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5ad0253b_3be716e6","line":72,"updated":"2015-04-29 14:08:57.000000000","message":"Can we please define what values we support here.\n\nWe really need to tighten up these interfaces.\n\nConsider trying to work out what values are possible, you have to go work out what version of libvirt you are using, etc, we need to isloate our users from that kind of thing if we can.\n\nThis links back to my comment on supportting this for Xen. That can\u0027t involve going to read what libvirt is doing.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"cdc493c32e449ca8bfd7a3ce1701ae58b7334f08","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"For custom CPU modes, a new scheduler filter will be written to filter out"},{"line_number":75,"context_line":"hosts with CPUs that are lower-grade than the specified model+features, and"},{"line_number":76,"context_line":"libvirt will be modified to set the instance CPU model to the specified model."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Any mode/model specified via flavor/image would take precedence over the mode/"},{"line_number":79,"context_line":"model specified in the nova.conf file on the compute node."}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_7c035410","line":76,"updated":"2015-04-30 07:16:58.000000000","message":"Emm.....How do you to determine which CPU models is lower-grade?\nAnd how do you know hypervisor know which cpu models?\n\nLooking for more detail","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"64b6baf65e8847cebaeb214c8d289c2c7a258e78","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"For custom CPU modes, a new scheduler filter will be written to filter out"},{"line_number":75,"context_line":"hosts with CPUs that are lower-grade than the specified model+features, and"},{"line_number":76,"context_line":"libvirt will be modified to set the instance CPU model to the specified model."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Any mode/model specified via flavor/image would take precedence over the mode/"},{"line_number":79,"context_line":"model specified in the nova.conf file on the compute node."}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_0dd9bb21","line":76,"in_reply_to":"3acd31a7_7c035410","updated":"2015-04-30 14:55:35.000000000","message":"For libvirt at least the model/features are available in the scheduler under host_state.cpu_info.\n\nIn our current implementation we only cared about recent-ish Intel processors so we just had a hardcoded list of models in order of increasing complexity.  For a more generic solution it might make sense to have the hypervisor store an exhaustive list of features instead so that the scheduler filter becomes a simple \"does the hypervisor support this set of features?\" check.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2e8fe34d6b0a3ff6582c571567994726ff6cc7b3","unresolved":false,"context_lines":[{"line_number":76,"context_line":"libvirt will be modified to set the instance CPU model to the specified model."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Any mode/model specified via flavor/image would take precedence over the mode/"},{"line_number":79,"context_line":"model specified in the nova.conf file on the compute node."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Alternatives"},{"line_number":82,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_b408002a","line":79,"updated":"2015-04-29 14:08:41.000000000","message":"I\u0027m really concerned about the amount of stuff we\u0027re adding to flavor/image which gets passed directly through to the virt driver. Can you add some words here about how you\u0027re going to ensure that libvirt and vmware don\u0027t end up with different strings defining the same thing here? IIRC, the linux /proc/cpuinfo flags don\u0027t always correspond to the intel-specified ones. We have other examples of things that differ slightly, like e1000 and IntelE1000 (or something like that).","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"f2c2f04e1f407e62c72079d12ba0f71392361ba1","unresolved":false,"context_lines":[{"line_number":76,"context_line":"libvirt will be modified to set the instance CPU model to the specified model."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Any mode/model specified via flavor/image would take precedence over the mode/"},{"line_number":79,"context_line":"model specified in the nova.conf file on the compute node."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Alternatives"},{"line_number":82,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_b45d4e7b","line":79,"in_reply_to":"3acd31a7_149c02bf","updated":"2015-05-01 17:47:21.000000000","message":"how many people use heterogeneous clusters in practice?  (I honestly don\u0027t know.)  I assumed (and I could be wrong) that most OpenStack clusters would have a single hypervisor and so in most cases there will be a single set of models available for that hypervisor.\n\nSure, the cadillac version would have all sorts of fancy features, but I think it makes sense to start with something like \"please boot an instance with a SandyBridge cpu\" and if that means slightly different things on different hypervisors then so be it.\n\nIf we start from the premise that we need to have one nova definition for \"nova-sandybridge\" that gives the same features across all the various hypervisors, then I worry about getting bogged down in the precursor work and never actually finishing the original functionality.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"7813bfc328c06d64c2f531be6fe753dba0a31a95","unresolved":false,"context_lines":[{"line_number":76,"context_line":"libvirt will be modified to set the instance CPU model to the specified model."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Any mode/model specified via flavor/image would take precedence over the mode/"},{"line_number":79,"context_line":"model specified in the nova.conf file on the compute node."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Alternatives"},{"line_number":82,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_aeb3c1e8","line":79,"in_reply_to":"3acd31a7_2e9b3174","updated":"2015-05-01 16:18:07.000000000","message":"We now have the VirtCPUModel object which is associated with the Instance object. We were actually intending for this host resource \u0027cpu_info\u0027 to just go away, but if we need to keep it around for the scheduler, then we definitely need to switch it over to explicitly use the new VirtCPUModel object too. This really ties in with the scheduler / resource tracker objectification work.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4fbfeaf4f787095bf10ad83b4fe7bab436482796","unresolved":false,"context_lines":[{"line_number":76,"context_line":"libvirt will be modified to set the instance CPU model to the specified model."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Any mode/model specified via flavor/image would take precedence over the mode/"},{"line_number":79,"context_line":"model specified in the nova.conf file on the compute node."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Alternatives"},{"line_number":82,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_149c02bf","line":79,"in_reply_to":"3acd31a7_3154b01f","updated":"2015-05-01 17:24:22.000000000","message":"That is exactly the opposite of what I think we should do.\n\nWe\u0027re supposed to be providing an abstract API that doesn\u0027t require the user to know the details of the hypervisor they\u0027re running on unless absolutely necessary.\n\nThese flags are all tied back to the actual definitions by the CPU vendor(s). The fact that they differ between libvirt, linux, and vmware is really beside the point, and something that Nova is *supposed* to be abstracting. If we\u0027re going to expose this level of granularity over the flags available in the guest, then this is the price we pay for that, IMHO.\n\nThis is starting to sound kinda like we need a CPU flavor, where the host defines which cpu flavors are allowed and you pick one when you make a boot request. I know that\u0027s overkill and not flexible enough for what people want this to be, but it would make this a whole lot cleaner, IMHO. If we let users define their own, then they could easily make a rich request to create the cpu flavor they want and then reuse it for all their instances (if desired). Knowing whether two clouds can possibly support instances with a given set of flags would be as easy as trying to create that cpu flavor on each and seeing if it works.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"9e51aa9f322b1a05782f88070f0e7b369cbc16bd","unresolved":false,"context_lines":[{"line_number":76,"context_line":"libvirt will be modified to set the instance CPU model to the specified model."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Any mode/model specified via flavor/image would take precedence over the mode/"},{"line_number":79,"context_line":"model specified in the nova.conf file on the compute node."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Alternatives"},{"line_number":82,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_3154b01f","line":79,"in_reply_to":"3acd31a7_318cb07e","updated":"2015-05-01 17:15:20.000000000","message":"It seems to me that switching the host model/features to use objects is really orthogonal to this feature.\n\nRather than trying to come up with models/features that would apply across all hypervisors, what about encapsulating it the other way such that each hypervisor would have its own set of models/features and the scheduler would call a hypervisor-specific comparison function to determine whether a given host could support the requested model/features.\n\nThat way each hypervisor could use their native format for reporting the host information.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"ca4c8a954b8cf8ee710b691b8a04dec0d47837f9","unresolved":false,"context_lines":[{"line_number":76,"context_line":"libvirt will be modified to set the instance CPU model to the specified model."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Any mode/model specified via flavor/image would take precedence over the mode/"},{"line_number":79,"context_line":"model specified in the nova.conf file on the compute node."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Alternatives"},{"line_number":82,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_9304cf7e","line":79,"in_reply_to":"3acd31a7_4c87c30f","updated":"2015-04-30 13:31:33.000000000","message":"I\u0027m also feel pain about this. So I think we may not try to find out a way to define unified cpu model, we can let all the hypervisors report their supported cpu model to nova. Nova will store a list of cpu model which supported by cluster. Then user can specified one of model in the flavor/image.\n\nFor example, the libvirt driver can report it supported Haswell and Haswell-noTSX. Other hypervisor can report another Haswell. Then nova store those model and model\u0027s feature set into the db.\n\nSo in the db, there will have entries like this:\n\n1, Haswell, fest1, fest2, fest3 ...\n\n2, Haswell, fest1,fest2,fest3,fest4....\n\n3, Haswell-noTSX, fest1,fest2,...\n\nIf user want guest to use Haswell-noTSX, user can specified id \u00273\u0027 in the flavor/image\u0027s properties.\n\nWhen booting instance, nova will extract the requested cpu model info into the instance object. Then scheduler will use instance\u0027s cpu model info to find out a host support a model with name \u0027Haswell-noTSX\u0027 and have same set cpu features.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"e9c81a8e0a9018fa9beb24c5233a6d2ef8abf36b","unresolved":false,"context_lines":[{"line_number":76,"context_line":"libvirt will be modified to set the instance CPU model to the specified model."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Any mode/model specified via flavor/image would take precedence over the mode/"},{"line_number":79,"context_line":"model specified in the nova.conf file on the compute node."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Alternatives"},{"line_number":82,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_4c87c30f","line":79,"in_reply_to":"3acd31a7_5c82d853","updated":"2015-04-30 09:46:38.000000000","message":"Unfortunately life is not quite that simple. The CPU model names I\u0027ve seen used with VMWare VCenter in the past bear no resemblance to the names used in KVM/QEMU.\n\nThat is actually the least of the problems though - there is actually no single definition of exactly what \"Haswell\" means. Intel has actually shipped several different versions of Haswell silicon with different CPUID features. Even worse, is that they recently shipped a microcode update which /changed/ the CPUID features for existing silicon. As a result, QEMU/KVM now in fact have two models  Haswell and Haswell-noTSX, and Broadwell and Broadwell-noTSX.  I\u0027ve no idea how other virt vendors dealt with this change in CPUID features for existing silicon, but I\u0027m confident they won\u0027t have chosen to use the same model names.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"55ca634d419dafee8840ecdb34f49c3c62df4561","unresolved":false,"context_lines":[{"line_number":76,"context_line":"libvirt will be modified to set the instance CPU model to the specified model."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Any mode/model specified via flavor/image would take precedence over the mode/"},{"line_number":79,"context_line":"model specified in the nova.conf file on the compute node."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Alternatives"},{"line_number":82,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9af37de9_82cb5f72","line":79,"in_reply_to":"3acd31a7_77d9f882","updated":"2015-05-11 06:22:07.000000000","message":"+1 for define unify cpu feature name.  But for cpu model, we may need something like cpu flavor. Cpu model is just a group of cpu feature. I only expect cpu model is a tool for operator to manage compatible cpu in the cluster. cpu feature and cpu model is for different use-case as the comment at line 31","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"b27594f8d0151ac07722f726e072060ef7bdf359","unresolved":false,"context_lines":[{"line_number":76,"context_line":"libvirt will be modified to set the instance CPU model to the specified model."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Any mode/model specified via flavor/image would take precedence over the mode/"},{"line_number":79,"context_line":"model specified in the nova.conf file on the compute node."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Alternatives"},{"line_number":82,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_2e9b3174","line":79,"in_reply_to":"3acd31a7_9304cf7e","updated":"2015-05-01 16:15:14.000000000","message":"From a code comment by danpb in the libvirt driver:\n\n        # TODO(berrange): why do we bother converting the\n        # libvirt capabilities XML into a special JSON format ?\n        # The data format is different across all the drivers\n        # so we could just return the raw capabilities XML\n        # which \u0027compare_cpu\u0027 could use directly\n        #\n        # That said, arch_filter.py now seems to rely on\n        # the libvirt drivers format which suggests this\n        # data format needs to be standardized across drivers\n        data[\"cpu_info\"] \u003d jsonutils.dumps(self._get_cpu_info())\n\nSo it would really be ideal to define all of the features  AND the structure of CPU info field (hint: use an object) as part or rather a pre-requisit to this","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"810a99660b0fa31de4271121e9c57abeee236638","unresolved":false,"context_lines":[{"line_number":76,"context_line":"libvirt will be modified to set the instance CPU model to the specified model."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Any mode/model specified via flavor/image would take precedence over the mode/"},{"line_number":79,"context_line":"model specified in the nova.conf file on the compute node."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Alternatives"},{"line_number":82,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_318cb07e","line":79,"in_reply_to":"3acd31a7_aeb3c1e8","updated":"2015-05-01 16:39:33.000000000","message":"Yep we do - we actually have all that info in the compute_node table now, but it would be good to switch it over to objects... Also not sure it can be the same object since save() is different (goes into the compute_node table as opposed to the instance_extra)","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"1e5a2a30324f65261c5ef11ef5e2078b8a1c7154","unresolved":false,"context_lines":[{"line_number":76,"context_line":"libvirt will be modified to set the instance CPU model to the specified model."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Any mode/model specified via flavor/image would take precedence over the mode/"},{"line_number":79,"context_line":"model specified in the nova.conf file on the compute node."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Alternatives"},{"line_number":82,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_f4179852","line":79,"in_reply_to":"3acd31a7_b408002a","updated":"2015-04-29 14:15:39.000000000","message":"For libvirt there is a vocabulary of feature names for x86 that is not quite the same as /proc/cpuinfo - probably closer to the intel list. We could take that libvirt vocab and define it as the standard set for all virt drivers, and then remap to hypervisor specific names as \u0026 when required. The libivrt code has an XML file with feature name \u003c-\u003e CPU ID bit offsets which we could use to build up a table in python for nova usage to validate it.\n\nCPU model names though I\u0027d expect to be hypervisor specific.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7a2d97bcb3429306a1dd524d80fc89b9f22ac99c","unresolved":false,"context_lines":[{"line_number":76,"context_line":"libvirt will be modified to set the instance CPU model to the specified model."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Any mode/model specified via flavor/image would take precedence over the mode/"},{"line_number":79,"context_line":"model specified in the nova.conf file on the compute node."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Alternatives"},{"line_number":82,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_77d9f882","line":79,"in_reply_to":"3acd31a7_b45d4e7b","updated":"2015-05-01 18:06:25.000000000","message":"Heterogeneous CPUs? I would say \"anyone with a deployment more than 18 months old\"\n\nThere are people that run ironic and nova+$hv together, and there are certain large hardware vendors that definitely expect to run multiple hypervisors, architectures, etc in a single cloud.\n\nThe problem with nova defining a nova-sandybridge is that many public clouds mask out specific cpu features on their guests, either for security, performance, cost, or consistency reasons.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":4992,"name":"malini-k-bhandaru","email":"malini.k.bhandaru@intel.com","username":"malini-k-bhandaru"},"change_message_id":"2461e51002b37b03f4406f8c84e4db4964e5b1c1","unresolved":false,"context_lines":[{"line_number":76,"context_line":"libvirt will be modified to set the instance CPU model to the specified model."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Any mode/model specified via flavor/image would take precedence over the mode/"},{"line_number":79,"context_line":"model specified in the nova.conf file on the compute node."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Alternatives"},{"line_number":82,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_5c82d853","line":79,"in_reply_to":"3acd31a7_f4179852","updated":"2015-04-30 08:41:16.000000000","message":"Daniel, I do not understand your comment \"CPU model names though I\u0027d expect to be hypervisor specific\". If the model is say Intel Haswell, would that not be the same in Xen, KVM, and ESX ..?","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":4992,"name":"malini-k-bhandaru","email":"malini.k.bhandaru@intel.com","username":"malini-k-bhandaru"},"change_message_id":"2461e51002b37b03f4406f8c84e4db4964e5b1c1","unresolved":false,"context_lines":[{"line_number":93,"context_line":"and the end-user wouldn\u0027t get the exact model they requested but rather one"},{"line_number":94,"context_line":"at least that good.  It would also be more work for the admin user to set"},{"line_number":95,"context_line":"everything up."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Data model impact"},{"line_number":98,"context_line":"-----------------"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_3b403f56","line":96,"updated":"2015-04-30 08:41:16.000000000","message":"+1 for this argument","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"4158f6eeb1635151472d5875f8997d33baae1619","unresolved":false,"context_lines":[{"line_number":93,"context_line":"and the end-user wouldn\u0027t get the exact model they requested but rather one"},{"line_number":94,"context_line":"at least that good.  It would also be more work for the admin user to set"},{"line_number":95,"context_line":"everything up."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Data model impact"},{"line_number":98,"context_line":"-----------------"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5ad0253b_5b877261","line":96,"updated":"2015-04-29 13:56:56.000000000","message":"There seems to be some slightly alternative approaches cropping up here:\nhttps://review.openstack.org/#/c/170397\n\nhelp to review those alternatives would be really welcomed, just to see if there are any ideas that are not covered in here.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"94b01ad815eb2295502a17f6632d8342b388f0ae","unresolved":false,"context_lines":[{"line_number":93,"context_line":"and the end-user wouldn\u0027t get the exact model they requested but rather one"},{"line_number":94,"context_line":"at least that good.  It would also be more work for the admin user to set"},{"line_number":95,"context_line":"everything up."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Data model impact"},{"line_number":98,"context_line":"-----------------"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_aeaf8b93","line":96,"in_reply_to":"5ad0253b_5b877261","updated":"2015-04-29 15:45:31.000000000","message":"I think the two are extremely close, to the point where it doesn\u0027t make sense to have both.\n\nThe other one has a number of additional options that I\u0027m not sure are actually needed.  (I\u0027ll comment on that in the other spec.)\n\nThe other one has separate model/features settings rather than combining them into a single setting.  It also specifies \"minimum\" vs \"exact\" specification of the model seen by the guest, while this proposal would basically always give \"exact\".\n\nAlso, the other feature talks about having a per-hypervisor mapping of model to feature set.\n\nRealistically, if the other spec was approved it would provide the functionality I\u0027m looking for.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2e8fe34d6b0a3ff6582c571567994726ff6cc7b3","unresolved":false,"context_lines":[{"line_number":102,"context_line":"REST API impact"},{"line_number":103,"context_line":"---------------"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"None"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"Security impact"},{"line_number":108,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_145214de","line":105,"updated":"2015-04-29 14:08:41.000000000","message":"There is an impact here.\n\nI\u0027d like to argue that we need some way of letting the client discover what things they can use on a flavor/image. We\u0027re already in debt in this regard, so it feels unfair to punish you by requiring such a change before we do this. However, this is a pretty complicated value you\u0027re adding, with some formatting, special values, etc.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":4992,"name":"malini-k-bhandaru","email":"malini.k.bhandaru@intel.com","username":"malini-k-bhandaru"},"change_message_id":"2461e51002b37b03f4406f8c84e4db4964e5b1c1","unresolved":false,"context_lines":[{"line_number":102,"context_line":"REST API impact"},{"line_number":103,"context_line":"---------------"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"None"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"Security impact"},{"line_number":108,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_5b353b44","line":105,"in_reply_to":"3acd31a7_145214de","updated":"2015-04-30 08:41:16.000000000","message":"Dan, what is exposed on the flavor will be controlled by cloud admin.\nAnd what may be requested on the image may be virtual machine vendor specified. While launching that VM, it may even be better to seek the most snug flavor, a la Goldilocks style.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"16eec41ffe4b1521a87e3f357863521f8062753a","unresolved":false,"context_lines":[{"line_number":102,"context_line":"REST API impact"},{"line_number":103,"context_line":"---------------"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"None"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"Security impact"},{"line_number":108,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3acd31a7_73decc6e","line":105,"in_reply_to":"3acd31a7_5b353b44","updated":"2015-04-30 15:24:34.000000000","message":"The admins are still clients of the API.","commit_id":"76027dc9b9952765297339f83faa1bcabf84f92a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"334d1ffc9c75b863c9d5730d3c5cc8e5f6ca4b7f","unresolved":false,"context_lines":[{"line_number":61,"context_line":"This option would represent the CPU models that the operator is allowing the"},{"line_number":62,"context_line":"hypervisor to provide to instances.  The expectation is that operators would be"},{"line_number":63,"context_line":"encouraged to explicitly define these models in their documentation, much like"},{"line_number":64,"context_line":"`Amazon does \u003chttp://aws.amazon.com/ec2/instance-types/\u003e`__ (where it specifies"},{"line_number":65,"context_line":"exact Intel part numbers).  The CPU features of the models must be strict"},{"line_number":66,"context_line":"supersets of each other, but they need not necessarily be sorted.  nova-compute"},{"line_number":67,"context_line":"will sort them internally based on CPU feature support and validate that the"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3afb71cf_e1a8488e","line":64,"updated":"2015-06-09 18:51:57.000000000","message":"Amazon is a single service with a consistent set of those types across their deployment. OpenStack is not, and encouraging people to expose those things means that it won\u0027t happen everywhere, won\u0027t be as discoverable, and won\u0027t be consistent.","commit_id":"c67d99f5010a6e216dd1678326ab947ee846c174"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"f2ea8eaf4851aa43d17cfa651e745055e011e2b7","unresolved":false,"context_lines":[{"line_number":61,"context_line":"This option would represent the CPU models that the operator is allowing the"},{"line_number":62,"context_line":"hypervisor to provide to instances.  The expectation is that operators would be"},{"line_number":63,"context_line":"encouraged to explicitly define these models in their documentation, much like"},{"line_number":64,"context_line":"`Amazon does \u003chttp://aws.amazon.com/ec2/instance-types/\u003e`__ (where it specifies"},{"line_number":65,"context_line":"exact Intel part numbers).  The CPU features of the models must be strict"},{"line_number":66,"context_line":"supersets of each other, but they need not necessarily be sorted.  nova-compute"},{"line_number":67,"context_line":"will sort them internally based on CPU feature support and validate that the"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3afb71cf_b24dfc3f","line":64,"in_reply_to":"3afb71cf_e1a8488e","updated":"2015-06-09 19:57:11.000000000","message":"A bit further down I specify that the compute nodes would report the supported CPU models and the corresponding CPU features.  (And the hypervisor type is already reported.)  What if we just made that information available via an API query?  That would make it discoverable to the end-user.  They could query different cloud providers and get the set of common models/features.","commit_id":"c67d99f5010a6e216dd1678326ab947ee846c174"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"334d1ffc9c75b863c9d5730d3c5cc8e5f6ca4b7f","unresolved":false,"context_lines":[{"line_number":106,"context_line":"For the case where the mode is \"custom\", the desired CPU model could be"},{"line_number":107,"context_line":"specified as *hw:cpu_model\u003d\u003cmodel\u003e* in the flavor extra specs, or"},{"line_number":108,"context_line":"*hw_cpu_model\u003d\u003cmodel\u003e* in the image metadata, where \"model\" is specified as"},{"line_number":109,"context_line":"documented above.  Alternately, the minimum required CPU features could be"},{"line_number":110,"context_line":"specified as *hw:cpu_features\u003d\u003cfeat_1\u003e[,\u003cfeat_?\u003e]...* in the flavor extra specs"},{"line_number":111,"context_line":"or *hw_cpu_features\u003d\u003cfeat_1\u003e[,\u003cfeat_?\u003e]...* in the image metadata. Either"},{"line_number":112,"context_line":"\"model\" or one-or-more \"feat\" must be specified, but not both (due to"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3afb71cf_a1dff067","line":109,"range":{"start_line":109,"start_character":19,"end_line":109,"end_character":30},"updated":"2015-06-09 18:51:57.000000000","message":"This is confusing. Are you proposing actually adding this? If not this should be covered under the Alternatives section and not here, IMHO.","commit_id":"c67d99f5010a6e216dd1678326ab947ee846c174"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"f2ea8eaf4851aa43d17cfa651e745055e011e2b7","unresolved":false,"context_lines":[{"line_number":106,"context_line":"For the case where the mode is \"custom\", the desired CPU model could be"},{"line_number":107,"context_line":"specified as *hw:cpu_model\u003d\u003cmodel\u003e* in the flavor extra specs, or"},{"line_number":108,"context_line":"*hw_cpu_model\u003d\u003cmodel\u003e* in the image metadata, where \"model\" is specified as"},{"line_number":109,"context_line":"documented above.  Alternately, the minimum required CPU features could be"},{"line_number":110,"context_line":"specified as *hw:cpu_features\u003d\u003cfeat_1\u003e[,\u003cfeat_?\u003e]...* in the flavor extra specs"},{"line_number":111,"context_line":"or *hw_cpu_features\u003d\u003cfeat_1\u003e[,\u003cfeat_?\u003e]...* in the image metadata. Either"},{"line_number":112,"context_line":"\"model\" or one-or-more \"feat\" must be specified, but not both (due to"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3afb71cf_8701a43a","line":109,"in_reply_to":"3afb71cf_a1dff067","updated":"2015-06-09 19:57:11.000000000","message":"Yes, I\u0027m proposing adding this.  That should be \"In addition,\" rather than \"Alternately,\".","commit_id":"c67d99f5010a6e216dd1678326ab947ee846c174"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"334d1ffc9c75b863c9d5730d3c5cc8e5f6ca4b7f","unresolved":false,"context_lines":[{"line_number":124,"context_line":"it will filter out hosts that do not have the specified CPU model in their"},{"line_number":125,"context_line":"\"cpu_models_allowed\" list.  If CPU feature(s) are specified, it will filter"},{"line_number":126,"context_line":"out hosts where the most advanced model in the \"cpu_models_allowed\" list cannot"},{"line_number":127,"context_line":"provide the specified feature(s)."},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"On the compute node, libvirt will either use the specified CPU model or else"},{"line_number":130,"context_line":"will pick the least-complex model in the \"cpu_models_allowed\" list which"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3afb71cf_41503cd4","line":127,"updated":"2015-06-09 18:51:57.000000000","message":"What happens when a newer hypervisor in the cluster exposes a thing of the same name, but with different properties? What about multi-hypervisor clusters where the same-named CPU model means very different things?","commit_id":"c67d99f5010a6e216dd1678326ab947ee846c174"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"f2ea8eaf4851aa43d17cfa651e745055e011e2b7","unresolved":false,"context_lines":[{"line_number":124,"context_line":"it will filter out hosts that do not have the specified CPU model in their"},{"line_number":125,"context_line":"\"cpu_models_allowed\" list.  If CPU feature(s) are specified, it will filter"},{"line_number":126,"context_line":"out hosts where the most advanced model in the \"cpu_models_allowed\" list cannot"},{"line_number":127,"context_line":"provide the specified feature(s)."},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"On the compute node, libvirt will either use the specified CPU model or else"},{"line_number":130,"context_line":"will pick the least-complex model in the \"cpu_models_allowed\" list which"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3afb71cf_92120056","line":127,"in_reply_to":"3afb71cf_41503cd4","updated":"2015-06-09 19:57:11.000000000","message":"Personally I would call that a bug in the hypervisor.  When Intel removed support for TSX from Haswell, libvirt/qemu introduced a \"Haswell-noTSX\" model to match.\n\nAs for multi-hypervisor clusters, I would expect that in most cases the flavor would be tied to a particular hypervisor via host aggregates or something, if for no other reason than differential billing depending on hypervisor type.  (But as you indicated we can\u0027t assume that will always be true.)  Because of that it\u0027s a bit more flexible to indicate the desired CPU features along with the image since that could map to any hypervisor.\n\nI do think it would be useful to allow the admin to specify a flavor with a particular model/hypervisor combo, and that should give predictable results (barring the above hypervisor bugs).","commit_id":"c67d99f5010a6e216dd1678326ab947ee846c174"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"72c45eea02bcc05ae19366306d84562e76874890","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"The existing \"cpu_info\" field in the \"compute_nodes\" table will be expanded"},{"line_number":153,"context_line":"with new keys to also store the set of CPU models in \"cpu_models_allowed\" as"},{"line_number":154,"context_line":"well as the set of features for the most advanced CPU model in the set."},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"REST API impact"},{"line_number":157,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3afb71cf_1e7621a4","line":154,"updated":"2015-06-09 18:19:51.000000000","message":"Alex pointed out that in order for the scheduler to be able to map CPU features specified in the image and CPU model specified in the flavor we will actually have to store the set of features for each CPU model.  I think this would make sense to store as a nested dict where the keys are the CPU models and the values are the CPU features for each model.","commit_id":"c67d99f5010a6e216dd1678326ab947ee846c174"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"f2ea8eaf4851aa43d17cfa651e745055e011e2b7","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"The existing \"cpu_info\" field in the \"compute_nodes\" table will be expanded"},{"line_number":153,"context_line":"with new keys to also store the set of CPU models in \"cpu_models_allowed\" as"},{"line_number":154,"context_line":"well as the set of features for the most advanced CPU model in the set."},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"REST API impact"},{"line_number":157,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3afb71cf_f21db462","line":154,"in_reply_to":"3afb71cf_01892475","updated":"2015-06-09 19:57:11.000000000","message":"Okay, can elaborate a bit.","commit_id":"c67d99f5010a6e216dd1678326ab947ee846c174"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"334d1ffc9c75b863c9d5730d3c5cc8e5f6ca4b7f","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"The existing \"cpu_info\" field in the \"compute_nodes\" table will be expanded"},{"line_number":153,"context_line":"with new keys to also store the set of CPU models in \"cpu_models_allowed\" as"},{"line_number":154,"context_line":"well as the set of features for the most advanced CPU model in the set."},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"REST API impact"},{"line_number":157,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3afb71cf_01892475","line":154,"in_reply_to":"3afb71cf_1e7621a4","updated":"2015-06-09 18:51:57.000000000","message":"This needs actual definition of what you plan to change here.","commit_id":"c67d99f5010a6e216dd1678326ab947ee846c174"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"c796386a9a69090bee9e7ada15bbfcf2e1c64b22","unresolved":false,"context_lines":[{"line_number":76,"context_line":"override it."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"If the cpu mode is \"custom\", then the CPU model can be specified in flavor."},{"line_number":79,"context_line":"The featres can be specified in image."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"In the flavor, we only support specified CPU model. In the image, we can"},{"line_number":82,"context_line":"specified CPU model or CPU feature."}],"source_content_type":"text/x-rst","patch_set":5,"id":"fa32b979_0bc25e34","line":79,"updated":"2015-06-17 16:06:38.000000000","message":"I think here we mean flavor has higher priority than image?","commit_id":"2975e2b28e34bc8e4bd4b2561ca46188a31b6387"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"38825ce961652327308e81f36fb0e98a9ee48e5e","unresolved":false,"context_lines":[{"line_number":76,"context_line":"override it."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"If the cpu mode is \"custom\", then the CPU model can be specified in flavor."},{"line_number":79,"context_line":"The featres can be specified in image."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"In the flavor, we only support specified CPU model. In the image, we can"},{"line_number":82,"context_line":"specified CPU model or CPU feature."}],"source_content_type":"text/x-rst","patch_set":5,"id":"fa32b979_2ef7305a","line":79,"in_reply_to":"fa32b979_0bc25e34","updated":"2015-06-17 16:29:34.000000000","message":"yes, I need add some describe","commit_id":"2975e2b28e34bc8e4bd4b2561ca46188a31b6387"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"c796386a9a69090bee9e7ada15bbfcf2e1c64b22","unresolved":false,"context_lines":[{"line_number":125,"context_line":"with new keys to also store the set of CPU models in \"cpu_models_allowed\" as"},{"line_number":126,"context_line":"well as the set of features for the most advanced CPU model in the set."},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"TODO list all data model for the new API."},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"REST API impact"},{"line_number":131,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"fa32b979_4bd38604","line":128,"updated":"2015-06-17 16:06:38.000000000","message":"better to see the db models..","commit_id":"2975e2b28e34bc8e4bd4b2561ca46188a31b6387"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"38825ce961652327308e81f36fb0e98a9ee48e5e","unresolved":false,"context_lines":[{"line_number":125,"context_line":"with new keys to also store the set of CPU models in \"cpu_models_allowed\" as"},{"line_number":126,"context_line":"well as the set of features for the most advanced CPU model in the set."},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"TODO list all data model for the new API."},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"REST API impact"},{"line_number":131,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"fa32b979_ce648423","line":128,"in_reply_to":"fa32b979_4bd38604","updated":"2015-06-17 16:29:34.000000000","message":"yea, try to catch up","commit_id":"2975e2b28e34bc8e4bd4b2561ca46188a31b6387"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"c796386a9a69090bee9e7ada15bbfcf2e1c64b22","unresolved":false,"context_lines":[{"line_number":248,"context_line":"~~~~~~~~~"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"For scheduling, each compute-node need report supported cpu_models and which"},{"line_number":251,"context_line":"featres included in supported cpu_models."},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"Libvirt Driver"},{"line_number":254,"context_line":"~~~~~~~~~~~~~~"}],"source_content_type":"text/x-rst","patch_set":5,"id":"fa32b979_eb3dba8f","line":251,"updated":"2015-06-17 16:06:38.000000000","message":"features","commit_id":"2975e2b28e34bc8e4bd4b2561ca46188a31b6387"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"38825ce961652327308e81f36fb0e98a9ee48e5e","unresolved":false,"context_lines":[{"line_number":248,"context_line":"~~~~~~~~~"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"For scheduling, each compute-node need report supported cpu_models and which"},{"line_number":251,"context_line":"featres included in supported cpu_models."},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"Libvirt Driver"},{"line_number":254,"context_line":"~~~~~~~~~~~~~~"}],"source_content_type":"text/x-rst","patch_set":5,"id":"fa32b979_ce4b2486","line":251,"in_reply_to":"fa32b979_eb3dba8f","updated":"2015-06-17 16:29:34.000000000","message":"Done","commit_id":"2975e2b28e34bc8e4bd4b2561ca46188a31b6387"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"c796386a9a69090bee9e7ada15bbfcf2e1c64b22","unresolved":false,"context_lines":[{"line_number":290,"context_line":"* Modify nova-compute to parse the new config entries and validate them."},{"line_number":291,"context_line":"* Modify virt/libvirt/driver.py to check the flavor/image to see if a CPU model"},{"line_number":292,"context_line":"  or features was specified and do the appropriate thing."},{"line_number":293,"context_line":"* Add in a new VCpuModelFilter to the filter scheduler"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":5,"id":"fa32b979_0b4c9ec6","line":293,"updated":"2015-06-17 16:06:38.000000000","message":"if no host found, return failure or warning and select a random one?","commit_id":"2975e2b28e34bc8e4bd4b2561ca46188a31b6387"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"38825ce961652327308e81f36fb0e98a9ee48e5e","unresolved":false,"context_lines":[{"line_number":290,"context_line":"* Modify nova-compute to parse the new config entries and validate them."},{"line_number":291,"context_line":"* Modify virt/libvirt/driver.py to check the flavor/image to see if a CPU model"},{"line_number":292,"context_line":"  or features was specified and do the appropriate thing."},{"line_number":293,"context_line":"* Add in a new VCpuModelFilter to the filter scheduler"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":5,"id":"fa32b979_8e38bcef","line":293,"in_reply_to":"fa32b979_0b4c9ec6","updated":"2015-06-17 16:29:34.000000000","message":"It should no host found, it pretty like numa","commit_id":"2975e2b28e34bc8e4bd4b2561ca46188a31b6387"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"92d9b6fa78ff32799321e094660b43e95bba7afa","unresolved":false,"context_lines":[{"line_number":13,"context_line":"An end-user may want to write high-performance software that depends on certain"},{"line_number":14,"context_line":"CPU features (SSE4.2, AVX, AVX2, LZCNT, FMA, BMI, etc) being available."},{"line_number":15,"context_line":"Currently we only allow specifying the CPU model as part of the compute node"},{"line_number":16,"context_line":"configuration, and there is no easy way to select hosts based on the CPU model."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_626f5dfc","line":16,"updated":"2015-06-18 14:03:24.000000000","message":"Sure there is. Just use host aggregate extra_specs and match the flavor extra_specs to it. It\u0027s wonky, sure, but it works :) Really, the problem is that the flavor\u0027s resources and options (like the extra_specs stuff) are tightly coupled when they don\u0027t really need to be, thus resulting in a crap-ton (technical term) of flavors being created in a giant matrix.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"dfe4b8ea55afd725ff150069057eeba225ce3d13","unresolved":false,"context_lines":[{"line_number":13,"context_line":"An end-user may want to write high-performance software that depends on certain"},{"line_number":14,"context_line":"CPU features (SSE4.2, AVX, AVX2, LZCNT, FMA, BMI, etc) being available."},{"line_number":15,"context_line":"Currently we only allow specifying the CPU model as part of the compute node"},{"line_number":16,"context_line":"configuration, and there is no easy way to select hosts based on the CPU model."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_7385f157","line":16,"in_reply_to":"fa32b979_626f5dfc","updated":"2015-06-18 14:41:44.000000000","message":"Actually I should remove this word.\n\nThe one of goal is enable tools which operator can used to define live-migratable cpu-model.\n\nEmm...I think this spec didn\u0027t have the issue with flavor\u0027s resources and options. But this can be referenced by options in the future, right?","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"92d9b6fa78ff32799321e094660b43e95bba7afa","unresolved":false,"context_lines":[{"line_number":30,"context_line":"type packet processing. More generally it would apply to any circumstances"},{"line_number":31,"context_line":"where the end-user wants to ensure that the guest CPU model has at least a"},{"line_number":32,"context_line":"certain level of functionality so that they can optimize for it when building"},{"line_number":33,"context_line":"software from scratch."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"There are two goals:"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_f516c94a","line":33,"updated":"2015-06-18 14:03:24.000000000","message":"what do you mean to differentiate from with the addition of \"from scratch\" above?","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"5b735d499da8e71429ec13d9988a304f276c844f","unresolved":false,"context_lines":[{"line_number":30,"context_line":"type packet processing. More generally it would apply to any circumstances"},{"line_number":31,"context_line":"where the end-user wants to ensure that the guest CPU model has at least a"},{"line_number":32,"context_line":"certain level of functionality so that they can optimize for it when building"},{"line_number":33,"context_line":"software from scratch."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"There are two goals:"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_8c716f0e","line":33,"in_reply_to":"fa32b979_f516c94a","updated":"2015-06-18 16:20:16.000000000","message":"I meant builting custom code rather than pulling in a prebuilt package, but I suppose it could also apply to prebuilt packages if they required certain CPU features to run at a useful speed.  In the specific case that led to us wanting this, the goal was to ensure we would get sse4.2 or avx (honestly can\u0027t remember which it was) for DPDK apps in the guest.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"dfe4b8ea55afd725ff150069057eeba225ce3d13","unresolved":false,"context_lines":[{"line_number":30,"context_line":"type packet processing. More generally it would apply to any circumstances"},{"line_number":31,"context_line":"where the end-user wants to ensure that the guest CPU model has at least a"},{"line_number":32,"context_line":"certain level of functionality so that they can optimize for it when building"},{"line_number":33,"context_line":"software from scratch."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"There are two goals:"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_335769cb","line":33,"in_reply_to":"fa32b979_f516c94a","updated":"2015-06-18 14:41:44.000000000","message":"This wrote by Chris. As my understand, he means\n\n./configure \u0026\u0026 make","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"92d9b6fa78ff32799321e094660b43e95bba7afa","unresolved":false,"context_lines":[{"line_number":37,"context_line":"* Allow the CPU model to be specified as part of the flavor and allow the"},{"line_number":38,"context_line":"  scheduler to select a host that can provide a vCPU of the specified model."},{"line_number":39,"context_line":"  This can be used by operator define the live-migratable guest cpu in the"},{"line_number":40,"context_line":"  cluster."},{"line_number":41,"context_line":"* Allow image creator specifiy the CPU feature as part of image. And this image"},{"line_number":42,"context_line":"  can be used cross Openstack deployements."},{"line_number":43,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_757719a0","line":40,"updated":"2015-06-18 14:03:24.000000000","message":"This really belongs in the image metadata, not the flavor. The image metadata should describe the requirements of the software on that image (or intended to be placed on that image).","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"ebce053be449e5cae02735a0922a98a6b2bbcbdf","unresolved":false,"context_lines":[{"line_number":37,"context_line":"* Allow the CPU model to be specified as part of the flavor and allow the"},{"line_number":38,"context_line":"  scheduler to select a host that can provide a vCPU of the specified model."},{"line_number":39,"context_line":"  This can be used by operator define the live-migratable guest cpu in the"},{"line_number":40,"context_line":"  cluster."},{"line_number":41,"context_line":"* Allow image creator specifiy the CPU feature as part of image. And this image"},{"line_number":42,"context_line":"  can be used cross Openstack deployements."},{"line_number":43,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_5a6479b7","line":40,"in_reply_to":"fa32b979_2c4dc399","updated":"2015-06-18 16:39:52.000000000","message":"Agreed, we need to support this in the flavour, as well as the image For example, the admin may wish to provide a special flavour which enables use of nested virt, vs flavours which don\u0027t allow nested virt.  You can imagine other flavours based example too - to allow the provider to do price differential depending on the features they want to make available.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"5b735d499da8e71429ec13d9988a304f276c844f","unresolved":false,"context_lines":[{"line_number":37,"context_line":"* Allow the CPU model to be specified as part of the flavor and allow the"},{"line_number":38,"context_line":"  scheduler to select a host that can provide a vCPU of the specified model."},{"line_number":39,"context_line":"  This can be used by operator define the live-migratable guest cpu in the"},{"line_number":40,"context_line":"  cluster."},{"line_number":41,"context_line":"* Allow image creator specifiy the CPU feature as part of image. And this image"},{"line_number":42,"context_line":"  can be used cross Openstack deployements."},{"line_number":43,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_2c4dc399","line":40,"in_reply_to":"fa32b979_757719a0","updated":"2015-06-18 16:20:16.000000000","message":"The intent was that the operator could define models in the flavor--sort of like what Amazon does with their EC2 instances.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"dfe4b8ea55afd725ff150069057eeba225ce3d13","unresolved":false,"context_lines":[{"line_number":37,"context_line":"* Allow the CPU model to be specified as part of the flavor and allow the"},{"line_number":38,"context_line":"  scheduler to select a host that can provide a vCPU of the specified model."},{"line_number":39,"context_line":"  This can be used by operator define the live-migratable guest cpu in the"},{"line_number":40,"context_line":"  cluster."},{"line_number":41,"context_line":"* Allow image creator specifiy the CPU feature as part of image. And this image"},{"line_number":42,"context_line":"  can be used cross Openstack deployements."},{"line_number":43,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_33b3e90b","line":40,"in_reply_to":"fa32b979_757719a0","updated":"2015-06-18 14:41:44.000000000","message":"The problem is we didn\u0027t have consistent CPU model definition. So finally we only have cpu model definition in one deployment. Specified something in image which can\u0027t be used cross Openstack deployment, that isn\u0027t good for image.\n\nSo specified cpu-model is for the use-case \"operator define the live-migratable guest cpu in the cluster.\"\n\nThe next use-case at line 41, it is belongs in the image metadata. We can easy have consistent cpu features definition cross openstack deployment. For image creator, that means he can create image added the required feature, then this image can be used by any openstack deployement.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"92d9b6fa78ff32799321e094660b43e95bba7afa","unresolved":false,"context_lines":[{"line_number":39,"context_line":"  This can be used by operator define the live-migratable guest cpu in the"},{"line_number":40,"context_line":"  cluster."},{"line_number":41,"context_line":"* Allow image creator specifiy the CPU feature as part of image. And this image"},{"line_number":42,"context_line":"  can be used cross Openstack deployements."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Project Priority"},{"line_number":45,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_55a7750a","line":42,"updated":"2015-06-18 14:03:24.000000000","message":"OK, so image properties would override the flavor properties? Is that correct? Kind of like the existing NUMA image and flavor properties?","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"5b735d499da8e71429ec13d9988a304f276c844f","unresolved":false,"context_lines":[{"line_number":39,"context_line":"  This can be used by operator define the live-migratable guest cpu in the"},{"line_number":40,"context_line":"  cluster."},{"line_number":41,"context_line":"* Allow image creator specifiy the CPU feature as part of image. And this image"},{"line_number":42,"context_line":"  can be used cross Openstack deployements."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Project Priority"},{"line_number":45,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_0c3d5fdc","line":42,"in_reply_to":"fa32b979_55a7750a","updated":"2015-06-18 16:20:16.000000000","message":"The image properties define what the image needs, the flavor properties represent what the flavor provides.  The flavor must provide *at least* as much as what the image requires.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"dfe4b8ea55afd725ff150069057eeba225ce3d13","unresolved":false,"context_lines":[{"line_number":39,"context_line":"  This can be used by operator define the live-migratable guest cpu in the"},{"line_number":40,"context_line":"  cluster."},{"line_number":41,"context_line":"* Allow image creator specifiy the CPU feature as part of image. And this image"},{"line_number":42,"context_line":"  can be used cross Openstack deployements."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Project Priority"},{"line_number":45,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_53b22de6","line":42,"in_reply_to":"fa32b979_55a7750a","updated":"2015-06-18 14:41:44.000000000","message":"yes, similar, but have some limited. It described from line 103 to 110","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"92d9b6fa78ff32799321e094660b43e95bba7afa","unresolved":false,"context_lines":[{"line_number":49,"context_line":"Proposed change"},{"line_number":50,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"For insulate tenant users from the differences in the way hypervisors name"},{"line_number":53,"context_line":"their cpu features\u0026models. This proposes add new data model to abstract the"},{"line_number":54,"context_line":"CPU capability, the tenant users can get the guest CPU capability from"},{"line_number":55,"context_line":"that abstraction without understand the different between different"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_b58fe173","line":52,"updated":"2015-06-18 14:03:24.000000000","message":"s/For insulate/In order to insulate/","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"dfe4b8ea55afd725ff150069057eeba225ce3d13","unresolved":false,"context_lines":[{"line_number":49,"context_line":"Proposed change"},{"line_number":50,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"For insulate tenant users from the differences in the way hypervisors name"},{"line_number":53,"context_line":"their cpu features\u0026models. This proposes add new data model to abstract the"},{"line_number":54,"context_line":"CPU capability, the tenant users can get the guest CPU capability from"},{"line_number":55,"context_line":"that abstraction without understand the different between different"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_f3cd8166","line":52,"in_reply_to":"fa32b979_b58fe173","updated":"2015-06-18 14:41:44.000000000","message":"Done","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"92d9b6fa78ff32799321e094660b43e95bba7afa","unresolved":false,"context_lines":[{"line_number":50,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"For insulate tenant users from the differences in the way hypervisors name"},{"line_number":53,"context_line":"their cpu features\u0026models. This proposes add new data model to abstract the"},{"line_number":54,"context_line":"CPU capability, the tenant users can get the guest CPU capability from"},{"line_number":55,"context_line":"that abstraction without understand the different between different"},{"line_number":56,"context_line":"hypervisors or various version of hypervisors."}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_35c991ac","line":53,"updated":"2015-06-18 14:03:24.000000000","message":"s/features\u0026models. This proposes add/features and models, this proposal adds a/","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"dfe4b8ea55afd725ff150069057eeba225ce3d13","unresolved":false,"context_lines":[{"line_number":50,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"For insulate tenant users from the differences in the way hypervisors name"},{"line_number":53,"context_line":"their cpu features\u0026models. This proposes add new data model to abstract the"},{"line_number":54,"context_line":"CPU capability, the tenant users can get the guest CPU capability from"},{"line_number":55,"context_line":"that abstraction without understand the different between different"},{"line_number":56,"context_line":"hypervisors or various version of hypervisors."}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_13c90559","line":53,"in_reply_to":"fa32b979_35c991ac","updated":"2015-06-18 14:41:44.000000000","message":"Done","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"92d9b6fa78ff32799321e094660b43e95bba7afa","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"For insulate tenant users from the differences in the way hypervisors name"},{"line_number":53,"context_line":"their cpu features\u0026models. This proposes add new data model to abstract the"},{"line_number":54,"context_line":"CPU capability, the tenant users can get the guest CPU capability from"},{"line_number":55,"context_line":"that abstraction without understand the different between different"},{"line_number":56,"context_line":"hypervisors or various version of hypervisors."},{"line_number":57,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_d5b86513","line":54,"updated":"2015-06-18 14:03:24.000000000","message":"s/capability/capabilities/g","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"dfe4b8ea55afd725ff150069057eeba225ce3d13","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"For insulate tenant users from the differences in the way hypervisors name"},{"line_number":53,"context_line":"their cpu features\u0026models. This proposes add new data model to abstract the"},{"line_number":54,"context_line":"CPU capability, the tenant users can get the guest CPU capability from"},{"line_number":55,"context_line":"that abstraction without understand the different between different"},{"line_number":56,"context_line":"hypervisors or various version of hypervisors."},{"line_number":57,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_d3be3dad","line":54,"in_reply_to":"fa32b979_d5b86513","updated":"2015-06-18 14:41:44.000000000","message":"Done","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"92d9b6fa78ff32799321e094660b43e95bba7afa","unresolved":false,"context_lines":[{"line_number":52,"context_line":"For insulate tenant users from the differences in the way hypervisors name"},{"line_number":53,"context_line":"their cpu features\u0026models. This proposes add new data model to abstract the"},{"line_number":54,"context_line":"CPU capability, the tenant users can get the guest CPU capability from"},{"line_number":55,"context_line":"that abstraction without understand the different between different"},{"line_number":56,"context_line":"hypervisors or various version of hypervisors."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"The new models \"CPUFlavor\" and \"CPUFlavorSpec\" are introduced. The \"CPUFlavor\""}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_154a4d26","line":55,"updated":"2015-06-18 14:03:24.000000000","message":"s/without understand/without needing to understand/","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"dfe4b8ea55afd725ff150069057eeba225ce3d13","unresolved":false,"context_lines":[{"line_number":52,"context_line":"For insulate tenant users from the differences in the way hypervisors name"},{"line_number":53,"context_line":"their cpu features\u0026models. This proposes add new data model to abstract the"},{"line_number":54,"context_line":"CPU capability, the tenant users can get the guest CPU capability from"},{"line_number":55,"context_line":"that abstraction without understand the different between different"},{"line_number":56,"context_line":"hypervisors or various version of hypervisors."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"The new models \"CPUFlavor\" and \"CPUFlavorSpec\" are introduced. The \"CPUFlavor\""}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_73e091cd","line":55,"in_reply_to":"fa32b979_154a4d26","updated":"2015-06-18 14:41:44.000000000","message":"Done","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"92d9b6fa78ff32799321e094660b43e95bba7afa","unresolved":false,"context_lines":[{"line_number":53,"context_line":"their cpu features\u0026models. This proposes add new data model to abstract the"},{"line_number":54,"context_line":"CPU capability, the tenant users can get the guest CPU capability from"},{"line_number":55,"context_line":"that abstraction without understand the different between different"},{"line_number":56,"context_line":"hypervisors or various version of hypervisors."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"The new models \"CPUFlavor\" and \"CPUFlavorSpec\" are introduced. The \"CPUFlavor\""},{"line_number":59,"context_line":"is used to provide abstract CPU capability for the tenant user. The flavor"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_355751cb","line":56,"updated":"2015-06-18 14:03:24.000000000","message":"s/version/versions/","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"dfe4b8ea55afd725ff150069057eeba225ce3d13","unresolved":false,"context_lines":[{"line_number":53,"context_line":"their cpu features\u0026models. This proposes add new data model to abstract the"},{"line_number":54,"context_line":"CPU capability, the tenant users can get the guest CPU capability from"},{"line_number":55,"context_line":"that abstraction without understand the different between different"},{"line_number":56,"context_line":"hypervisors or various version of hypervisors."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"The new models \"CPUFlavor\" and \"CPUFlavorSpec\" are introduced. The \"CPUFlavor\""},{"line_number":59,"context_line":"is used to provide abstract CPU capability for the tenant user. The flavor"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_33e689e8","line":56,"in_reply_to":"fa32b979_355751cb","updated":"2015-06-18 14:41:44.000000000","message":"Done","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"92d9b6fa78ff32799321e094660b43e95bba7afa","unresolved":false,"context_lines":[{"line_number":75,"context_line":"have such CPUID flags, it can reference to some technical terms which show"},{"line_number":76,"context_line":"some specific feature in the CPU. And those features naming and description"},{"line_number":77,"context_line":"maintenance in the nova code tree. And will provide public API to query"},{"line_number":78,"context_line":"the features is known by current Openstack deployment."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"Finally, the CPU Flavor expect to like"},{"line_number":81,"context_line":"`Amazon does \u003chttp://aws.amazon.com/ec2/instance-types/\u003e`__ to tenant users."}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_55e9b5b5","line":78,"updated":"2015-06-18 14:03:24.000000000","message":"Please don\u0027t call this thing CPUFlavor and CPUFlavorSpec. These aren\u0027t flavors. These are CPU capabilities, that\u0027s all. These things really should just be constant strings (and a constant string mapping) in a /nova/virt/cpu_capabilities.py file, and then use those constants in the nova/objects/image_metadata.py object. There\u0027s no reason to invent a new CPUFlavor object when these are just simple strings.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"dfe4b8ea55afd725ff150069057eeba225ce3d13","unresolved":false,"context_lines":[{"line_number":75,"context_line":"have such CPUID flags, it can reference to some technical terms which show"},{"line_number":76,"context_line":"some specific feature in the CPU. And those features naming and description"},{"line_number":77,"context_line":"maintenance in the nova code tree. And will provide public API to query"},{"line_number":78,"context_line":"the features is known by current Openstack deployment."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"Finally, the CPU Flavor expect to like"},{"line_number":81,"context_line":"`Amazon does \u003chttp://aws.amazon.com/ec2/instance-types/\u003e`__ to tenant users."}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_f357c155","line":78,"in_reply_to":"fa32b979_55e9b5b5","updated":"2015-06-18 14:41:44.000000000","message":"Emm....I guess you think there only one thing is going to resolve, specifed required cpu features in the image.\n\nActually this spec want to resolve more.  Resolve what cpu model will be used by instance.\n\nSo there are two goals at line 35","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":7055,"name":"Tapio Tallgren","username":"tapiotallgren","inactive":true},"change_message_id":"0b8f98b6b88b1e2cfaeb1add348e1b09278a1244","unresolved":false,"context_lines":[{"line_number":101,"context_line":"described. And the cpu mode will be \"custom\"."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"In the flavor, we only support specified CPUFlavor. In the image, we can"},{"line_number":104,"context_line":"specified CPUFlavor or features."},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"If CPUFlavor is specified in the image metadata, the flavor should have"},{"line_number":107,"context_line":"same CPUFlavor specified."}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_a7bedaab","line":104,"updated":"2015-06-18 12:12:11.000000000","message":"Line 167 says that CPUFlavorSpec is stored with image. Please clarify.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d054e344334c638c9645600a48344e45b2314755","unresolved":false,"context_lines":[{"line_number":101,"context_line":"described. And the cpu mode will be \"custom\"."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"In the flavor, we only support specified CPUFlavor. In the image, we can"},{"line_number":104,"context_line":"specified CPUFlavor or features."},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"If CPUFlavor is specified in the image metadata, the flavor should have"},{"line_number":107,"context_line":"same CPUFlavor specified."}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_bf4a6253","line":104,"in_reply_to":"fa32b979_a7bedaab","updated":"2015-06-18 13:06:28.000000000","message":"167 say it should store in Instance object, not the image.\n\n167 related to line 640.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"92d9b6fa78ff32799321e094660b43e95bba7afa","unresolved":false,"context_lines":[{"line_number":112,"context_line":"Some examples of specifying the cpu_flavor/feature(s):"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"*hw:cpu_flavor\u003dFoo*"},{"line_number":115,"context_line":"  Use named CPU model *Foo*."},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"*hw:cpu_features\u003dbar,wizz*"},{"line_number":118,"context_line":"  The instance only can be booted by the CPUFlavor supported bar and wizz"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_f529e9e6","line":115,"updated":"2015-06-18 14:03:24.000000000","message":"-1. This isn\u0027t necessary, IMHO. There\u0027s no reason to have a CPUFlavor model -- see above.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"92d9b6fa78ff32799321e094660b43e95bba7afa","unresolved":false,"context_lines":[{"line_number":114,"context_line":"*hw:cpu_flavor\u003dFoo*"},{"line_number":115,"context_line":"  Use named CPU model *Foo*."},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"*hw:cpu_features\u003dbar,wizz*"},{"line_number":118,"context_line":"  The instance only can be booted by the CPUFlavor supported bar and wizz"},{"line_number":119,"context_line":"  features."},{"line_number":120,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_95665d4f","line":117,"updated":"2015-06-18 14:03:24.000000000","message":"Recommend:\n\n \"hw:cpu_capabilities\u003dbar,wizz\"","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"5b735d499da8e71429ec13d9988a304f276c844f","unresolved":false,"context_lines":[{"line_number":114,"context_line":"*hw:cpu_flavor\u003dFoo*"},{"line_number":115,"context_line":"  Use named CPU model *Foo*."},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"*hw:cpu_features\u003dbar,wizz*"},{"line_number":118,"context_line":"  The instance only can be booted by the CPUFlavor supported bar and wizz"},{"line_number":119,"context_line":"  features."},{"line_number":120,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_8f45e143","line":117,"in_reply_to":"fa32b979_95665d4f","updated":"2015-06-18 16:20:16.000000000","message":"In the libvirt world at least \"cpu capabilities\" implies much more than just CPU features, but also model number, topology, architecture, vendor, etc.  I wanted to make it clear that this is just the list of CPU features.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":7055,"name":"Tapio Tallgren","username":"tapiotallgren","inactive":true},"change_message_id":"0b8f98b6b88b1e2cfaeb1add348e1b09278a1244","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    description \u003d Column(Text(), nullable\u003dTrue)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"  class CPUFlavorSpecs(Base, NovaBase):"},{"line_number":155,"context_line":"    __tablename__ \u003d \"cpu_specification\""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    cpu_flavor_id \u003d Column(Integer)"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_8702b6b2","line":154,"updated":"2015-06-18 12:12:11.000000000","message":"Should be BASE","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d054e344334c638c9645600a48344e45b2314755","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    description \u003d Column(Text(), nullable\u003dTrue)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"  class CPUFlavorSpecs(Base, NovaBase):"},{"line_number":155,"context_line":"    __tablename__ \u003d \"cpu_specification\""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    cpu_flavor_id \u003d Column(Integer)"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_ff3d4ac4","line":154,"in_reply_to":"fa32b979_8702b6b2","updated":"2015-06-18 13:06:28.000000000","message":"thanks","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":7055,"name":"Tapio Tallgren","username":"tapiotallgren","inactive":true},"change_message_id":"0b8f98b6b88b1e2cfaeb1add348e1b09278a1244","unresolved":false,"context_lines":[{"line_number":155,"context_line":"    __tablename__ \u003d \"cpu_specification\""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    cpu_flavor_id \u003d Column(Integer)"},{"line_number":158,"context_line":"    hypervisor_type \u003d Column(String(255), nullable\u003dFalse, unqiue\u003dTrue)"},{"line_number":159,"context_line":"    cpu_model \u003d Column(String(255), nullable\u003dFalse)"},{"line_number":160,"context_line":"    features \u003d Column(Text(), nullable\u003dTrue)"},{"line_number":161,"context_line":"    required \u003d Column(String(255), nullable\u003dTrue)"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_27288a32","line":158,"updated":"2015-06-18 12:12:11.000000000","message":"Why is hypervisor_type unique?","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d054e344334c638c9645600a48344e45b2314755","unresolved":false,"context_lines":[{"line_number":155,"context_line":"    __tablename__ \u003d \"cpu_specification\""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    cpu_flavor_id \u003d Column(Integer)"},{"line_number":158,"context_line":"    hypervisor_type \u003d Column(String(255), nullable\u003dFalse, unqiue\u003dTrue)"},{"line_number":159,"context_line":"    cpu_model \u003d Column(String(255), nullable\u003dFalse)"},{"line_number":160,"context_line":"    features \u003d Column(Text(), nullable\u003dTrue)"},{"line_number":161,"context_line":"    required \u003d Column(String(255), nullable\u003dTrue)"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_3f1f325c","line":158,"in_reply_to":"fa32b979_27288a32","updated":"2015-06-18 13:06:28.000000000","message":"It expect only one CPUFlavorSpec in CPUFlavor for a single hypervisor.\n\nThis spec is used to tell different type hypervisor how to translate the CPUFlavor. So there is meanless two specs for kvm hypervisor.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"5eca9799eb92f4d486ee378909167402a1299d19","unresolved":false,"context_lines":[{"line_number":155,"context_line":"    __tablename__ \u003d \"cpu_specification\""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    cpu_flavor_id \u003d Column(Integer)"},{"line_number":158,"context_line":"    hypervisor_type \u003d Column(String(255), nullable\u003dFalse, unqiue\u003dTrue)"},{"line_number":159,"context_line":"    cpu_model \u003d Column(String(255), nullable\u003dFalse)"},{"line_number":160,"context_line":"    features \u003d Column(Text(), nullable\u003dTrue)"},{"line_number":161,"context_line":"    required \u003d Column(String(255), nullable\u003dTrue)"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_f829e0e6","line":158,"in_reply_to":"fa32b979_3f1f325c","updated":"2015-06-18 14:09:44.000000000","message":"Doesn\u0027t the unique constraint have to be against the tuple(cpu_flavor_id, hypervisor_type), not merely (hypervisor_type), otherwise you don\u0027t allow multiple CPUFlavors per hypervisor","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"e55c6de9bbe6d1ec57fb2792ae7b4352a8e51b86","unresolved":false,"context_lines":[{"line_number":155,"context_line":"    __tablename__ \u003d \"cpu_specification\""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    cpu_flavor_id \u003d Column(Integer)"},{"line_number":158,"context_line":"    hypervisor_type \u003d Column(String(255), nullable\u003dFalse, unqiue\u003dTrue)"},{"line_number":159,"context_line":"    cpu_model \u003d Column(String(255), nullable\u003dFalse)"},{"line_number":160,"context_line":"    features \u003d Column(Text(), nullable\u003dTrue)"},{"line_number":161,"context_line":"    required \u003d Column(String(255), nullable\u003dTrue)"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_eedef6db","line":158,"in_reply_to":"fa32b979_f829e0e6","updated":"2015-06-18 14:51:03.000000000","message":"oops, you are right, this should unique as tuple(cpu_flavor_id, hypervisor_type) thanks!","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"92d9b6fa78ff32799321e094660b43e95bba7afa","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    required \u003d Column(String(255), nullable\u003dTrue)"},{"line_number":162,"context_line":"    cpu_flavor \u003d orm.relationship(CPUFlavor,"},{"line_number":163,"context_line":"                                  backref\u003dorm.backref(\u0027cpu_flavor_specs\u0027),"},{"line_number":164,"context_line":"                                  foreign_keys\u003dcpu_flavor_id)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"After the translate CPUFlavor into the CPUFlavorSpec, the CPUFlavorSpec should"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_181fe408","line":164,"updated":"2015-06-18 14:03:24.000000000","message":"-1. IMHO, at this time, there\u0027s no need to change the data model in Nova\u0027s database. The facilities for tracking these kinds of things (CPU capabilities) are already in the relevant tables (host_aggregates and compute_nodes and instance_extra).","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"5b735d499da8e71429ec13d9988a304f276c844f","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    required \u003d Column(String(255), nullable\u003dTrue)"},{"line_number":162,"context_line":"    cpu_flavor \u003d orm.relationship(CPUFlavor,"},{"line_number":163,"context_line":"                                  backref\u003dorm.backref(\u0027cpu_flavor_specs\u0027),"},{"line_number":164,"context_line":"                                  foreign_keys\u003dcpu_flavor_id)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"After the translate CPUFlavor into the CPUFlavorSpec, the CPUFlavorSpec should"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_2f85b558","line":164,"in_reply_to":"fa32b979_181fe408","updated":"2015-06-18 16:20:16.000000000","message":"As long as we\u0027re willing to stuff the data into the existing text fields as new dict keys or something, I agree with you.  (That was my original proposal.)","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"5eca9799eb92f4d486ee378909167402a1299d19","unresolved":false,"context_lines":[{"line_number":167,"context_line":"After the translate CPUFlavor into the CPUFlavorSpec, the CPUFlavorSpec should"},{"line_number":168,"context_line":"be stored in Instance object. Then when rescheduling the instance, instance"},{"line_number":169,"context_line":"can keeping same CPU Spec which won\u0027t break the guest os. This will stored"},{"line_number":170,"context_line":"in \u0027instance_extra\u0027 table."},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"::"},{"line_number":173,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_f861e005","line":170,"updated":"2015-06-18 14:09:44.000000000","message":"Hmm, if the cloud admin ever changes the CPUFlavorSpecs setup this means any existing guests using that CPUFlavourSpecs will change too. I don\u0027t think that is good. The instance already has a VirtCPUModel associated with it, that stores the actual hypervisor specific CPU representation. I think this is sufficient.\n\nWhen you first boot an instance, the hypervisor driver will convert the CPUFlavorSpecs into a VirtCPUModel and store the VirtCPUModel. For as long as that instance exists, everything should use the VirtCPUModel - the CPUFlavorSpecs should not be used once the instance has booted, so we ensure the guest CPU model never changes underneath it.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"e55c6de9bbe6d1ec57fb2792ae7b4352a8e51b86","unresolved":false,"context_lines":[{"line_number":167,"context_line":"After the translate CPUFlavor into the CPUFlavorSpec, the CPUFlavorSpec should"},{"line_number":168,"context_line":"be stored in Instance object. Then when rescheduling the instance, instance"},{"line_number":169,"context_line":"can keeping same CPU Spec which won\u0027t break the guest os. This will stored"},{"line_number":170,"context_line":"in \u0027instance_extra\u0027 table."},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"::"},{"line_number":173,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_e916f04a","line":170,"in_reply_to":"fa32b979_f861e005","updated":"2015-06-18 14:51:03.000000000","message":"Actually I have same purpose with you. The instance extra is not only store a reference to CPUFlavorSpec obj, the instance extra store an entire CPUFlavorSpec obj(It means a copy of CPUFlavorSpec). Actually the scheduler depend on CPUFlavorSpec to do the scheduling. If we use VirtCPUModel, that means we need scheduler can do scheduling based CPUFlavorSpec and VirtCPUModel also, that just create more complex code. What would you think?","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"92d9b6fa78ff32799321e094660b43e95bba7afa","unresolved":false,"context_lines":[{"line_number":195,"context_line":"       },"},{"line_number":196,"context_line":"       ..."},{"line_number":197,"context_line":"    ]"},{"line_number":198,"context_line":"  }"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"And this spec propose add unified definition about CPU features which"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_d8997c7a","line":198,"updated":"2015-06-18 14:03:24.000000000","message":"This information is essentially static and could be put as a bunch of constants in /nova/virt/cpu_capabilities.py","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"5b735d499da8e71429ec13d9988a304f276c844f","unresolved":false,"context_lines":[{"line_number":195,"context_line":"       },"},{"line_number":196,"context_line":"       ..."},{"line_number":197,"context_line":"    ]"},{"line_number":198,"context_line":"  }"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"And this spec propose add unified definition about CPU features which"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_2fd37561","line":198,"in_reply_to":"fa32b979_d8997c7a","updated":"2015-06-18 16:20:16.000000000","message":"It\u0027s not constant though, since it can depend on whether the BIOS and/or CPU microcode has masked certain features on that compute node.  Also, I\u0027m told that different hypervisor versions can expose different features for the same model.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"dfe4b8ea55afd725ff150069057eeba225ce3d13","unresolved":false,"context_lines":[{"line_number":195,"context_line":"       },"},{"line_number":196,"context_line":"       ..."},{"line_number":197,"context_line":"    ]"},{"line_number":198,"context_line":"  }"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"And this spec propose add unified definition about CPU features which"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_0e71da75","line":198,"in_reply_to":"fa32b979_d8997c7a","updated":"2015-06-18 14:41:44.000000000","message":"thanks, /nova/virt/cpu_capabilities.py is good choice","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"92d9b6fa78ff32799321e094660b43e95bba7afa","unresolved":false,"context_lines":[{"line_number":200,"context_line":""},{"line_number":201,"context_line":"And this spec propose add unified definition about CPU features which"},{"line_number":202,"context_line":"can be referenced cross Openstack deployement. So propose there json"},{"line_number":203,"context_line":"file to store such info. Proposes the file at `nova/compute/cpu_features.json`"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"::"},{"line_number":206,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_98953434","line":203,"updated":"2015-06-18 14:03:24.000000000","message":"If you are going to use JSON, then you should use JSONSchema for validation. However, I recommend using the same strategy as, say, the architecture constants and use a Python module for these constant strings and mappings.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"dfe4b8ea55afd725ff150069057eeba225ce3d13","unresolved":false,"context_lines":[{"line_number":200,"context_line":""},{"line_number":201,"context_line":"And this spec propose add unified definition about CPU features which"},{"line_number":202,"context_line":"can be referenced cross Openstack deployement. So propose there json"},{"line_number":203,"context_line":"file to store such info. Proposes the file at `nova/compute/cpu_features.json`"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"::"},{"line_number":206,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_2edcde44","line":203,"in_reply_to":"fa32b979_98953434","updated":"2015-06-18 14:41:44.000000000","message":"ok, got it","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"5eca9799eb92f4d486ee378909167402a1299d19","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                     instructions that deliver performance increases across \\"},{"line_number":215,"context_line":"                     a broad range of applications.\"}"},{"line_number":216,"context_line":"    ..."},{"line_number":217,"context_line":"  ]"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"REST API impact"},{"line_number":220,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_b31cd96a","line":217,"updated":"2015-06-18 14:09:44.000000000","message":"I don\u0027t think we should be defining the list of CPU feature flags in Nova. This will mean that Nova is needlessly limited when vendors bring out new CPU models. If the underlying hypervisor supports a CPU feature flag we should ensure we can use it without having to wait for a new release of Nova to include the feature flag name.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"5b735d499da8e71429ec13d9988a304f276c844f","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                     instructions that deliver performance increases across \\"},{"line_number":215,"context_line":"                     a broad range of applications.\"}"},{"line_number":216,"context_line":"    ..."},{"line_number":217,"context_line":"  ]"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"REST API impact"},{"line_number":220,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_2f6135a9","line":217,"in_reply_to":"fa32b979_b31cd96a","updated":"2015-06-18 16:20:16.000000000","message":"Dan Smith was highly opinionated that we would want a common set of feature names across all the hypervisors.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"e55c6de9bbe6d1ec57fb2792ae7b4352a8e51b86","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                     instructions that deliver performance increases across \\"},{"line_number":215,"context_line":"                     a broad range of applications.\"}"},{"line_number":216,"context_line":"    ..."},{"line_number":217,"context_line":"  ]"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"REST API impact"},{"line_number":220,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_e96b50b5","line":217,"in_reply_to":"fa32b979_b31cd96a","updated":"2015-06-18 14:51:03.000000000","message":"Yes, so that is way I define this as json file. If this file is updated, the operator can update this file in his deployment. Without such definition, we can\u0027t ensure those features can be used cross openstack deployment.\n\nWithout cross openstack deployement, specified features in the image looks like meanless.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"92d9b6fa78ff32799321e094660b43e95bba7afa","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        \"description\": \".....\""},{"line_number":356,"context_line":"      }"},{"line_number":357,"context_line":"    ]"},{"line_number":358,"context_line":"  }"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"."},{"line_number":361,"context_line":"  * POST/PUT/DELETE\u0027s default policy rule is admin-only API. GET\u0027s default"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_78e070cd","line":358,"updated":"2015-06-18 14:03:24.000000000","message":"-1 on any new REST API for this stuff. We already have a (crappy) API for flavors, extra_specs (host agg and flavor) and marrying those things during boot requests (POST /servers). We don\u0027t need another API for CPU-feature-specific stuff.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"5b735d499da8e71429ec13d9988a304f276c844f","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        \"description\": \".....\""},{"line_number":356,"context_line":"      }"},{"line_number":357,"context_line":"    ]"},{"line_number":358,"context_line":"  }"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"."},{"line_number":361,"context_line":"  * POST/PUT/DELETE\u0027s default policy rule is admin-only API. GET\u0027s default"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_8ffde1b2","line":358,"in_reply_to":"fa32b979_78e070cd","updated":"2015-06-18 16:20:16.000000000","message":"Dan Smith was very opinionated that flavor extra specs and image metadata was not suitable.  The issue is that if you start specifying a whole bunch of features that you could hit the 255 character limit.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"dfe4b8ea55afd725ff150069057eeba225ce3d13","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        \"description\": \".....\""},{"line_number":356,"context_line":"      }"},{"line_number":357,"context_line":"    ]"},{"line_number":358,"context_line":"  }"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"."},{"line_number":361,"context_line":"  * POST/PUT/DELETE\u0027s default policy rule is admin-only API. GET\u0027s default"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa32b979_eed11624","line":358,"in_reply_to":"fa32b979_78e070cd","updated":"2015-06-18 14:41:44.000000000","message":"This API is used to build a mapping between abstraction cpu capabilites and hypervisor supported cpu model.","commit_id":"1cef1b8343d547c568ea212b63ae3f9ea5c211c7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"230b897a77de98ba068ebc166a5dd4c0aeb97602","unresolved":false,"context_lines":[{"line_number":172,"context_line":"properties."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"*hw:cpu_capability\u003d\u003cThe name defined in the cpu capabilities\u003e*"},{"line_number":175,"context_line":"*hw:cpu_featuress\u003d\u003cfeat_1\u003e[,\u003cfeat_?\u003e]...*"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"If none of those properties in the flavor and image, the nova behavior will"},{"line_number":178,"context_line":"work as before. The guest cpu model is controlled by libvirt configure"}],"source_content_type":"text/x-rst","patch_set":10,"id":"fa32b979_07db0650","line":175,"updated":"2015-06-24 23:27:17.000000000","message":"Is it okay to specify both of these?","commit_id":"1776edd0a605fd9cc9a6ee1cf9b3e238856ac1d9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"8006092417b61970b80f15402fedbb710ce46967","unresolved":false,"context_lines":[{"line_number":172,"context_line":"properties."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"*hw:cpu_capability\u003d\u003cThe name defined in the cpu capabilities\u003e*"},{"line_number":175,"context_line":"*hw:cpu_featuress\u003d\u003cfeat_1\u003e[,\u003cfeat_?\u003e]...*"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"If none of those properties in the flavor and image, the nova behavior will"},{"line_number":178,"context_line":"work as before. The guest cpu model is controlled by libvirt configure"}],"source_content_type":"text/x-rst","patch_set":10,"id":"fa32b979_976f2c91","line":175,"in_reply_to":"fa32b979_07db0650","updated":"2015-06-26 07:55:49.000000000","message":"it isn\u0027t.  Flavor only support \u0027cpu_capability\u0027. Image support cpu_capability and cpu_features, but you can\u0027t specify them at same time. Because abstract cpu capability is pre-defined by operator, user only can choice one of pre-defined cpu capabilities. If we support specified both of these, it means we allow user create custom cpu capability which is pre-defined cpu capability plus some extra features. If make sense, I will add some describe at here.","commit_id":"1776edd0a605fd9cc9a6ee1cf9b3e238856ac1d9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"230b897a77de98ba068ebc166a5dd4c0aeb97602","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"*hw:cpu_features\u003dbar,wizz* in the image properties."},{"line_number":188,"context_line":"  The instance\u0027s vcpu at least include cpu feature \u0027bar\u0027 and \u0027wizz\u0027. And"},{"line_number":189,"context_line":"  the flavor specified cpu capability should include those cpu feature also."},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"Alternatives"},{"line_number":192,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"fa32b979_87ef16e8","line":189,"updated":"2015-06-24 23:27:17.000000000","message":"Is the point of this to say \"pick one of nova\u0027s defined capabilities objects that has all the specified flags\" ?\n\nWhy not just let them choose one of the cpu models and be done with it?","commit_id":"1776edd0a605fd9cc9a6ee1cf9b3e238856ac1d9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"8006092417b61970b80f15402fedbb710ce46967","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"*hw:cpu_features\u003dbar,wizz* in the image properties."},{"line_number":188,"context_line":"  The instance\u0027s vcpu at least include cpu feature \u0027bar\u0027 and \u0027wizz\u0027. And"},{"line_number":189,"context_line":"  the flavor specified cpu capability should include those cpu feature also."},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"Alternatives"},{"line_number":192,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"fa32b979_da7cfb72","line":189,"in_reply_to":"fa32b979_87ef16e8","updated":"2015-06-26 07:55:49.000000000","message":"I mean like this:\n\nimage property includes \"hw:cpu_features\u003dbar,wizz\", Then the flavor extra spec must includes this  \"hw:cpu_capability\u003dFoo\",  and Foo must include the features bar and wizz.\n\nSorry, I\u0027m not quite understand your question. The \u0027cpu models\u0027 you point to \u0027nova\u0027s defined capabilities\u0027? If yes, my answer is \u0027nova\u0027s defined capabilities\u0027 defined by operator, it can\u0027t be used by other openstack deployment. So I hope image creator can specify flags which can be understand by any openstack deployment.","commit_id":"1776edd0a605fd9cc9a6ee1cf9b3e238856ac1d9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1d3776e9e5fde6a7254f630b72789dfc7fbe8d53","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"*hw:cpu_features\u003dbar,wizz* in the image properties."},{"line_number":188,"context_line":"  The instance\u0027s vcpu at least include cpu feature \u0027bar\u0027 and \u0027wizz\u0027. And"},{"line_number":189,"context_line":"  the flavor specified cpu capability should include those cpu feature also."},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"Alternatives"},{"line_number":192,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"ba3cc151_9abc48bc","line":189,"in_reply_to":"fa32b979_da7cfb72","updated":"2015-07-02 21:26:13.000000000","message":"But as I said before, this value is severely limited in length, which means you can\u0027t specify everything here, only up to that limit. Further, as danpb pointed out, only the intel architecture defines cpu compatibility like this. Adding a thing that claims to address cpu features or compatibility that only works for one architecture seems kinda bad.","commit_id":"1776edd0a605fd9cc9a6ee1cf9b3e238856ac1d9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"230b897a77de98ba068ebc166a5dd4c0aeb97602","unresolved":false,"context_lines":[{"line_number":222,"context_line":"    \"supported_cpu_models\": ["},{"line_number":223,"context_line":"       {"},{"line_number":224,"context_line":"         \"model\": \"Nehalem\","},{"line_number":225,"context_line":"         \"features\": [\"pge, \"cflush\", ...]"},{"line_number":226,"context_line":"       },"},{"line_number":227,"context_line":"       ..."},{"line_number":228,"context_line":"    ]"}],"source_content_type":"text/x-rst","patch_set":10,"id":"fa32b979_07a9c68f","line":225,"updated":"2015-06-24 23:27:17.000000000","message":"Is this hypervisor-specific? This looks libvirt-y to me.\n\nI wonder if it wouldn\u0027t be better to store the cpu models in the database and let the hypervisor nodes expose a list of model IDs that it supports? If you let the compute nodes choose which things they can support, then we can delegate it to the hypervisor driver to make the determination, and then we don\u0027t have to store what each thing looks like for kvm, vmware, etc.","commit_id":"1776edd0a605fd9cc9a6ee1cf9b3e238856ac1d9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"8006092417b61970b80f15402fedbb710ce46967","unresolved":false,"context_lines":[{"line_number":222,"context_line":"    \"supported_cpu_models\": ["},{"line_number":223,"context_line":"       {"},{"line_number":224,"context_line":"         \"model\": \"Nehalem\","},{"line_number":225,"context_line":"         \"features\": [\"pge, \"cflush\", ...]"},{"line_number":226,"context_line":"       },"},{"line_number":227,"context_line":"       ..."},{"line_number":228,"context_line":"    ]"}],"source_content_type":"text/x-rst","patch_set":10,"id":"fa32b979_2524c2b0","line":225,"in_reply_to":"fa32b979_07a9c68f","updated":"2015-06-26 07:55:49.000000000","message":"Yes, it is hypervisor-specific. There may have different feature set for same model in different hypervisor. (Emm...what mean \u0027libvirt-y\u0027?)\n\nyes, we can store cpu models in the database, as I propose in initial proposal at line 210 of https://review.openstack.org/#/c/170396/8/specs/liberty/approved/virt-driver-cpu-features.rst,cm \n\nBut after rethinking, we needn\u0027t report the feature set supported by cpu model. We only need report supported cpu model name. Because if the host support the features which specified in the mapping, then libvirt driver should ensure this model include same features in finally.","commit_id":"1776edd0a605fd9cc9a6ee1cf9b3e238856ac1d9"},{"author":{"_account_id":4992,"name":"malini-k-bhandaru","email":"malini.k.bhandaru@intel.com","username":"malini-k-bhandaru"},"change_message_id":"2a625c57eb8b3667064bd418d12c07566445e676","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":"    arch: this is used to filter result by cpu architecture. URL:"},{"line_number":247,"context_line":"    \u0027/cpu-capabilites?arch\u003dx86\u0027"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"  * JSON-Schema for response data:"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"::"}],"source_content_type":"text/x-rst","patch_set":10,"id":"fa32b979_e8a6230e","line":248,"updated":"2015-06-24 05:43:26.000000000","message":"Would it make sense to also define a get method along the lines of\n/flavor?hw:cpu_features\u003dbar,wiz\nand /flavor?cpu_model\u003dfoo for a cloud user to determine flavors that meet their needs. Who knows, the cloud provider might also want to return cost or some other metric such as SLAs for the flavors.","commit_id":"1776edd0a605fd9cc9a6ee1cf9b3e238856ac1d9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"3c0250bea7b4355f84dadb8206bc0ed22a33a28c","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":"    arch: this is used to filter result by cpu architecture. URL:"},{"line_number":247,"context_line":"    \u0027/cpu-capabilites?arch\u003dx86\u0027"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"  * JSON-Schema for response data:"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"::"}],"source_content_type":"text/x-rst","patch_set":10,"id":"fa32b979_bcf7ecd1","line":248,"in_reply_to":"fa32b979_e8a6230e","updated":"2015-06-24 14:00:24.000000000","message":"yea, that sounds useful. I think it implements some filters on flavor extraspecs, so it can be more generic for filter extraspecs. I prefer that to be another spec.","commit_id":"1776edd0a605fd9cc9a6ee1cf9b3e238856ac1d9"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"6f899b2172c664d2d916fe72369327db5e429289","unresolved":false,"context_lines":[{"line_number":56,"context_line":"between different hypervisors or various version of hypervisors."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"The new configuration file \u0027etc/nova/cpu-capabilites.json\u0027 is introduced. This"},{"line_number":59,"context_line":"file provides definition of abstract CPU capabilites and mapping of hypervisor"},{"line_number":60,"context_line":"vcpu capabilites. The configuration file use JSON format. The JSON-Schema as"},{"line_number":61,"context_line":"below:"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-rst","patch_set":13,"id":"3a50d1a3_37f6a35d","line":59,"updated":"2015-07-28 13:43:05.000000000","message":"nit: capabilities; you missed the final i, throughout","commit_id":"1aadeb56c1ec4f41344c6533526c5c9869ee1b55"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"6f899b2172c664d2d916fe72369327db5e429289","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"\u0027description\u0027 is just used to provide same human readable information."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"Finally, the CPU Flavor expect to like"},{"line_number":100,"context_line":"`Amazon does \u003chttp://aws.amazon.com/ec2/instance-types/\u003e`__ to tenant users."},{"line_number":101,"context_line":"The CPUFlavor name can be more human readable, like \u0027Intel Xeon E5-2670 v3"},{"line_number":102,"context_line":"with AVX2\u0027. The features in the CPUFlavor includes \u0027avx2\u0027 - \u0027Intel AVX2\u0027,"}],"source_content_type":"text/x-rst","patch_set":13,"id":"3a50d1a3_174b67b2","line":99,"updated":"2015-07-28 13:43:05.000000000","message":"nit: \"is expected to be like what Amazon does \u003c\u003e for tenant users\"?","commit_id":"1aadeb56c1ec4f41344c6533526c5c9869ee1b55"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"6f899b2172c664d2d916fe72369327db5e429289","unresolved":false,"context_lines":[{"line_number":105,"context_line":"\u0027name\u0027 is defined by operator, so those abstract cpu-capabilites only can"},{"line_number":106,"context_line":"be used by specified openstack deployment."},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"For image creator, he expected the image can be used in any openstack"},{"line_number":109,"context_line":"deployment. So we still need some way to specified some cpu requirement"},{"line_number":110,"context_line":"in the image and that can be referenced across openstack deployment."},{"line_number":111,"context_line":""}],"source_content_type":"text/x-rst","patch_set":13,"id":"3a50d1a3_9740d760","line":108,"updated":"2015-07-28 13:43:05.000000000","message":"nit: \"The image author expects the image to work in any OpenStack deployment.\"","commit_id":"1aadeb56c1ec4f41344c6533526c5c9869ee1b55"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2e724b767d07b575244463861863fac8d5488f1b","unresolved":false,"context_lines":[{"line_number":180,"context_line":"properties."},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"*hw:cpu_capability\u003d\u003cThe name defined in the cpu capabilities\u003e*"},{"line_number":183,"context_line":"*hw:cpu_featuress\u003d\u003cfeat_1\u003e[,\u003cfeat_?\u003e]...*"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"If none of those properties in the flavor and image, the nova behavior will"},{"line_number":186,"context_line":"work as before. The guest cpu model is controlled by libvirt configure"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ba3cc151_7a2e24fc","line":183,"updated":"2015-07-02 21:29:51.000000000","message":"Based on your comments on the last version, I don\u0027t think it makes sense to have cpu_features in this form at all.","commit_id":"1aadeb56c1ec4f41344c6533526c5c9869ee1b55"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2e724b767d07b575244463861863fac8d5488f1b","unresolved":false,"context_lines":[{"line_number":198,"context_line":"*hw:cpu_features\u003dbar,wizz* in the image properties."},{"line_number":199,"context_line":"  The instance\u0027s vcpu at least include cpu feature \u0027bar\u0027 and \u0027wizz\u0027. This also"},{"line_number":200,"context_line":"  means the cpu capability which specified in the flavor extra specs must"},{"line_number":201,"context_line":"  include those features, otherwise nova will error out."},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"Alternatives"},{"line_number":204,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ba3cc151_1a3ef827","line":201,"updated":"2015-07-02 21:29:51.000000000","message":"Reiterating that I think this is a bad API. It\u0027s size-limited, platform-limited, etc.","commit_id":"1aadeb56c1ec4f41344c6533526c5c9869ee1b55"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"42bd1048237913ced7fad46141a1ba646a3245a4","unresolved":false,"context_lines":[{"line_number":198,"context_line":"*hw:cpu_features\u003dbar,wizz* in the image properties."},{"line_number":199,"context_line":"  The instance\u0027s vcpu at least include cpu feature \u0027bar\u0027 and \u0027wizz\u0027. This also"},{"line_number":200,"context_line":"  means the cpu capability which specified in the flavor extra specs must"},{"line_number":201,"context_line":"  include those features, otherwise nova will error out."},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"Alternatives"},{"line_number":204,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a4dcd0f_9205587b","line":201,"in_reply_to":"ba3cc151_15f7a98b","updated":"2015-08-11 20:11:42.000000000","message":"As we\u0027ve seen with the public clouds we actually have access to (HP and RAX) people do really weird things with their cpu flags that they expose up. Trying to find a cross section of flags is really weird, and not at all what you would expect.\n\ni.e. truth is stranger than fiction here","commit_id":"1aadeb56c1ec4f41344c6533526c5c9869ee1b55"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"90ea0d53da51ba6e467089ab195a9f170e0eaaee","unresolved":false,"context_lines":[{"line_number":198,"context_line":"*hw:cpu_features\u003dbar,wizz* in the image properties."},{"line_number":199,"context_line":"  The instance\u0027s vcpu at least include cpu feature \u0027bar\u0027 and \u0027wizz\u0027. This also"},{"line_number":200,"context_line":"  means the cpu capability which specified in the flavor extra specs must"},{"line_number":201,"context_line":"  include those features, otherwise nova will error out."},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"Alternatives"},{"line_number":204,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ba3cc151_3a43bc6d","line":201,"in_reply_to":"ba3cc151_1a3ef827","updated":"2015-07-02 21:37:14.000000000","message":"This isn\u0027t used for full feature list. This just used for image properties to require few cpu feature.\n\n\nFor operator, if he want to list full feature list to control the cpu model in his deployment, the feature list should be in the mapping. at line 168","commit_id":"1aadeb56c1ec4f41344c6533526c5c9869ee1b55"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"244dd316d24dbdce103522792e4b16f137e0f1ea","unresolved":false,"context_lines":[{"line_number":198,"context_line":"*hw:cpu_features\u003dbar,wizz* in the image properties."},{"line_number":199,"context_line":"  The instance\u0027s vcpu at least include cpu feature \u0027bar\u0027 and \u0027wizz\u0027. This also"},{"line_number":200,"context_line":"  means the cpu capability which specified in the flavor extra specs must"},{"line_number":201,"context_line":"  include those features, otherwise nova will error out."},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"Alternatives"},{"line_number":204,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ba3cc151_d52e218b","line":201,"in_reply_to":"ba3cc151_3a43bc6d","updated":"2015-07-02 21:39:47.000000000","message":"It will be. Because if I want to run something on multiple clouds with differing models, I\u0027m going to specify every instruction here that I need in my image properties to make sure I get something that runs like I need.","commit_id":"1aadeb56c1ec4f41344c6533526c5c9869ee1b55"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1574b3271305dfb0104663c6852fe6a426c3b8b1","unresolved":false,"context_lines":[{"line_number":198,"context_line":"*hw:cpu_features\u003dbar,wizz* in the image properties."},{"line_number":199,"context_line":"  The instance\u0027s vcpu at least include cpu feature \u0027bar\u0027 and \u0027wizz\u0027. This also"},{"line_number":200,"context_line":"  means the cpu capability which specified in the flavor extra specs must"},{"line_number":201,"context_line":"  include those features, otherwise nova will error out."},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"Alternatives"},{"line_number":204,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ba3cc151_15f7a98b","line":201,"in_reply_to":"ba3cc151_d52e218b","updated":"2015-07-02 22:00:02.000000000","message":"emm....I think software just required few cpu features, not the full list.\n\nJust as AWS did, http://aws.amazon.com/ec2/instance-types/, it only claim few cpu feature the instance supported, not the full feature list.","commit_id":"1aadeb56c1ec4f41344c6533526c5c9869ee1b55"}]}
