)]}'
{"specs/rocky/approved/add-emulated-virtual-tpm.rst":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7f670ed90847143a3c643792242b331e0ea8381c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"Proposed change"},{"line_number":35,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Add a new flavor extra-spec of the form \"hw:vtpm\u003d\u003cbool\u003e\" which would convert"},{"line_number":38,"context_line":"the string to bool using the usual mechanisms.  If the boolean value of the"},{"line_number":39,"context_line":"extra-spec is True, then the nova virt driver will do the appropriate actions"},{"line_number":40,"context_line":"to cause the guest to have a suitable vTPM device."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"For the libvirt virt driver in particular, upstream qemu has support for vTPM"},{"line_number":43,"context_line":"but it is still in the process of being merged into libvirt itself and so the"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_82717fe1","line":40,"range":{"start_line":37,"start_character":0,"end_line":40,"end_character":50},"updated":"2018-06-05 13:30:51.000000000","message":"Is vTPM a consumable resource? That is, is there an upper limit on how many of these we can provide on a system?","commit_id":"7450d006ea00f2658647066f21e0fa1b9a6d3630"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"348b873c65787064b55de264e60829f9e12abccb","unresolved":false,"context_lines":[{"line_number":34,"context_line":"Proposed change"},{"line_number":35,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Add a new flavor extra-spec of the form \"hw:vtpm\u003d\u003cbool\u003e\" which would convert"},{"line_number":38,"context_line":"the string to bool using the usual mechanisms.  If the boolean value of the"},{"line_number":39,"context_line":"extra-spec is True, then the nova virt driver will do the appropriate actions"},{"line_number":40,"context_line":"to cause the guest to have a suitable vTPM device."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"For the libvirt virt driver in particular, upstream qemu has support for vTPM"},{"line_number":43,"context_line":"but it is still in the process of being merged into libvirt itself and so the"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_8084ea5e","line":40,"range":{"start_line":37,"start_character":0,"end_line":40,"end_character":50},"in_reply_to":"5f7c97a3_2748b55a","updated":"2018-06-19 12:10:57.000000000","message":"for the initial design you were talking about at the summit, sure... But if/when someone wants to use a physical TPM to back vTPMs instead of a file on the motherboard, things are going to get way more limited. Though it probably makes sense to request that in a slightly different way, so it\u0027s distinguishable whether you are asking for that extra level of security or not... so solve that separately?","commit_id":"7450d006ea00f2658647066f21e0fa1b9a6d3630"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"d25d3b14e7eda96f8813fde44ed3681293976e0d","unresolved":false,"context_lines":[{"line_number":34,"context_line":"Proposed change"},{"line_number":35,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Add a new flavor extra-spec of the form \"hw:vtpm\u003d\u003cbool\u003e\" which would convert"},{"line_number":38,"context_line":"the string to bool using the usual mechanisms.  If the boolean value of the"},{"line_number":39,"context_line":"extra-spec is True, then the nova virt driver will do the appropriate actions"},{"line_number":40,"context_line":"to cause the guest to have a suitable vTPM device."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"For the libvirt virt driver in particular, upstream qemu has support for vTPM"},{"line_number":43,"context_line":"but it is still in the process of being merged into libvirt itself and so the"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_40f3320a","line":40,"range":{"start_line":37,"start_character":0,"end_line":40,"end_character":50},"in_reply_to":"5f7c97a3_8084ea5e","updated":"2018-06-19 12:11:45.000000000","message":"meant \"file on the hypervisor\"...","commit_id":"7450d006ea00f2658647066f21e0fa1b9a6d3630"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"b4c3a52b0307e2604bd364bb2e5f638276f83454","unresolved":false,"context_lines":[{"line_number":34,"context_line":"Proposed change"},{"line_number":35,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Add a new flavor extra-spec of the form \"hw:vtpm\u003d\u003cbool\u003e\" which would convert"},{"line_number":38,"context_line":"the string to bool using the usual mechanisms.  If the boolean value of the"},{"line_number":39,"context_line":"extra-spec is True, then the nova virt driver will do the appropriate actions"},{"line_number":40,"context_line":"to cause the guest to have a suitable vTPM device."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"For the libvirt virt driver in particular, upstream qemu has support for vTPM"},{"line_number":43,"context_line":"but it is still in the process of being merged into libvirt itself and so the"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_2748b55a","line":40,"range":{"start_line":37,"start_character":0,"end_line":40,"end_character":50},"in_reply_to":"5f7c97a3_82717fe1","updated":"2018-06-05 17:24:01.000000000","message":"The emulated TPM is provided by a \"swtpm\" process running on the host, so the only upper limit would be whatever resources are consumed by that process.  You could certainly have a vTPM on every instance on a compute node, for example.","commit_id":"7450d006ea00f2658647066f21e0fa1b9a6d3630"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7f670ed90847143a3c643792242b331e0ea8381c","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"For the libvirt virt driver in particular, upstream qemu has support for vTPM"},{"line_number":43,"context_line":"but it is still in the process of being merged into libvirt itself and so the"},{"line_number":44,"context_line":"initial implementation will need to bypass libvirt and directly specify qemu"},{"line_number":45,"context_line":"commandline arguments via the libvirt XML.  The desired qemu arguments are"},{"line_number":46,"context_line":"something like this:"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    -bios bios-256k.bin"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_42a60756","line":45,"range":{"start_line":44,"start_character":0,"end_line":45,"end_character":74},"updated":"2018-06-05 13:30:51.000000000","message":"I think this makes this spec a no-go for now. To the best of my knowledge, nova will only use libvirt and won\u0027t bypass that to call qemu directly (at least, I wasn\u0027t able to find any examples of us doing this in the codebase)","commit_id":"7450d006ea00f2658647066f21e0fa1b9a6d3630"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"b4c3a52b0307e2604bd364bb2e5f638276f83454","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"For the libvirt virt driver in particular, upstream qemu has support for vTPM"},{"line_number":43,"context_line":"but it is still in the process of being merged into libvirt itself and so the"},{"line_number":44,"context_line":"initial implementation will need to bypass libvirt and directly specify qemu"},{"line_number":45,"context_line":"commandline arguments via the libvirt XML.  The desired qemu arguments are"},{"line_number":46,"context_line":"something like this:"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    -bios bios-256k.bin"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_276195d4","line":45,"range":{"start_line":44,"start_character":0,"end_line":45,"end_character":74},"in_reply_to":"5f7c97a3_42a60756","updated":"2018-06-05 17:24:01.000000000","message":"I wasn\u0027t sure but I thought I\u0027d put it out there to get some opinions. :)","commit_id":"7450d006ea00f2658647066f21e0fa1b9a6d3630"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7f670ed90847143a3c643792242b331e0ea8381c","unresolved":false,"context_lines":[{"line_number":43,"context_line":"but it is still in the process of being merged into libvirt itself and so the"},{"line_number":44,"context_line":"initial implementation will need to bypass libvirt and directly specify qemu"},{"line_number":45,"context_line":"commandline arguments via the libvirt XML.  The desired qemu arguments are"},{"line_number":46,"context_line":"something like this:"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    -bios bios-256k.bin"},{"line_number":49,"context_line":"    -chardev socket,id\u003dchrtpm,path\u003d${INSTANCES_PATH}/${UUID}/vtpm/swtpm-sock"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_82fe5f36","line":46,"range":{"start_line":46,"start_character":19,"end_line":46,"end_character":20},"updated":"2018-06-05 13:30:51.000000000","message":"::","commit_id":"7450d006ea00f2658647066f21e0fa1b9a6d3630"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"b4c3a52b0307e2604bd364bb2e5f638276f83454","unresolved":false,"context_lines":[{"line_number":43,"context_line":"but it is still in the process of being merged into libvirt itself and so the"},{"line_number":44,"context_line":"initial implementation will need to bypass libvirt and directly specify qemu"},{"line_number":45,"context_line":"commandline arguments via the libvirt XML.  The desired qemu arguments are"},{"line_number":46,"context_line":"something like this:"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    -bios bios-256k.bin"},{"line_number":49,"context_line":"    -chardev socket,id\u003dchrtpm,path\u003d${INSTANCES_PATH}/${UUID}/vtpm/swtpm-sock"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_475e1113","line":46,"range":{"start_line":46,"start_character":19,"end_line":46,"end_character":20},"in_reply_to":"5f7c97a3_82fe5f36","updated":"2018-06-05 17:24:01.000000000","message":"thanks, will fix","commit_id":"7450d006ea00f2658647066f21e0fa1b9a6d3630"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7f670ed90847143a3c643792242b331e0ea8381c","unresolved":false,"context_lines":[{"line_number":64,"context_line":"* In order for this to be useful, some work outside of nova is required.  If"},{"line_number":65,"context_line":"  the vTPM is enabled for a guest, the \"swtpm\" binary must be started up prior"},{"line_number":66,"context_line":"  to starting the qemu process.  One possible implementation would be to use a"},{"line_number":67,"context_line":"  libvirt hook.  Once the libvirt code to support vTPM is merged this will be"},{"line_number":68,"context_line":"  handled by libvirt itself."},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"* Currently qemu does not support live migration of vTPM device state.  This"},{"line_number":71,"context_line":"  functionality is currently under review.  Until it merges we might want to"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_02348ffa","line":68,"range":{"start_line":67,"start_character":18,"end_line":68,"end_character":28},"updated":"2018-06-05 13:30:51.000000000","message":"Yeah, this sounds like another reason to wait on the libvirt code. Have you a link to the WIP patches upstream?","commit_id":"7450d006ea00f2658647066f21e0fa1b9a6d3630"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"b4c3a52b0307e2604bd364bb2e5f638276f83454","unresolved":false,"context_lines":[{"line_number":64,"context_line":"* In order for this to be useful, some work outside of nova is required.  If"},{"line_number":65,"context_line":"  the vTPM is enabled for a guest, the \"swtpm\" binary must be started up prior"},{"line_number":66,"context_line":"  to starting the qemu process.  One possible implementation would be to use a"},{"line_number":67,"context_line":"  libvirt hook.  Once the libvirt code to support vTPM is merged this will be"},{"line_number":68,"context_line":"  handled by libvirt itself."},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"* Currently qemu does not support live migration of vTPM device state.  This"},{"line_number":71,"context_line":"  functionality is currently under review.  Until it merges we might want to"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_a73e0589","line":68,"range":{"start_line":67,"start_character":18,"end_line":68,"end_character":28},"in_reply_to":"5f7c97a3_02348ffa","updated":"2018-06-05 17:24:01.000000000","message":"I believe this is the most recent patch series for libvirt:  https://www.redhat.com/archives/libvir-list/2018-June/msg00247.html","commit_id":"7450d006ea00f2658647066f21e0fa1b9a6d3630"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"b4c3a52b0307e2604bd364bb2e5f638276f83454","unresolved":false,"context_lines":[{"line_number":67,"context_line":"  libvirt hook.  Once the libvirt code to support vTPM is merged this will be"},{"line_number":68,"context_line":"  handled by libvirt itself."},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"* Currently qemu does not support live migration of vTPM device state.  This"},{"line_number":71,"context_line":"  functionality is currently under review.  Until it merges we might want to"},{"line_number":72,"context_line":"  disallow live migration for instances that are using vTPM."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_c7430113","line":72,"range":{"start_line":70,"start_character":0,"end_line":72,"end_character":60},"updated":"2018-06-05 17:24:01.000000000","message":"I\u0027m happy to say this is no longer true, the qemu changes for live migration have been merged in upstream master, git commit b706ec24.","commit_id":"7450d006ea00f2658647066f21e0fa1b9a6d3630"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"00be7ba16a5fa7ee4cfc379a51980d5985fd16b9","unresolved":false,"context_lines":[{"line_number":41,"context_line":"extra-spec is True, then the nova virt driver will do the appropriate actions"},{"line_number":42,"context_line":"to cause the guest to have a suitable vTPM device."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"For the libvirt virt driver in particular, upstream qemu has support for vTPM"},{"line_number":45,"context_line":"but it is still in the process of being merged into libvirt itself and so the"},{"line_number":46,"context_line":"initial implementation will need to bypass libvirt and directly specify qemu"},{"line_number":47,"context_line":"commandline arguments via the libvirt XML.  The desired qemu arguments are"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_e3fffea8","line":44,"range":{"start_line":44,"start_character":0,"end_line":44,"end_character":41},"updated":"2018-06-19 12:01:06.000000000","message":"Would you have a new driver capability bit to indicate whether a given driver supports this or not? For the libvirt driver, this could be set dynamically based on factors such as qemu version. Or better, have support indicated by placement...","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"25eacc08313b3c65729a6698ac0c4f131eb91030","unresolved":false,"context_lines":[{"line_number":41,"context_line":"extra-spec is True, then the nova virt driver will do the appropriate actions"},{"line_number":42,"context_line":"to cause the guest to have a suitable vTPM device."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"For the libvirt virt driver in particular, upstream qemu has support for vTPM"},{"line_number":45,"context_line":"but it is still in the process of being merged into libvirt itself and so the"},{"line_number":46,"context_line":"initial implementation will need to bypass libvirt and directly specify qemu"},{"line_number":47,"context_line":"commandline arguments via the libvirt XML.  The desired qemu arguments are"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_b94cbcc8","line":44,"range":{"start_line":44,"start_character":0,"end_line":44,"end_character":41},"in_reply_to":"5f7c97a3_b437ebaf","updated":"2018-06-19 17:38:31.000000000","message":"Thanks Eric, I think the resource is probably the cleanest solution.","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7181be2fe0181ea0cf701fc55c14ee98e950bc5a","unresolved":false,"context_lines":[{"line_number":41,"context_line":"extra-spec is True, then the nova virt driver will do the appropriate actions"},{"line_number":42,"context_line":"to cause the guest to have a suitable vTPM device."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"For the libvirt virt driver in particular, upstream qemu has support for vTPM"},{"line_number":45,"context_line":"but it is still in the process of being merged into libvirt itself and so the"},{"line_number":46,"context_line":"initial implementation will need to bypass libvirt and directly specify qemu"},{"line_number":47,"context_line":"commandline arguments via the libvirt XML.  The desired qemu arguments are"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_b437ebaf","line":44,"range":{"start_line":44,"start_character":0,"end_line":44,"end_character":41},"in_reply_to":"5f7c97a3_e3fffea8","updated":"2018-06-19 13:00:54.000000000","message":"This.\n\nWe\u0027re working on mirroring compute capabilities as traits in placement [1], so assuming this gets to be a compute capability of that ilk, you\u0027ll ultimately get that part for free.\n\nAfter that, you could ensure you land on a capable host by putting the corresponding trait into your extra spec, e.g.\n\n trait:CUSTOM_COMPUTE_VTPM_CAPABLE\u003drequired\n\nNow, that by itself would be a roundabout way to tell libvirt that it actually needs to create and assign one of these thingies to the VM.  Better would be to make VTPM a resource class and actually inventory it on the compute host.  Then your flavor would simply request\n\n resources:VTPM\u003d1\n\n(At that point you wouldn\u0027t even need the capability trait, because only capable hosts would expose inventory of that resource class.)\n\nNow, following Stephen\u0027s question [2], what would you report as the inventory total, considering you\u0027re really only limited by the file system?  We don\u0027t have the concept of an \"unlimited\" resource.  But in this case, maxint would probably do just fine.\n\n[1] https://review.openstack.org/#/c/538498/\n[2] https://review.openstack.org/#/c/571111/2/specs/rocky/approved/add-emulated-virtual-tpm.rst@40","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"6d53f91973bb18f3fe25802384ff83121b3ccea7","unresolved":false,"context_lines":[{"line_number":45,"context_line":"but it is still in the process of being merged into libvirt itself and so the"},{"line_number":46,"context_line":"initial implementation will need to bypass libvirt and directly specify qemu"},{"line_number":47,"context_line":"commandline arguments via the libvirt XML.  The desired qemu arguments are"},{"line_number":48,"context_line":"something like this::"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    -bios bios-256k.bin"},{"line_number":51,"context_line":"    -chardev socket,id\u003dchrtpm,path\u003d${INSTANCES_PATH}/${UUID}/vtpm/swtpm-sock"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_f25d5c79","line":48,"updated":"2018-06-07 22:13:33.000000000","message":"I am pretty sure we normally wait for these kinds of things to land in libvirt first. too much for us to mess up here otherwise.","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"bf1d0a4ff440d11c58af14ace97221f649377d62","unresolved":false,"context_lines":[{"line_number":45,"context_line":"but it is still in the process of being merged into libvirt itself and so the"},{"line_number":46,"context_line":"initial implementation will need to bypass libvirt and directly specify qemu"},{"line_number":47,"context_line":"commandline arguments via the libvirt XML.  The desired qemu arguments are"},{"line_number":48,"context_line":"something like this::"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    -bios bios-256k.bin"},{"line_number":51,"context_line":"    -chardev socket,id\u003dchrtpm,path\u003d${INSTANCES_PATH}/${UUID}/vtpm/swtpm-sock"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_2b1a6dc5","line":48,"in_reply_to":"5f7c97a3_f25d5c79","updated":"2018-06-08 15:20:22.000000000","message":"It has now landed in libvirt, but I assume we need to wait for an actual release. :)","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"00be7ba16a5fa7ee4cfc379a51980d5985fd16b9","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    -tpmdev emulator,id\u003dtpm0,chardev\u003dchrtpm"},{"line_number":53,"context_line":"    -device tpm-tis,tpmdev\u003dtpm0"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"Support for emulated vTPM requires qemu 2.11 at a minimum, though qemu 2.12 is"},{"line_number":56,"context_line":"recommended by the author.  The virt driver code should add a suitable version"},{"line_number":57,"context_line":"check."},{"line_number":58,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_23d896ee","line":55,"updated":"2018-06-19 12:01:06.000000000","message":"what would be the expected behavior for a virt driver that does not support vTPM, or supports in general but not on this node (e.g. too old a version of qemu)? Are you going to update all virt drivers so that spawn/migrate fails if this is requested but not supported on the given destination? Or do that in the compute manager so that you only need driver changes when you want to support? Or avoid that issue by getting placement to indicate support so scheduling is only done to nodes that support?","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7181be2fe0181ea0cf701fc55c14ee98e950bc5a","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    -tpmdev emulator,id\u003dtpm0,chardev\u003dchrtpm"},{"line_number":53,"context_line":"    -device tpm-tis,tpmdev\u003dtpm0"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"Support for emulated vTPM requires qemu 2.11 at a minimum, though qemu 2.12 is"},{"line_number":56,"context_line":"recommended by the author.  The virt driver code should add a suitable version"},{"line_number":57,"context_line":"check."},{"line_number":58,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_545777cb","line":55,"in_reply_to":"5f7c97a3_23d896ee","updated":"2018-06-19 13:00:54.000000000","message":"\u003e Or avoid\n \u003e that issue by getting placement to indicate support so scheduling\n \u003e is only done to nodes that support?\n\nThis.  See above.","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"00be7ba16a5fa7ee4cfc379a51980d5985fd16b9","unresolved":false,"context_lines":[{"line_number":56,"context_line":"recommended by the author.  The virt driver code should add a suitable version"},{"line_number":57,"context_line":"check."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"There are a number of caveats that need to be considered:"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"* The nova cold migration code will need to copy over the directory containing"},{"line_number":62,"context_line":"  the vTPM files.  For libvirt this would mean copying"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_23cdf685","line":59,"updated":"2018-06-19 12:01:06.000000000","message":"do we need to talk about evacuate? I.e., if the compute node goes down and the VM has to be rebuilt elsewhere, you\u0027re going to lose any vTPM data... What are the implications for the OS/applications depending on that data?","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"25eacc08313b3c65729a6698ac0c4f131eb91030","unresolved":false,"context_lines":[{"line_number":56,"context_line":"recommended by the author.  The virt driver code should add a suitable version"},{"line_number":57,"context_line":"check."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"There are a number of caveats that need to be considered:"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"* The nova cold migration code will need to copy over the directory containing"},{"line_number":62,"context_line":"  the vTPM files.  For libvirt this would mean copying"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_430c97eb","line":59,"in_reply_to":"5f7c97a3_23cdf685","updated":"2018-06-19 17:38:31.000000000","message":"We should probably explicitly mention it...but with a remote-storage rootfs it would behave exactly the same as if you took the hard drive out of a physical machine and put it in another physical machine.","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"00be7ba16a5fa7ee4cfc379a51980d5985fd16b9","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"There are a number of caveats that need to be considered:"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"* The nova cold migration code will need to copy over the directory containing"},{"line_number":62,"context_line":"  the vTPM files.  For libvirt this would mean copying"},{"line_number":63,"context_line":"  ${INSTANCES_PATH}/${UUID}/vtpm within"},{"line_number":64,"context_line":"  LibvirtDriver.migrate_disk_and_power_off()."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_839f2a01","line":61,"updated":"2018-06-19 12:01:06.000000000","message":"assuming the destination supports vTPM...","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"25eacc08313b3c65729a6698ac0c4f131eb91030","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"There are a number of caveats that need to be considered:"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"* The nova cold migration code will need to copy over the directory containing"},{"line_number":62,"context_line":"  the vTPM files.  For libvirt this would mean copying"},{"line_number":63,"context_line":"  ${INSTANCES_PATH}/${UUID}/vtpm within"},{"line_number":64,"context_line":"  LibvirtDriver.migrate_disk_and_power_off()."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_e3e843e0","line":61,"in_reply_to":"5f7c97a3_839f2a01","updated":"2018-06-19 17:38:31.000000000","message":"If we track vTPM as a resource in placement, we shouldn\u0027t be able to land on a destination that doesn\u0027t support vTPM.  So it makes sense to unconditionally copy the vTPM files.","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e69316243859538204c8fe336611056fc1019f98","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"We could allow the image (as well as or even instead of the flavor) to specify"},{"line_number":81,"context_line":"that it wants an emulated vTPM device.  This might make scheduling trickier"},{"line_number":82,"context_line":"since ComputeCapabilitiesFilter only looks at extra-specs."},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_c037e1ae","line":82,"updated":"2018-07-30 23:02:25.000000000","message":"This isn\u0027t a problem if the compute capability is reported as a trait as Eric mentions above. Or if you use the AggregateImagePropertiesIsolation right?","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c2c69c6672a2425bd2ade594e77af2756c39a02f","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"We could allow the image (as well as or even instead of the flavor) to specify"},{"line_number":81,"context_line":"that it wants an emulated vTPM device.  This might make scheduling trickier"},{"line_number":82,"context_line":"since ComputeCapabilitiesFilter only looks at extra-specs."},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_c7d4ca4d","line":82,"in_reply_to":"5f7c97a3_c031210c","updated":"2018-07-31 13:18:51.000000000","message":"We\u0027re talking about [1]?\n\nEither would work; neither is going to be super clean. You\u0027re either using the presence of a required trait in the request spec to signal the virt driver to create and attach what is strictly speaking a resource; or you\u0027re using maxint to simulate an unlimited inventory.\n\nIf you need to be able to specify it via image props, then as you imply, you\u0027ll need to do it as a trait, because afaik we don\u0027t support resources there.\n\n[1] https://review.openstack.org/#/c/571111/3/specs/rocky/approved/add-emulated-virtual-tpm.rst@44","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"9b3b0a240bb28d6e718bfefec75631f5a8962e58","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"We could allow the image (as well as or even instead of the flavor) to specify"},{"line_number":81,"context_line":"that it wants an emulated vTPM device.  This might make scheduling trickier"},{"line_number":82,"context_line":"since ComputeCapabilitiesFilter only looks at extra-specs."},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_c031210c","line":82,"in_reply_to":"5f7c97a3_c037e1ae","updated":"2018-07-30 23:55:24.000000000","message":"I think Eric said it would be cleaner to represent it as a resource rather than a trait.  Can you specify resources in the image properties?\n\nAggregateImagePropertiesIsolation has the odd behaviour that a host not in any aggregate (or in an aggregate with no relevent metadata) can boot instances with any image.  It\u0027s intended for the \"in order to run on hosts in this aggregate you must have these image properties\" usecase.","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e69316243859538204c8fe336611056fc1019f98","unresolved":false,"context_lines":[{"line_number":90,"context_line":"REST API impact"},{"line_number":91,"context_line":"---------------"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"New extra spec, which has no validation currently."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"Security impact"},{"line_number":96,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_803d698e","line":93,"updated":"2018-07-30 23:02:25.000000000","message":"This should just be \"None\".","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"9b3b0a240bb28d6e718bfefec75631f5a8962e58","unresolved":false,"context_lines":[{"line_number":90,"context_line":"REST API impact"},{"line_number":91,"context_line":"---------------"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"New extra spec, which has no validation currently."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"Security impact"},{"line_number":96,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_60328d10","line":93,"in_reply_to":"5f7c97a3_803d698e","updated":"2018-07-30 23:55:24.000000000","message":"Can do.","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"00be7ba16a5fa7ee4cfc379a51980d5985fd16b9","unresolved":false,"context_lines":[{"line_number":95,"context_line":"Security impact"},{"line_number":96,"context_line":"---------------"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"None. (The guest still needs to trust the host.)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"Notifications impact"},{"line_number":101,"context_line":"--------------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_c38a0219","line":98,"updated":"2018-06-19 12:01:06.000000000","message":"you probably want to brag about this being a security benefit to the VM workloads...","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"00be7ba16a5fa7ee4cfc379a51980d5985fd16b9","unresolved":false,"context_lines":[{"line_number":115,"context_line":"Other deployer impact"},{"line_number":116,"context_line":"---------------------"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"Initially deployers would be responsible for putting compute nodes with support"},{"line_number":119,"context_line":"for vTPM into host aggregates with suitable metadata, and creating flavors with"},{"line_number":120,"context_line":"suitable extra-specs to select those host aggregates."},{"line_number":121,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_a3b586d2","line":118,"updated":"2018-06-19 12:01:06.000000000","message":"That would be the old way of doing things. Talk to the placement guys (efried, jaypipes, cdent, edleafe).","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"25eacc08313b3c65729a6698ac0c4f131eb91030","unresolved":false,"context_lines":[{"line_number":115,"context_line":"Other deployer impact"},{"line_number":116,"context_line":"---------------------"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"Initially deployers would be responsible for putting compute nodes with support"},{"line_number":119,"context_line":"for vTPM into host aggregates with suitable metadata, and creating flavors with"},{"line_number":120,"context_line":"suitable extra-specs to select those host aggregates."},{"line_number":121,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_83870f13","line":118,"in_reply_to":"5f7c97a3_a3b586d2","updated":"2018-06-19 17:38:31.000000000","message":"The original spec was written before support was available in libvirt.  Once we have a libvirt release that supports it then we can do it in an automated way.","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e7c68684617127729de9e486f7f4890d1de9ce0c","unresolved":false,"context_lines":[{"line_number":147,"context_line":"Other contributors:"},{"line_number":148,"context_line":"  None"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"Work Items"},{"line_number":151,"context_line":"----------"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"* Implement support for new flavor extra-spec"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_001079f3","line":150,"updated":"2018-07-30 23:04:44.000000000","message":"Would there be any need for re-introducing the TrustedFilter or something like it (which we\u0027ve since removed since no one said they used it)?\n\nhttps://github.com/openstack/nova/blob/stable/ocata/nova/scheduler/filters/trusted_filter.py","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"9b3b0a240bb28d6e718bfefec75631f5a8962e58","unresolved":false,"context_lines":[{"line_number":147,"context_line":"Other contributors:"},{"line_number":148,"context_line":"  None"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"Work Items"},{"line_number":151,"context_line":"----------"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"* Implement support for new flavor extra-spec"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_63005700","line":150,"in_reply_to":"5f7c97a3_001079f3","updated":"2018-07-30 23:55:24.000000000","message":"I could maybe see future interest for something like this, but this feature doesn\u0027t require it.  The assumption here is that the guest trusts the host.","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e69316243859538204c8fe336611056fc1019f98","unresolved":false,"context_lines":[{"line_number":175,"context_line":"Documentation Impact"},{"line_number":176,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"Operations Guide and End User Guide will be updated appropriately."},{"line_number":179,"context_line":""},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"References"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_206fb593","line":178,"updated":"2018-07-30 23:02:25.000000000","message":"I don\u0027t think these actually exist anymore...would be in-tree admin and user docs.","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"9b3b0a240bb28d6e718bfefec75631f5a8962e58","unresolved":false,"context_lines":[{"line_number":175,"context_line":"Documentation Impact"},{"line_number":176,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"Operations Guide and End User Guide will be updated appropriately."},{"line_number":179,"context_line":""},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"References"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_83057311","line":178,"in_reply_to":"5f7c97a3_206fb593","updated":"2018-07-30 23:55:24.000000000","message":"Okay, will include in next revision.","commit_id":"c0833118e1c0b985b35c8204440638d954943e55"}],"specs/stein/approved/add-emulated-virtual-tpm.rst":[{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"92bf034c9e3bfdb787eb5770817af8467daf08ae","unresolved":false,"context_lines":[{"line_number":66,"context_line":"default to `false` for minimal surprise on upgrades."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"In order to request this functionality (and to allow scheduling to nodes that"},{"line_number":69,"context_line":"provide this functionality) we propose to add a new `VTPM` resource.  The"},{"line_number":70,"context_line":"flavor could then specify something like `resources:VTPM\u003d1`.  The virt driver"},{"line_number":71,"context_line":"would be responsible for providing an inventory of `VTPM` on compute nodes that"},{"line_number":72,"context_line":"could support it.  Since the emulated TPM is just a process running on the host"},{"line_number":73,"context_line":"the inventory is potentially unbounded, so for simplicity we suggest setting"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3f79a3b5_f835def6","line":70,"range":{"start_line":69,"start_character":70,"end_line":70,"end_character":60},"updated":"2018-10-02 20:57:17.000000000","message":"Sean K Mooney suggested on IRC that the image could instead specify something like \"HW_VTPM_TYPE\u003demulated\" with an optional version argument like \"HW_VTPM_VERSION\u003d2.0\" which would default to 2.0 if not specified.\n\nNova would then map this to a placement resource/trait request.\n\nOne possible reason we might want to go this route is if we ever wanted to support a passthrough TPM device as well as emulated, in which case we\u0027d probably want to use the placement resource to provide a proper inventory.","commit_id":"4cc431f1814a250a482afa8e60f17b0de7e272c1"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2e85de8052964bc391b5cd0c04e399770fc6261d","unresolved":false,"context_lines":[{"line_number":66,"context_line":"default to `false` for minimal surprise on upgrades."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"In order to request this functionality (and to allow scheduling to nodes that"},{"line_number":69,"context_line":"provide this functionality) we propose to add a new `VTPM` resource.  The"},{"line_number":70,"context_line":"flavor could then specify something like `resources:VTPM\u003d1`.  The virt driver"},{"line_number":71,"context_line":"would be responsible for providing an inventory of `VTPM` on compute nodes that"},{"line_number":72,"context_line":"could support it.  Since the emulated TPM is just a process running on the host"},{"line_number":73,"context_line":"the inventory is potentially unbounded, so for simplicity we suggest setting"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3f79a3b5_d41bdc1a","line":70,"range":{"start_line":69,"start_character":70,"end_line":70,"end_character":60},"in_reply_to":"3f79a3b5_f835def6","updated":"2018-10-04 15:03:40.000000000","message":"i would prefer to use this patteren but im not sure we should be using resouce clases for VTPM. is there a finight inventory of them that can be consumed if not then it should not be a resouce class/inveotry.","commit_id":"4cc431f1814a250a482afa8e60f17b0de7e272c1"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"e6b9a503020c85c58618fa3a11b66a456bb46bce","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    ..."},{"line_number":49,"context_line":"    \u003cdevices\u003e"},{"line_number":50,"context_line":"      \u003ctpm model\u003d\u0027tpm-tis\u0027\u003e"},{"line_number":51,"context_line":"        \u003cbackend type\u003d\u0027emulator\u0027 version\u003d\u00272.0\u0027\u003e"},{"line_number":52,"context_line":"        \u003c/backend\u003e"},{"line_number":53,"context_line":"      \u003c/tpm\u003e"},{"line_number":54,"context_line":"    \u003c/devices\u003e"}],"source_content_type":"text/x-rst","patch_set":6,"id":"3f79a3b5_34a42c07","line":51,"range":{"start_line":51,"start_character":7,"end_line":51,"end_character":47},"updated":"2018-10-10 00:05:55.000000000","message":"given that libvirt supports specifying a version, do we need to add that version as part of the trait to indicate which versions are supported by the compute node and which version is desired by the flavor/image?","commit_id":"8b41d4c42f962492dd7a26ed1b98af1e4af66554"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"e6b9a503020c85c58618fa3a11b66a456bb46bce","unresolved":false,"context_lines":[{"line_number":66,"context_line":"default to `false` for minimal surprise on upgrades."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"In order to request this functionality (and to allow scheduling to nodes that"},{"line_number":69,"context_line":"provide this functionality) we propose to define a new `HW_SYSTEM_TPM` trait."},{"line_number":70,"context_line":"(The emulated TPM is just a process running on the host, so the concept of"},{"line_number":71,"context_line":"inventory doesn\u0027t apply.) The flavor extra-specs or image properties could then"},{"line_number":72,"context_line":"specify something like `trait:HW_SYSTEM_TPM\u003drequired` to indicate that they"}],"source_content_type":"text/x-rst","patch_set":6,"id":"3f79a3b5_f48eb478","line":69,"range":{"start_line":69,"start_character":56,"end_line":69,"end_character":69},"updated":"2018-10-10 00:05:55.000000000","message":"should this be something like \u0027COMPUTE_SYSTEM_TPM\u0027 instead?","commit_id":"8b41d4c42f962492dd7a26ed1b98af1e4af66554"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7819d3773bacb45efd1106c9c0973894c4cdc7e8","unresolved":false,"context_lines":[{"line_number":15,"context_line":"There are a class of applications which expect to use a TPM device to store"},{"line_number":16,"context_line":"secrets.  In order to run these applications in a virtual machine, it would be"},{"line_number":17,"context_line":"useful to expose a virtual TPM device within the guest.  Accordingly, the"},{"line_number":18,"context_line":"suggestion is to add a placement resource which could be requested in the"},{"line_number":19,"context_line":"flavor which would cause such a device to be added to the VM by the relevent"},{"line_number":20,"context_line":"virt driver."},{"line_number":21,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_2761a039","line":18,"range":{"start_line":18,"start_character":33,"end_line":18,"end_character":41},"updated":"2018-10-18 13:22:09.000000000","message":"resource as in resource class / inventory? Or trait? I think it\u0027s a trait, but resource here sounds like inventory.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"22ba61e29ad4f82999b783a0978ca514ae4a6cfa","unresolved":false,"context_lines":[{"line_number":15,"context_line":"There are a class of applications which expect to use a TPM device to store"},{"line_number":16,"context_line":"secrets.  In order to run these applications in a virtual machine, it would be"},{"line_number":17,"context_line":"useful to expose a virtual TPM device within the guest.  Accordingly, the"},{"line_number":18,"context_line":"suggestion is to add a placement resource which could be requested in the"},{"line_number":19,"context_line":"flavor which would cause such a device to be added to the VM by the relevent"},{"line_number":20,"context_line":"virt driver."},{"line_number":21,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_028ecf25","line":18,"range":{"start_line":18,"start_character":33,"end_line":18,"end_character":41},"in_reply_to":"3f79a3b5_2761a039","updated":"2018-10-18 18:00:22.000000000","message":"initially it was going to be a resource, this should have been changed but was missed.  Same further down.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7819d3773bacb45efd1106c9c0973894c4cdc7e8","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    \u003c/devices\u003e"},{"line_number":55,"context_line":"    ..."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"Support for emulated TPM requires qemu 2.11 at a minimum, though qemu 2.12 is"},{"line_number":58,"context_line":"recommended by the author.  The virt driver code should add suitable version"},{"line_number":59,"context_line":"checks (in the case of LibvirtDriver, this would include checks for both"},{"line_number":60,"context_line":"libvirt and qemu)."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"Support for emulated TPM also requires the \"swtpm\" binary and libraries to be"},{"line_number":63,"context_line":"available on the host.  If there is no way to check whether this is available"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_676d582e","line":60,"range":{"start_line":57,"start_character":0,"end_line":60,"end_character":18},"updated":"2018-10-18 13:22:09.000000000","message":"Is vtpm support exposed in the libvirt host feature capabilities at all? Then we wouldn\u0027t need version checks. Also, does this work on all architectures for libvirt/qemu/kvm or just x86_64?","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"22ba61e29ad4f82999b783a0978ca514ae4a6cfa","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    \u003c/devices\u003e"},{"line_number":55,"context_line":"    ..."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"Support for emulated TPM requires qemu 2.11 at a minimum, though qemu 2.12 is"},{"line_number":58,"context_line":"recommended by the author.  The virt driver code should add suitable version"},{"line_number":59,"context_line":"checks (in the case of LibvirtDriver, this would include checks for both"},{"line_number":60,"context_line":"libvirt and qemu)."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"Support for emulated TPM also requires the \"swtpm\" binary and libraries to be"},{"line_number":63,"context_line":"available on the host.  If there is no way to check whether this is available"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_7377533e","line":60,"range":{"start_line":57,"start_character":0,"end_line":60,"end_character":18},"in_reply_to":"3f79a3b5_676d582e","updated":"2018-10-18 18:00:22.000000000","message":"Looking into this.  I don\u0027t think the TPM code itself cares about the arch, but it might be dependent on some setup code the virtual BIOS for example.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"0ca1de92a9888ab7892a02100c72a22c4cdb4397","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    \u003c/devices\u003e"},{"line_number":55,"context_line":"    ..."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"Support for emulated TPM requires qemu 2.11 at a minimum, though qemu 2.12 is"},{"line_number":58,"context_line":"recommended by the author.  The virt driver code should add suitable version"},{"line_number":59,"context_line":"checks (in the case of LibvirtDriver, this would include checks for both"},{"line_number":60,"context_line":"libvirt and qemu)."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"Support for emulated TPM also requires the \"swtpm\" binary and libraries to be"},{"line_number":63,"context_line":"available on the host.  If there is no way to check whether this is available"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_f04900b8","line":60,"range":{"start_line":57,"start_character":0,"end_line":60,"end_character":18},"in_reply_to":"3f79a3b5_7377533e","updated":"2018-10-19 16:40:34.000000000","message":"Talking with the author of the qemu/libvirt support, ppc64 is not supported since it needs another specific driver on the QEMU level and specific support in libvirt.  He wasn\u0027t sure about other architectures like ARM.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"2e67df29894ffc7cb4a9538b288589c3e5e0305a","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"In order to request this functionality (and to allow scheduling to nodes that"},{"line_number":69,"context_line":"provide this functionality) we propose to define two new traits,"},{"line_number":70,"context_line":"`COMPUTE_SECURITY_TPM_1_2` and `COMPUTE_SECURITY_TPM_2_0`."},{"line_number":71,"context_line":"(The emulated TPM is just a process running on the host, so the concept of"},{"line_number":72,"context_line":"inventory doesn\u0027t apply.) The two traits represent the two different versions"},{"line_number":73,"context_line":"of the TPM spec that are currently supported.  The flavor extra-specs or image"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_b959f38d","line":70,"range":{"start_line":70,"start_character":0,"end_line":70,"end_character":58},"updated":"2018-10-11 06:51:06.000000000","message":"so Nova is responsible for reporting this two traits. And when the nova.conf say disable TPM, then nova won\u0027t report those two traits. The spec didn\u0027t say that, but I guess people think same thing..","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"fdd3d030938416c7ff06b5f4f74239258adff9d9","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"In order to request this functionality (and to allow scheduling to nodes that"},{"line_number":69,"context_line":"provide this functionality) we propose to define two new traits,"},{"line_number":70,"context_line":"`COMPUTE_SECURITY_TPM_1_2` and `COMPUTE_SECURITY_TPM_2_0`."},{"line_number":71,"context_line":"(The emulated TPM is just a process running on the host, so the concept of"},{"line_number":72,"context_line":"inventory doesn\u0027t apply.) The two traits represent the two different versions"},{"line_number":73,"context_line":"of the TPM spec that are currently supported.  The flavor extra-specs or image"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_ea96a13d","line":70,"range":{"start_line":70,"start_character":0,"end_line":70,"end_character":58},"in_reply_to":"3f79a3b5_b959f38d","updated":"2018-10-11 15:48:02.000000000","message":"That\u0027s my plan for libvirt, but any config option to stop reporting the traits would be hypervisor-specific and I didn\u0027t want to force any decisions on the hypervisor driver primes.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"e1bb73b33d48df8a0fc05c30e94d30a8eaec6df7","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"In order to request this functionality (and to allow scheduling to nodes that"},{"line_number":69,"context_line":"provide this functionality) we propose to define two new traits,"},{"line_number":70,"context_line":"`COMPUTE_SECURITY_TPM_1_2` and `COMPUTE_SECURITY_TPM_2_0`."},{"line_number":71,"context_line":"(The emulated TPM is just a process running on the host, so the concept of"},{"line_number":72,"context_line":"inventory doesn\u0027t apply.) The two traits represent the two different versions"},{"line_number":73,"context_line":"of the TPM spec that are currently supported.  The flavor extra-specs or image"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_48b3130a","line":70,"range":{"start_line":70,"start_character":0,"end_line":70,"end_character":58},"in_reply_to":"3f79a3b5_ea96a13d","updated":"2018-10-12 01:39:26.000000000","message":"yea, make sense also.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7819d3773bacb45efd1106c9c0973894c4cdc7e8","unresolved":false,"context_lines":[{"line_number":69,"context_line":"provide this functionality) we propose to define two new traits,"},{"line_number":70,"context_line":"`COMPUTE_SECURITY_TPM_1_2` and `COMPUTE_SECURITY_TPM_2_0`."},{"line_number":71,"context_line":"(The emulated TPM is just a process running on the host, so the concept of"},{"line_number":72,"context_line":"inventory doesn\u0027t apply.) The two traits represent the two different versions"},{"line_number":73,"context_line":"of the TPM spec that are currently supported.  The flavor extra-specs or image"},{"line_number":74,"context_line":"properties could then specify something like"},{"line_number":75,"context_line":"`trait:COMPUTE_SECURITY_TPM_1_2\u003drequired` to indicate that they wish to have"},{"line_number":76,"context_line":"access to a TPM.  Virt drivers which could provide a TPM to their instances"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_47f7fc5b","line":73,"range":{"start_line":72,"start_character":25,"end_line":73,"end_character":45},"updated":"2018-10-18 13:22:09.000000000","message":"How is the virt driver going to be able to distinguish this? In reading https://libvirt.org/formatdomain.html#elementsTpm, the default is 1.2 if no version is specified. Are we just going to advertise both versions as traits and then use the trait to determine which version to use (2.0 if that trait is on the flavor/image, else 1.2)? Do we care about the tpm-crb model at all? The only reason I ask is the docs say that\u0027s only available for 2.0.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"22ba61e29ad4f82999b783a0978ca514ae4a6cfa","unresolved":false,"context_lines":[{"line_number":69,"context_line":"provide this functionality) we propose to define two new traits,"},{"line_number":70,"context_line":"`COMPUTE_SECURITY_TPM_1_2` and `COMPUTE_SECURITY_TPM_2_0`."},{"line_number":71,"context_line":"(The emulated TPM is just a process running on the host, so the concept of"},{"line_number":72,"context_line":"inventory doesn\u0027t apply.) The two traits represent the two different versions"},{"line_number":73,"context_line":"of the TPM spec that are currently supported.  The flavor extra-specs or image"},{"line_number":74,"context_line":"properties could then specify something like"},{"line_number":75,"context_line":"`trait:COMPUTE_SECURITY_TPM_1_2\u003drequired` to indicate that they wish to have"},{"line_number":76,"context_line":"access to a TPM.  Virt drivers which could provide a TPM to their instances"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_934c6fca","line":73,"range":{"start_line":72,"start_character":25,"end_line":73,"end_character":45},"in_reply_to":"3f79a3b5_47f7fc5b","updated":"2018-10-18 18:00:22.000000000","message":"My plan for libvirt/qemu was to advertise both traits and use the requested trait to determine which version to put in the XML.\n\nIt might be nice to support both TIS and CRB.  Since CRB is only available for TPM 2.0, would we create two traits COMPUTE_SECURITY_TPM_2_0_TIS and COMPUTE_SECURITY_TPM_2_0_CRB?  Or would we add something like \"hw:tpm_model\u003dcrb\" or \"hw:tpm_model\u003dtis\" and ensure that \"crb\" is only specified with COMPUTE_SECURITY_TPM_2_0?","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0b2c0de82c0581008917b817c20a1b057c9bc24e","unresolved":false,"context_lines":[{"line_number":69,"context_line":"provide this functionality) we propose to define two new traits,"},{"line_number":70,"context_line":"`COMPUTE_SECURITY_TPM_1_2` and `COMPUTE_SECURITY_TPM_2_0`."},{"line_number":71,"context_line":"(The emulated TPM is just a process running on the host, so the concept of"},{"line_number":72,"context_line":"inventory doesn\u0027t apply.) The two traits represent the two different versions"},{"line_number":73,"context_line":"of the TPM spec that are currently supported.  The flavor extra-specs or image"},{"line_number":74,"context_line":"properties could then specify something like"},{"line_number":75,"context_line":"`trait:COMPUTE_SECURITY_TPM_1_2\u003drequired` to indicate that they wish to have"},{"line_number":76,"context_line":"access to a TPM.  Virt drivers which could provide a TPM to their instances"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_a00b4121","line":73,"range":{"start_line":72,"start_character":25,"end_line":73,"end_character":45},"in_reply_to":"3f79a3b5_934c6fca","updated":"2018-11-01 21:10:13.000000000","message":"\u003e Or would we add something like \"hw:tpm_model\u003dcrb\" or \"hw:tpm_model\u003dtis\" and ensure that \"crb\" is only specified with COMPUTE_SECURITY_TPM_2_0?\n\nMy inclination is that option if it\u0027s ever added. Encoding the model into the trait grosses me out (I just don\u0027t want to go down the road where everything is encoded in traits). I think TPM + version is a suitable capability (trait) and configuration within that capability per guest is suitable per flavor/image (which can also have the required trait, e.g. my flavor could have hw:tpm_model\u003dcrb and trait:COMPUTE_SECURITY_TPM_2_0\u003drequired).","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"436a75c1953fd2eba8c22994d6b85cbb5b4d7e66","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"As a future enhancement beyond the scope of the immediate work, it would be"},{"line_number":84,"context_line":"possible to extend this to support physical TPM passthrough.  In this case the"},{"line_number":85,"context_line":"virt driver would also advertise a resource of `PTPM` with a suitable inventory"},{"line_number":86,"context_line":"(likely just one), and the image or flavor could request it by specifying"},{"line_number":87,"context_line":"`resources:PTPM\u003d1`.  The trait would not be necessary in this case, as the"},{"line_number":88,"context_line":"desire for a TPM in the instance is implied by the resource request."}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_e05c001c","line":85,"range":{"start_line":85,"start_character":33,"end_line":85,"end_character":79},"updated":"2018-10-17 21:04:35.000000000","message":"If you want to be super pedantic here you might want to state this a bit differently:\n\n* inventory with a resource class of ``PTPM``\n\nSo as to avoid confusion about resources, resource providers, resource classes, etc.\n\nAlso, would this physical TPM also be \"just one on a host\" or at least \"if more than one, not selectable in any special way\" or is there a chance that a TPM is nested somehow?\n\nI realize this is probably not relevant for \"future enhancement\" so mostly I\u0027m just curious.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7819d3773bacb45efd1106c9c0973894c4cdc7e8","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"As a future enhancement beyond the scope of the immediate work, it would be"},{"line_number":84,"context_line":"possible to extend this to support physical TPM passthrough.  In this case the"},{"line_number":85,"context_line":"virt driver would also advertise a resource of `PTPM` with a suitable inventory"},{"line_number":86,"context_line":"(likely just one), and the image or flavor could request it by specifying"},{"line_number":87,"context_line":"`resources:PTPM\u003d1`.  The trait would not be necessary in this case, as the"},{"line_number":88,"context_line":"desire for a TPM in the instance is implied by the resource request."}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_27bd2067","line":85,"range":{"start_line":85,"start_character":33,"end_line":85,"end_character":79},"in_reply_to":"3f79a3b5_e05c001c","updated":"2018-10-18 13:22:09.000000000","message":"https://libvirt.org/formatdomain.html#elementsTpm says it\u0027s just one guest at a time, so it\u0027d be PTPM inventory with total\u003d1.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"2e67df29894ffc7cb4a9538b288589c3e5e0305a","unresolved":false,"context_lines":[{"line_number":87,"context_line":"`resources:PTPM\u003d1`.  The trait would not be necessary in this case, as the"},{"line_number":88,"context_line":"desire for a TPM in the instance is implied by the resource request."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"As part of implementing the this feature, the nova cold migration code will"},{"line_number":91,"context_line":"need to copy over the directory containing the emulated TPM files.  For"},{"line_number":92,"context_line":"libvirt this would mean copying the file under"},{"line_number":93,"context_line":"/var/lib/libvirt/swtpm/\u003cinstance\u003e from within"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_19526737","line":90,"range":{"start_line":90,"start_character":51,"end_line":90,"end_character":65},"updated":"2018-10-11 06:51:06.000000000","message":"so resize shared the same code, so that means we want to copy those file for the resize also. Can I ask why we need copy those files. If resize need to copy those file, what about rebuild, evacuate?","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"5fdca1896d38d0e2955528bb326bd64595653312","unresolved":false,"context_lines":[{"line_number":87,"context_line":"`resources:PTPM\u003d1`.  The trait would not be necessary in this case, as the"},{"line_number":88,"context_line":"desire for a TPM in the instance is implied by the resource request."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"As part of implementing the this feature, the nova cold migration code will"},{"line_number":91,"context_line":"need to copy over the directory containing the emulated TPM files.  For"},{"line_number":92,"context_line":"libvirt this would mean copying the file under"},{"line_number":93,"context_line":"/var/lib/libvirt/swtpm/\u003cinstance\u003e from within"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_dd64b123","line":90,"range":{"start_line":90,"start_character":51,"end_line":90,"end_character":65},"in_reply_to":"3f79a3b5_02a9798d","updated":"2018-10-12 16:58:03.000000000","message":"You\u0027re thinking maybe grab a copy of the persistent TPM storage and store it as a glance image, then restore it on unshelve?  Yeah, I guess you could do something like that.  The same thing would apply to UEFI NVRAM storage.  This would be hypervisor-specific though, I think.\n\nFor live migration, the file copy is handled by the hypervisor (at least for libvirt/qemu).","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"5fdca1896d38d0e2955528bb326bd64595653312","unresolved":false,"context_lines":[{"line_number":87,"context_line":"`resources:PTPM\u003d1`.  The trait would not be necessary in this case, as the"},{"line_number":88,"context_line":"desire for a TPM in the instance is implied by the resource request."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"As part of implementing the this feature, the nova cold migration code will"},{"line_number":91,"context_line":"need to copy over the directory containing the emulated TPM files.  For"},{"line_number":92,"context_line":"libvirt this would mean copying the file under"},{"line_number":93,"context_line":"/var/lib/libvirt/swtpm/\u003cinstance\u003e from within"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_fd8acdba","line":90,"range":{"start_line":90,"start_character":51,"end_line":90,"end_character":65},"in_reply_to":"3f79a3b5_0cb6928a","updated":"2018-10-12 16:58:03.000000000","message":"\u003e for evacuate we cant assume its not available as the operator could have simply marked the host down.\n\nActually, we can.  The operator must only mark the host down once it is actually dead/fenced.  Anything else will violate assumptions and possibly lead to corruption.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"fdd3d030938416c7ff06b5f4f74239258adff9d9","unresolved":false,"context_lines":[{"line_number":87,"context_line":"`resources:PTPM\u003d1`.  The trait would not be necessary in this case, as the"},{"line_number":88,"context_line":"desire for a TPM in the instance is implied by the resource request."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"As part of implementing the this feature, the nova cold migration code will"},{"line_number":91,"context_line":"need to copy over the directory containing the emulated TPM files.  For"},{"line_number":92,"context_line":"libvirt this would mean copying the file under"},{"line_number":93,"context_line":"/var/lib/libvirt/swtpm/\u003cinstance\u003e from within"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_8a212db8","line":90,"range":{"start_line":90,"start_character":51,"end_line":90,"end_character":65},"in_reply_to":"3f79a3b5_19526737","updated":"2018-10-11 15:48:02.000000000","message":"For an emulated TPM the persistent information (keys, certificates, etc.) is stored in a file on-disk where with a real TPM the information would be stored in hardware.  When we migrate/resize an instance we want to copy the persistent information over to the destination so it\u0027s available when the instance boots up.\n\nFor rebuild we don\u0027t change hosts so we just need to make sure the file is not deleted by the rebuild process.\n\nFor evacuate the old compute node is by definition not available, so there\u0027s no way to preserve the persistent information.  The guest will need to handle this case.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"f9be789546b54e83cf8b7a748ee203002aa91a45","unresolved":false,"context_lines":[{"line_number":87,"context_line":"`resources:PTPM\u003d1`.  The trait would not be necessary in this case, as the"},{"line_number":88,"context_line":"desire for a TPM in the instance is implied by the resource request."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"As part of implementing the this feature, the nova cold migration code will"},{"line_number":91,"context_line":"need to copy over the directory containing the emulated TPM files.  For"},{"line_number":92,"context_line":"libvirt this would mean copying the file under"},{"line_number":93,"context_line":"/var/lib/libvirt/swtpm/\u003cinstance\u003e from within"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_02a9798d","line":90,"range":{"start_line":90,"start_character":51,"end_line":90,"end_character":65},"in_reply_to":"3f79a3b5_8a212db8","updated":"2018-10-12 01:38:45.000000000","message":"thanks. totally make sense.\n\nFor shelve_offload, I guess we don\u0027t want to upload private keys to glance?\n\nFor live migration, I don\u0027t know, do we need to copy those file first?","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dc95f8619d7c98415aadfd37f536ffce2cff3fe1","unresolved":false,"context_lines":[{"line_number":87,"context_line":"`resources:PTPM\u003d1`.  The trait would not be necessary in this case, as the"},{"line_number":88,"context_line":"desire for a TPM in the instance is implied by the resource request."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"As part of implementing the this feature, the nova cold migration code will"},{"line_number":91,"context_line":"need to copy over the directory containing the emulated TPM files.  For"},{"line_number":92,"context_line":"libvirt this would mean copying the file under"},{"line_number":93,"context_line":"/var/lib/libvirt/swtpm/\u003cinstance\u003e from within"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_0cb6928a","line":90,"range":{"start_line":90,"start_character":51,"end_line":90,"end_character":65},"in_reply_to":"3f79a3b5_8a212db8","updated":"2018-10-11 22:36:45.000000000","message":"well for evacuate we cant assume its not available as the operator could have simply marked the host down. but i think it would be resoably to assume the data may be irritivable so in general in the evacuate case.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0b2c0de82c0581008917b817c20a1b057c9bc24e","unresolved":false,"context_lines":[{"line_number":87,"context_line":"`resources:PTPM\u003d1`.  The trait would not be necessary in this case, as the"},{"line_number":88,"context_line":"desire for a TPM in the instance is implied by the resource request."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"As part of implementing the this feature, the nova cold migration code will"},{"line_number":91,"context_line":"need to copy over the directory containing the emulated TPM files.  For"},{"line_number":92,"context_line":"libvirt this would mean copying the file under"},{"line_number":93,"context_line":"/var/lib/libvirt/swtpm/\u003cinstance\u003e from within"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_40990dcd","line":90,"range":{"start_line":90,"start_character":51,"end_line":90,"end_character":65},"in_reply_to":"3f79a3b5_ae1b446d","updated":"2018-11-01 21:10:13.000000000","message":"\u003e 5. The problematic scenario is if we try to rebuild to an image that specifies TPM on a compute node that can\u0027t provide it. In that case the rebuild would need to fail.\n\nI\u0027m fine with it failing in the compute on rebuild. The instance goes to ERROR state and a fault is recorded. The user just needs to rebuild with a different image in that case.\n\n\u003e 6. keep it simple and fail on mismatch if they both specify it?\n\nSure.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"22ba61e29ad4f82999b783a0978ca514ae4a6cfa","unresolved":false,"context_lines":[{"line_number":87,"context_line":"`resources:PTPM\u003d1`.  The trait would not be necessary in this case, as the"},{"line_number":88,"context_line":"desire for a TPM in the instance is implied by the resource request."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"As part of implementing the this feature, the nova cold migration code will"},{"line_number":91,"context_line":"need to copy over the directory containing the emulated TPM files.  For"},{"line_number":92,"context_line":"libvirt this would mean copying the file under"},{"line_number":93,"context_line":"/var/lib/libvirt/swtpm/\u003cinstance\u003e from within"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_ae1b446d","line":90,"range":{"start_line":90,"start_character":51,"end_line":90,"end_character":65},"in_reply_to":"3f79a3b5_e712c861","updated":"2018-10-18 18:00:22.000000000","message":"1. this is covered down at line 96\n\n2. we could implement it for shelve/unshelve by copying the persistent TPM storage and saving it as a glance image.  that\u0027s not in our current implementation.  NOTE: I\u0027m pretty sure that UEFI NVRAM storage will be lost over shelve/unshelve currently.\n\n4. Resize will result in a reschedule, so resizing to a flavor with a TPM should work.  If they resize to a flavor without a TPM (and were actually using the TPM) then I think nova will be fine--it\u0027s up to the guest to handle it properly if they shoot themselves in the foot.\n\n5. The problematic scenario is if we try to rebuild to an image that specifies TPM on a compute node that can\u0027t provide it.  In that case the rebuild would need to fail.  Would we want to prevent going from no-TPM to TPM even if it might work, or fail late on the compute node with no ability to return a nice error message to the user?\n\n6. keep it simple and fail on mismatch if they both specify it?","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d1d184fc3b30a6d79201c3dfda64faec3ed1414","unresolved":false,"context_lines":[{"line_number":87,"context_line":"`resources:PTPM\u003d1`.  The trait would not be necessary in this case, as the"},{"line_number":88,"context_line":"desire for a TPM in the instance is implied by the resource request."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"As part of implementing the this feature, the nova cold migration code will"},{"line_number":91,"context_line":"need to copy over the directory containing the emulated TPM files.  For"},{"line_number":92,"context_line":"libvirt this would mean copying the file under"},{"line_number":93,"context_line":"/var/lib/libvirt/swtpm/\u003cinstance\u003e from within"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_32e8fc13","line":90,"range":{"start_line":90,"start_character":51,"end_line":90,"end_character":65},"in_reply_to":"3f79a3b5_e712c861","updated":"2018-10-18 13:28:03.000000000","message":"\u003e 3. is live migration supported? what about across mixed versions of computes? it seems we\u0027d need some code like was added for the file-backed memory live migration stuff where the dest and source communicate with the migrate_data object whether or not they are using this new thing and if they aren\u0027t compatible the live migration can\u0027t use those hosts\n\nI think this is mostly a non-issue. The file-backed memory thing wasn\u0027t done with traits, it was done with config options. If the image/flavor has a required trait on it, then during live migration the scheduler should only pick a destination host that supports that trait. That wasn\u0027t the case for file-backed memory...not sure why we didn\u0027t use traits for that.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7819d3773bacb45efd1106c9c0973894c4cdc7e8","unresolved":false,"context_lines":[{"line_number":87,"context_line":"`resources:PTPM\u003d1`.  The trait would not be necessary in this case, as the"},{"line_number":88,"context_line":"desire for a TPM in the instance is implied by the resource request."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"As part of implementing the this feature, the nova cold migration code will"},{"line_number":91,"context_line":"need to copy over the directory containing the emulated TPM files.  For"},{"line_number":92,"context_line":"libvirt this would mean copying the file under"},{"line_number":93,"context_line":"/var/lib/libvirt/swtpm/\u003cinstance\u003e from within"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_e712c861","line":90,"range":{"start_line":90,"start_character":51,"end_line":90,"end_character":65},"in_reply_to":"3f79a3b5_fd8acdba","updated":"2018-10-18 13:22:09.000000000","message":"So it\u0027s not clear to me what our limitations are here - that should be enumerated in the spec. It sounds like we have possible issues with:\n\n1. evacuate of tpm-enabled guests\n2. shelve/unshelve - will that work for these things? because that\u0027s what we plan on leveraging for cross-cell resize\n3. is live migration supported? what about across mixed versions of computes? it seems we\u0027d need some code like was added for the file-backed memory live migration stuff where the dest and source communicate with the migrate_data object whether or not they are using this new thing and if they aren\u0027t compatible the live migration can\u0027t use those hosts\n4. what if i\u0027m resizing to/from flavors that require or don\u0027t require tpm?\n5. similarly, even though rebuild is on the same host, you can change the image. what happens if the new image and the original image don\u0027t match regarding required tpm traits? since rebuild is a new build, if the new image has tpm then I guess we create the guest with tpm, and if the image doesn\u0027t, we don\u0027t.\n6. what takes precedence for tpm if both the flavor and image define traits? like let\u0027s say the image has the 2.0 trait and the flavor has the 1.2 trait?","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7819d3773bacb45efd1106c9c0973894c4cdc7e8","unresolved":false,"context_lines":[{"line_number":94,"context_line":"LibvirtDriver.migrate_disk_and_power_off()."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"It should be noted that if a compute node goes down and the VM has to be"},{"line_number":97,"context_line":"rebuilt on another compute node then we\u0027re going to lose any emulated TPM data."},{"line_number":98,"context_line":"In the shared-storage case this is exactly analogous to taking the hard drive"},{"line_number":99,"context_line":"out of one physical machine and putting it into another physical machine."},{"line_number":100,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_32febc04","line":97,"updated":"2018-10-18 13:22:09.000000000","message":"What is going to be the effect on the guest in this case? Does it depend on the application? If we\u0027re evacuating within hosts in a shared file system aggregate, would the guest notice? I\u0027m just wondering what the recommendation would be to operators that leverage this thing, i.e. should they restrict tpm-enabled images/flavors to host aggregates where those hosts are on the same underlying storage in case they need to evacuate one of these types of instances?","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"22ba61e29ad4f82999b783a0978ca514ae4a6cfa","unresolved":false,"context_lines":[{"line_number":94,"context_line":"LibvirtDriver.migrate_disk_and_power_off()."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"It should be noted that if a compute node goes down and the VM has to be"},{"line_number":97,"context_line":"rebuilt on another compute node then we\u0027re going to lose any emulated TPM data."},{"line_number":98,"context_line":"In the shared-storage case this is exactly analogous to taking the hard drive"},{"line_number":99,"context_line":"out of one physical machine and putting it into another physical machine."},{"line_number":100,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_8e8e8878","line":97,"in_reply_to":"3f79a3b5_32febc04","updated":"2018-10-18 18:00:22.000000000","message":"I think it\u0027d depend on the application.  But you\u0027d lose any \"persistent entities\" like signing keys and primary storage keys so there might need to be admin-level recovery to reprogram the keys after the evacuation.\n\nIf the operator could arrange for /var/lib/libvirt/swtpm/\u003cinstance\u003e to be accessible from multiple hosts, then I guess that would avoid the problem of losing the persistent data during an evacuate.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0b2c0de82c0581008917b817c20a1b057c9bc24e","unresolved":false,"context_lines":[{"line_number":94,"context_line":"LibvirtDriver.migrate_disk_and_power_off()."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"It should be noted that if a compute node goes down and the VM has to be"},{"line_number":97,"context_line":"rebuilt on another compute node then we\u0027re going to lose any emulated TPM data."},{"line_number":98,"context_line":"In the shared-storage case this is exactly analogous to taking the hard drive"},{"line_number":99,"context_line":"out of one physical machine and putting it into another physical machine."},{"line_number":100,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_60df6967","line":97,"in_reply_to":"3f79a3b5_8e8e8878","updated":"2018-11-01 21:10:13.000000000","message":"\u003e If the operator could arrange for /var/lib/libvirt/swtpm/\u003cinstance\u003e to be accessible from multiple hosts, then I guess that would avoid the problem of losing the persistent data during an evacuate.\n\nThat might be worth putting into the spec, or docs as consideration.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"436a75c1953fd2eba8c22994d6b85cbb5b4d7e66","unresolved":false,"context_lines":[{"line_number":102,"context_line":"------------"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"Rather than using a trait, we could instead use a resource with a large"},{"line_number":105,"context_line":"inventory."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_40a5b400","line":105,"updated":"2018-10-17 21:04:35.000000000","message":"woot! infinite resource classes at last, hallelujah! https://anticdent.org/simple-resource-provision.html","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7819d3773bacb45efd1106c9c0973894c4cdc7e8","unresolved":false,"context_lines":[{"line_number":140,"context_line":"Other deployer impact"},{"line_number":141,"context_line":"---------------------"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"None"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"Developer impact"},{"line_number":146,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_522fb888","line":143,"updated":"2018-10-18 13:22:09.000000000","message":"See questions above about evacuate and if these types of flavors/images should be restricted to host aggregates that share local storage.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"436a75c1953fd2eba8c22994d6b85cbb5b4d7e66","unresolved":false,"context_lines":[{"line_number":170,"context_line":"Work Items"},{"line_number":171,"context_line":"----------"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"* Support for new placement resource"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"* Libvirt driver changes to report resource inventory to placement"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_2091989c","line":173,"range":{"start_line":173,"start_character":28,"end_line":173,"end_character":36},"updated":"2018-10-17 21:04:35.000000000","message":"You mean trait here? resource class was the alternative and future ehancement.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7819d3773bacb45efd1106c9c0973894c4cdc7e8","unresolved":false,"context_lines":[{"line_number":170,"context_line":"Work Items"},{"line_number":171,"context_line":"----------"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"* Support for new placement resource"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"* Libvirt driver changes to report resource inventory to placement"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_12470055","line":173,"range":{"start_line":173,"start_character":28,"end_line":173,"end_character":36},"in_reply_to":"3f79a3b5_2091989c","updated":"2018-10-18 13:22:09.000000000","message":"Yes, same as my comment in the opening paragraph (which is copied into the commit message).","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7819d3773bacb45efd1106c9c0973894c4cdc7e8","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":"* Support for new placement resource"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"* Libvirt driver changes to report resource inventory to placement"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"* Libvirt driver changes to enable specifying libvirt XML"},{"line_number":178,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_d250a80c","line":175,"range":{"start_line":175,"start_character":44,"end_line":175,"end_character":53},"updated":"2018-10-18 13:22:09.000000000","message":"It\u0027s not inventory though right? It\u0027s traits. The PTPM inventory thing was a \"possible future enhancement\" which is out of scope for this spec.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7819d3773bacb45efd1106c9c0973894c4cdc7e8","unresolved":false,"context_lines":[{"line_number":197,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"Operations Guide and End User Guide will be updated appropriately."},{"line_number":200,"context_line":""},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"References"},{"line_number":203,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_923a30c3","line":200,"updated":"2018-10-18 13:22:09.000000000","message":"The feature support matrix should also be updated since this is a virt-driver specific feature.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7819d3773bacb45efd1106c9c0973894c4cdc7e8","unresolved":false,"context_lines":[{"line_number":217,"context_line":""},{"line_number":218,"context_line":"   * - Release Name"},{"line_number":219,"context_line":"     - Description"},{"line_number":220,"context_line":"   * - Rocky"},{"line_number":221,"context_line":"     - Introduced"},{"line_number":222,"context_line":"   * - Rocky"},{"line_number":223,"context_line":"     - Reproposed"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3f79a3b5_127060a7","line":223,"range":{"start_line":220,"start_character":0,"end_line":223,"end_character":17},"updated":"2018-10-18 13:22:09.000000000","message":"Just have Stein in here, it was never approved in Rocky.","commit_id":"688809df3100fdc0b8bd74a613148d523852eeeb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0b2c0de82c0581008917b817c20a1b057c9bc24e","unresolved":false,"context_lines":[{"line_number":66,"context_line":"indicating that we want to enable emulated TPM support. This would presumably"},{"line_number":67,"context_line":"default to `false` for minimal surprise on upgrades."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"In order to request this functionality (and to allow scheduling to nodes that"},{"line_number":70,"context_line":"provide this functionality) we propose to define two new traits,"},{"line_number":71,"context_line":"`COMPUTE_SECURITY_TPM_1_2` and `COMPUTE_SECURITY_TPM_2_0`."},{"line_number":72,"context_line":"(The emulated TPM is just a process running on the host, so the concept of"},{"line_number":73,"context_line":"inventory doesn\u0027t apply.) The two traits represent the two different versions"},{"line_number":74,"context_line":"of the TPM spec that are currently supported.  The flavor extra-specs or image"}],"source_content_type":"text/x-rst","patch_set":9,"id":"3f79a3b5_e50ceb45","line":71,"range":{"start_line":69,"start_character":0,"end_line":71,"end_character":58},"updated":"2018-11-01 21:10:13.000000000","message":"As mentioned in PS7, I\u0027m not sure what the difference is between TPM 1.2 and 2.0 except for CRB support, and if you can\u0027t otherwise request CRB, it seems weird to distinguish the trait by version rather than just expose CUSTOM_SECURITY_TPM. Maybe there are other differences between 1.2 and 2.0 for model TIS that I just don\u0027t appreciate, but actual application writers / users of the feature would care about. CRB support could always be baked in later with a flavor extra spec.\n\n(later)\n\nOh I see below that you added the tpm model extra spec in here now.","commit_id":"3b035ee33f842308ee943c74805acc23e0da6816"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"c50307e7b37e0175c2649359a22a0c21afc20282","unresolved":false,"context_lines":[{"line_number":66,"context_line":"indicating that we want to enable emulated TPM support. This would presumably"},{"line_number":67,"context_line":"default to `false` for minimal surprise on upgrades."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"In order to request this functionality (and to allow scheduling to nodes that"},{"line_number":70,"context_line":"provide this functionality) we propose to define two new traits,"},{"line_number":71,"context_line":"`COMPUTE_SECURITY_TPM_1_2` and `COMPUTE_SECURITY_TPM_2_0`."},{"line_number":72,"context_line":"(The emulated TPM is just a process running on the host, so the concept of"},{"line_number":73,"context_line":"inventory doesn\u0027t apply.) The two traits represent the two different versions"},{"line_number":74,"context_line":"of the TPM spec that are currently supported.  The flavor extra-specs or image"}],"source_content_type":"text/x-rst","patch_set":9,"id":"3f79a3b5_11683487","line":71,"range":{"start_line":69,"start_character":0,"end_line":71,"end_character":58},"in_reply_to":"3f79a3b5_e50ceb45","updated":"2018-11-02 15:03:24.000000000","message":"added a link to differences between tpm versions","commit_id":"3b035ee33f842308ee943c74805acc23e0da6816"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0b2c0de82c0581008917b817c20a1b057c9bc24e","unresolved":false,"context_lines":[{"line_number":82,"context_line":"fail."},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"When using `COMPUTE_SECURITY_TPM_2_0`, there are two possible device models for"},{"line_number":85,"context_line":"the emulated TPM device, `TIS` and `CRB`.  By default the `TIS` model will be"},{"line_number":86,"context_line":"used, but it can also be explicitly specified by setting"},{"line_number":87,"context_line":"`hw:tpm_connection_mode\u003dTIS` in the image or `hw_tpm_connection_mode\u003dTIS` in"},{"line_number":88,"context_line":"the image properties.  The CRB option can be specified by setting"}],"source_content_type":"text/x-rst","patch_set":9,"id":"3f79a3b5_404b4d5d","line":85,"range":{"start_line":85,"start_character":36,"end_line":85,"end_character":39},"updated":"2018-11-01 21:10:13.000000000","message":"Should probably also note in here somewhere that libvirt\u003e\u003d4.4.0 is required for CRB.","commit_id":"3b035ee33f842308ee943c74805acc23e0da6816"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"c50307e7b37e0175c2649359a22a0c21afc20282","unresolved":false,"context_lines":[{"line_number":82,"context_line":"fail."},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"When using `COMPUTE_SECURITY_TPM_2_0`, there are two possible device models for"},{"line_number":85,"context_line":"the emulated TPM device, `TIS` and `CRB`.  By default the `TIS` model will be"},{"line_number":86,"context_line":"used, but it can also be explicitly specified by setting"},{"line_number":87,"context_line":"`hw:tpm_connection_mode\u003dTIS` in the image or `hw_tpm_connection_mode\u003dTIS` in"},{"line_number":88,"context_line":"the image properties.  The CRB option can be specified by setting"}],"source_content_type":"text/x-rst","patch_set":9,"id":"3f79a3b5_f6549fff","line":85,"range":{"start_line":85,"start_character":36,"end_line":85,"end_character":39},"in_reply_to":"3f79a3b5_404b4d5d","updated":"2018-11-02 15:03:24.000000000","message":"4.5.0 is required for TPM 2.0, so we can overload that trait for scheduling.  I\u0027ll mention the version.","commit_id":"3b035ee33f842308ee943c74805acc23e0da6816"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0b2c0de82c0581008917b817c20a1b057c9bc24e","unresolved":false,"context_lines":[{"line_number":84,"context_line":"When using `COMPUTE_SECURITY_TPM_2_0`, there are two possible device models for"},{"line_number":85,"context_line":"the emulated TPM device, `TIS` and `CRB`.  By default the `TIS` model will be"},{"line_number":86,"context_line":"used, but it can also be explicitly specified by setting"},{"line_number":87,"context_line":"`hw:tpm_connection_mode\u003dTIS` in the image or `hw_tpm_connection_mode\u003dTIS` in"},{"line_number":88,"context_line":"the image properties.  The CRB option can be specified by setting"},{"line_number":89,"context_line":"`hw:tpm_connection_mode\u003dCRB` in the flavor (or via the equivalent image"},{"line_number":90,"context_line":"property)."}],"source_content_type":"text/x-rst","patch_set":9,"id":"3f79a3b5_e01a9969","line":87,"range":{"start_line":87,"start_character":4,"end_line":87,"end_character":23},"updated":"2018-11-01 21:10:13.000000000","message":"tpm_model, as mentioned in PS7, seems like a better name for this given that\u0027s what it\u0027s called in the libvirt docs:\n\nhttps://libvirt.org/formatdomain.html#elementsTpm\n\nAnd it\u0027s just less wordy.","commit_id":"3b035ee33f842308ee943c74805acc23e0da6816"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"c50307e7b37e0175c2649359a22a0c21afc20282","unresolved":false,"context_lines":[{"line_number":84,"context_line":"When using `COMPUTE_SECURITY_TPM_2_0`, there are two possible device models for"},{"line_number":85,"context_line":"the emulated TPM device, `TIS` and `CRB`.  By default the `TIS` model will be"},{"line_number":86,"context_line":"used, but it can also be explicitly specified by setting"},{"line_number":87,"context_line":"`hw:tpm_connection_mode\u003dTIS` in the image or `hw_tpm_connection_mode\u003dTIS` in"},{"line_number":88,"context_line":"the image properties.  The CRB option can be specified by setting"},{"line_number":89,"context_line":"`hw:tpm_connection_mode\u003dCRB` in the flavor (or via the equivalent image"},{"line_number":90,"context_line":"property)."}],"source_content_type":"text/x-rst","patch_set":9,"id":"3f79a3b5_d1615ca4","line":87,"range":{"start_line":87,"start_character":4,"end_line":87,"end_character":23},"in_reply_to":"3f79a3b5_e01a9969","updated":"2018-11-02 15:03:24.000000000","message":"done","commit_id":"3b035ee33f842308ee943c74805acc23e0da6816"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0b2c0de82c0581008917b817c20a1b057c9bc24e","unresolved":false,"context_lines":[{"line_number":115,"context_line":""},{"line_number":116,"context_line":"Resizing will result in a reschedule, so shouldn\u0027t be a problem.  If the admin"},{"line_number":117,"context_line":"resizes from a flavor with TPM to a flavor without TPM nova won\u0027t care, but it"},{"line_number":118,"context_line":"might cause problems in the guest.  (Do we want to prevent this?  It\u0027s possible"},{"line_number":119,"context_line":"that the guest isn\u0027t even using the TPM capabilities if the flavor specified"},{"line_number":120,"context_line":"it.)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"Rebuilding to a new image is problematic if the new image specifies a TPM"},{"line_number":123,"context_line":"trait and the current host cannot provide TPM support.  This will cause the"}],"source_content_type":"text/x-rst","patch_set":9,"id":"3f79a3b5_a0902199","line":120,"range":{"start_line":118,"start_character":36,"end_line":120,"end_character":4},"updated":"2018-11-01 21:10:13.000000000","message":"As mentioned in PS7, I think if they shoot themselves in the foot it\u0027s up to them.","commit_id":"3b035ee33f842308ee943c74805acc23e0da6816"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"c50307e7b37e0175c2649359a22a0c21afc20282","unresolved":false,"context_lines":[{"line_number":115,"context_line":""},{"line_number":116,"context_line":"Resizing will result in a reschedule, so shouldn\u0027t be a problem.  If the admin"},{"line_number":117,"context_line":"resizes from a flavor with TPM to a flavor without TPM nova won\u0027t care, but it"},{"line_number":118,"context_line":"might cause problems in the guest.  (Do we want to prevent this?  It\u0027s possible"},{"line_number":119,"context_line":"that the guest isn\u0027t even using the TPM capabilities if the flavor specified"},{"line_number":120,"context_line":"it.)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"Rebuilding to a new image is problematic if the new image specifies a TPM"},{"line_number":123,"context_line":"trait and the current host cannot provide TPM support.  This will cause the"}],"source_content_type":"text/x-rst","patch_set":9,"id":"3f79a3b5_9101a4b7","line":120,"range":{"start_line":118,"start_character":36,"end_line":120,"end_character":4},"in_reply_to":"3f79a3b5_a0902199","updated":"2018-11-02 15:03:24.000000000","message":"works","commit_id":"3b035ee33f842308ee943c74805acc23e0da6816"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0b2c0de82c0581008917b817c20a1b057c9bc24e","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"Rebuilding to a new image is problematic if the new image specifies a TPM"},{"line_number":123,"context_line":"trait and the current host cannot provide TPM support.  This will cause the"},{"line_number":124,"context_line":"rebuild to fail."},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"It should be noted that if a compute node goes down and the VM has to be"},{"line_number":127,"context_line":"rebuilt on another compute node then we\u0027re going to lose any emulated TPM data."}],"source_content_type":"text/x-rst","patch_set":9,"id":"3f79a3b5_c08d1d7e","line":124,"updated":"2018-11-01 21:10:13.000000000","message":"nit: could add, \"In this case, the user just needs to rebuild with a suitable image.\"","commit_id":"3b035ee33f842308ee943c74805acc23e0da6816"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"c50307e7b37e0175c2649359a22a0c21afc20282","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"Rebuilding to a new image is problematic if the new image specifies a TPM"},{"line_number":123,"context_line":"trait and the current host cannot provide TPM support.  This will cause the"},{"line_number":124,"context_line":"rebuild to fail."},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"It should be noted that if a compute node goes down and the VM has to be"},{"line_number":127,"context_line":"rebuilt on another compute node then we\u0027re going to lose any emulated TPM data."}],"source_content_type":"text/x-rst","patch_set":9,"id":"3f79a3b5_3108d0d6","line":124,"in_reply_to":"3f79a3b5_c08d1d7e","updated":"2018-11-02 15:03:24.000000000","message":"done","commit_id":"3b035ee33f842308ee943c74805acc23e0da6816"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0b2c0de82c0581008917b817c20a1b057c9bc24e","unresolved":false,"context_lines":[{"line_number":197,"context_line":"Other contributors:"},{"line_number":198,"context_line":"  None"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"Work Items"},{"line_number":201,"context_line":"----------"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"* Support for new placement traits"}],"source_content_type":"text/x-rst","patch_set":9,"id":"3f79a3b5_40358da6","line":200,"updated":"2018-11-01 21:10:13.000000000","message":"Doesn\u0027t the shelve/unshelve work item need to be listed here since it\u0027s something outside of the normal create/rebuild/migrate scenario.","commit_id":"3b035ee33f842308ee943c74805acc23e0da6816"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"251f40bd13083bec223cc2dd473b563e2ee7bbac","unresolved":false,"context_lines":[{"line_number":197,"context_line":"Other contributors:"},{"line_number":198,"context_line":"  None"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"Work Items"},{"line_number":201,"context_line":"----------"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"* Support for new placement traits"}],"source_content_type":"text/x-rst","patch_set":9,"id":"3f79a3b5_e07b79f0","line":200,"in_reply_to":"3f79a3b5_40358da6","updated":"2018-11-01 21:31:41.000000000","message":"If we\u0027re not going to work on shelve support for this in stein, then let\u0027s make sure it\u0027s called out explicitly as a limitation both in the spec and the resulting admin docs.","commit_id":"3b035ee33f842308ee943c74805acc23e0da6816"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"c50307e7b37e0175c2649359a22a0c21afc20282","unresolved":false,"context_lines":[{"line_number":197,"context_line":"Other contributors:"},{"line_number":198,"context_line":"  None"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"Work Items"},{"line_number":201,"context_line":"----------"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"* Support for new placement traits"}],"source_content_type":"text/x-rst","patch_set":9,"id":"3f79a3b5_7183a807","line":200,"in_reply_to":"3f79a3b5_40358da6","updated":"2018-11-02 15:03:24.000000000","message":"as per IRC, added statement calling out the fact that we will not initially support shelve/unshelve.","commit_id":"3b035ee33f842308ee943c74805acc23e0da6816"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5ee3bb6a54f1e39f3c3a08a5ed9968ad2395f7c0","unresolved":false,"context_lines":[{"line_number":89,"context_line":"the image properties.  The CRB option can be specified by setting"},{"line_number":90,"context_line":"`hw:tpm_model\u003dCRB` in the flavor (or via the equivalent image"},{"line_number":91,"context_line":"property).  In the case of libvirt/qemu, the version of libvirt that supports"},{"line_number":92,"context_line":"TPM 2.0 (v4.5.0) also supports the `CRB` device model."},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"If both the flavor and the image specify a TPM trait or device model and the"},{"line_number":95,"context_line":"two values do not match, an exception will be raised.  If the CRB model is"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3f79a3b5_7e7d88c1","line":92,"range":{"start_line":92,"start_character":0,"end_line":92,"end_character":16},"updated":"2018-11-05 21:43:00.000000000","message":"This is also the version needed for the \"emulator\" backend:\n\nhttps://libvirt.org/formatdomain.html#elementsTpm\n\nBut yeah.","commit_id":"3bff3828bc4b275999f3bea0f4e647609701ddfd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5ee3bb6a54f1e39f3c3a08a5ed9968ad2395f7c0","unresolved":false,"context_lines":[{"line_number":171,"context_line":"Instances which use UEFI NVRAM are currently in a similar position, as the"},{"line_number":172,"context_line":"NVRAM is not persisted over shelve/unshelve."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"None"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"Performance Impact"},{"line_number":177,"context_line":"------------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3f79a3b5_9eb18494","line":174,"range":{"start_line":174,"start_character":0,"end_line":174,"end_character":4},"updated":"2018-11-05 21:43:00.000000000","message":"Remove this.","commit_id":"3bff3828bc4b275999f3bea0f4e647609701ddfd"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"96b170dd9260dfacddd0e451974f4d06eb63d44e","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"In order to request this functionality (and to allow scheduling to nodes that"},{"line_number":70,"context_line":"provide this functionality) we propose to define two new traits,"},{"line_number":71,"context_line":"`COMPUTE_SECURITY_TPM_1_2` and `COMPUTE_SECURITY_TPM_2_0`."},{"line_number":72,"context_line":"(The emulated TPM is just a process running on the host, so the concept of"},{"line_number":73,"context_line":"inventory doesn\u0027t apply.) The two traits represent the two different versions"},{"line_number":74,"context_line":"of the TPM spec that are currently supported. (A summary of the differences"}],"source_content_type":"text/x-rst","patch_set":11,"id":"3f79a3b5_f6b3ee97","line":71,"updated":"2018-11-06 14:39:28.000000000","message":"Thinking about Ironic in my head. If Ironic machines have an appropriate real TPM they just report these. So that all seems to work nicely.","commit_id":"e6f1afe2271b41bbbae0653570c0c04de3df4723"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"96b170dd9260dfacddd0e451974f4d06eb63d44e","unresolved":false,"context_lines":[{"line_number":89,"context_line":"the image properties.  The CRB option can be specified by setting"},{"line_number":90,"context_line":"`hw:tpm_model\u003dCRB` in the flavor (or via the equivalent image"},{"line_number":91,"context_line":"property).  In the case of libvirt/qemu, the version of libvirt that supports"},{"line_number":92,"context_line":"TPM 2.0 (v4.5.0) also supports the `CRB` device model."},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"If both the flavor and the image specify a TPM trait or device model and the"},{"line_number":95,"context_line":"two values do not match, an exception will be raised.  If the CRB model is"}],"source_content_type":"text/x-rst","patch_set":11,"id":"3f79a3b5_d6e03296","line":92,"updated":"2018-11-06 14:39:28.000000000","message":"I wonder if we need a configuration value for the default, but I am assuming a hard coded preference will do the trick here, which seems fine.","commit_id":"e6f1afe2271b41bbbae0653570c0c04de3df4723"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"96b170dd9260dfacddd0e451974f4d06eb63d44e","unresolved":false,"context_lines":[{"line_number":103,"context_line":"or flavor could request it by specifying `resources:PTPM\u003d1`.  The trait would"},{"line_number":104,"context_line":"not be necessary in this case, as the desire for a TPM in the instance is"},{"line_number":105,"context_line":"implied by the resource request.  Also, for TPM passthrough the device model"},{"line_number":106,"context_line":"is controlled by the actual hardware device."},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"As part of implementing the this feature, the nova cold migration code will"},{"line_number":109,"context_line":"need to copy over the directory containing the emulated TPM files.  For"}],"source_content_type":"text/x-rst","patch_set":11,"id":"3f79a3b5_96fe3a37","line":106,"updated":"2018-11-06 14:39:28.000000000","message":"A nice distinction between the trait approach. I guess a motherboard might do some hardware virtualization/namespace in the TPM, eventually so you get multiple, etc, etc.","commit_id":"e6f1afe2271b41bbbae0653570c0c04de3df4723"}]}
