)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2af2eda18ec7bdf3c7c645c5693e07bc02ef97da","unresolved":false,"context_lines":[{"line_number":16,"context_line":"This change adds the \u0027volume-extended\u0027 external event."},{"line_number":17,"context_line":"The event tag needs to be the extended volume id."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Blueprint: extend-attached-volume"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: If10cffd0dc4c9879f6754ce39bee5fae1d04f474"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"5ff73747_7e7aa424","line":19,"updated":"2017-04-24 20:41:22.000000000","message":"This should be nova-support-attached-volume-extend\n\nPlease adjust the topic branch too otherwise the blueprint in launchpad isn\u0027t tracked against the code changes.","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"c567f7fa35eb6d4963fc8c82fc570198df3ed86c","unresolved":false,"context_lines":[{"line_number":16,"context_line":"This change adds the \u0027volume-extended\u0027 external event."},{"line_number":17,"context_line":"The event tag needs to be the extended volume id."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Blueprint: extend-attached-volume"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: If10cffd0dc4c9879f6754ce39bee5fae1d04f474"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"5ff73747_99aeaae5","line":19,"in_reply_to":"5ff73747_7e7aa424","updated":"2017-04-25 01:05:09.000000000","message":"Done","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"}],"api-ref/source/parameters.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bbc9c23ac99abd13b0601f097fde31a6f4dd0ab1","unresolved":false,"context_lines":[{"line_number":1499,"context_line":"    The HTTP response code for the event. The following codes are currently used:"},{"line_number":1500,"context_line":""},{"line_number":1501,"context_line":"      * 200 - successfully submitted event"},{"line_number":1502,"context_line":"      * 404 - the instance specified by ``server_uuid`` was not found"},{"line_number":1503,"context_line":"      * 422 - no host was found for the server specified by ``server_uuid``,"},{"line_number":1504,"context_line":"         so there is no route to this server."},{"line_number":1505,"context_line":"  in: body"}],"source_content_type":"text/x-yaml","patch_set":19,"id":"5f201791_93dcefe4","line":1502,"updated":"2017-06-26 05:57:46.000000000","message":"We should update this list to include 400 now.","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"5563f9f91f30240b97cfd1bd797ad3a424f9ee01","unresolved":false,"context_lines":[{"line_number":1499,"context_line":"    The HTTP response code for the event. The following codes are currently used:"},{"line_number":1500,"context_line":""},{"line_number":1501,"context_line":"      * 200 - successfully submitted event"},{"line_number":1502,"context_line":"      * 404 - the instance specified by ``server_uuid`` was not found"},{"line_number":1503,"context_line":"      * 422 - no host was found for the server specified by ``server_uuid``,"},{"line_number":1504,"context_line":"         so there is no route to this server."},{"line_number":1505,"context_line":"  in: body"}],"source_content_type":"text/x-yaml","patch_set":19,"id":"5f201791_0ace22b3","line":1502,"in_reply_to":"5f201791_93dcefe4","updated":"2017-06-27 21:29:52.000000000","message":"Done","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1ddbe271c47e3a985910c642684b36c5812cb88b","unresolved":false,"context_lines":[{"line_number":1499,"context_line":"    The HTTP response code for the event. The following codes are currently used:"},{"line_number":1500,"context_line":""},{"line_number":1501,"context_line":"      * 200 - successfully submitted event"},{"line_number":1502,"context_line":"      * 404 - the request is missing required parameter"},{"line_number":1503,"context_line":"      * 404 - the instance specified by ``server_uuid`` was not found"},{"line_number":1504,"context_line":"      * 422 - no host was found for the server specified by ``server_uuid``,"},{"line_number":1505,"context_line":"         so there is no route to this server."}],"source_content_type":"text/x-yaml","patch_set":20,"id":"5f201791_783c422e","line":1502,"range":{"start_line":1502,"start_character":8,"end_line":1502,"end_character":11},"updated":"2017-06-28 02:33:23.000000000","message":"400","commit_id":"ac8e7d91bc84c012beb9ec6e4c68d172f634dcda"}],"doc/source/support-matrix.ini":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d6a85bc03209dcb3d9a06191d7e4418e659ab52c","unresolved":false,"context_lines":[{"line_number":140,"context_line":"  Therefore this operation is not considered to be mandatory to support."},{"line_number":141,"context_line":"driver-impl-xenserver\u003dmissing"},{"line_number":142,"context_line":"driver-impl-libvirt-kvm-x86\u003dcomplete"},{"line_number":143,"context_line":"driver-impl-libvirt-kvm-ppc64\u003dcomplete"},{"line_number":144,"context_line":"driver-impl-libvirt-kvm-s390x\u003dcomplete"},{"line_number":145,"context_line":"driver-impl-libvirt-qemu-x86\u003dcomplete"},{"line_number":146,"context_line":"driver-impl-libvirt-lxc\u003dmissing"}],"source_content_type":"text/x-properties","patch_set":19,"id":"5f201791_9bd1bcfe","line":143,"range":{"start_line":143,"start_character":30,"end_line":143,"end_character":38},"updated":"2017-06-23 20:08:38.000000000","message":"Would have to ask rfolco about this. Maybe mark as unknown until then.","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"5563f9f91f30240b97cfd1bd797ad3a424f9ee01","unresolved":false,"context_lines":[{"line_number":140,"context_line":"  Therefore this operation is not considered to be mandatory to support."},{"line_number":141,"context_line":"driver-impl-xenserver\u003dmissing"},{"line_number":142,"context_line":"driver-impl-libvirt-kvm-x86\u003dcomplete"},{"line_number":143,"context_line":"driver-impl-libvirt-kvm-ppc64\u003dcomplete"},{"line_number":144,"context_line":"driver-impl-libvirt-kvm-s390x\u003dcomplete"},{"line_number":145,"context_line":"driver-impl-libvirt-qemu-x86\u003dcomplete"},{"line_number":146,"context_line":"driver-impl-libvirt-lxc\u003dmissing"}],"source_content_type":"text/x-properties","patch_set":19,"id":"5f201791_6a3a3699","line":143,"range":{"start_line":143,"start_character":30,"end_line":143,"end_character":38},"in_reply_to":"5f201791_9bd1bcfe","updated":"2017-06-27 21:29:52.000000000","message":"Done","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d6a85bc03209dcb3d9a06191d7e4418e659ab52c","unresolved":false,"context_lines":[{"line_number":141,"context_line":"driver-impl-xenserver\u003dmissing"},{"line_number":142,"context_line":"driver-impl-libvirt-kvm-x86\u003dcomplete"},{"line_number":143,"context_line":"driver-impl-libvirt-kvm-ppc64\u003dcomplete"},{"line_number":144,"context_line":"driver-impl-libvirt-kvm-s390x\u003dcomplete"},{"line_number":145,"context_line":"driver-impl-libvirt-qemu-x86\u003dcomplete"},{"line_number":146,"context_line":"driver-impl-libvirt-lxc\u003dmissing"},{"line_number":147,"context_line":"driver-impl-libvirt-xen\u003dmissing"}],"source_content_type":"text/x-properties","patch_set":19,"id":"5f201791_bbea38a9","line":144,"range":{"start_line":144,"start_character":30,"end_line":144,"end_character":38},"updated":"2017-06-23 20:08:38.000000000","message":"Would have to ask markus_z about this. Mark as unknown.","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"5563f9f91f30240b97cfd1bd797ad3a424f9ee01","unresolved":false,"context_lines":[{"line_number":141,"context_line":"driver-impl-xenserver\u003dmissing"},{"line_number":142,"context_line":"driver-impl-libvirt-kvm-x86\u003dcomplete"},{"line_number":143,"context_line":"driver-impl-libvirt-kvm-ppc64\u003dcomplete"},{"line_number":144,"context_line":"driver-impl-libvirt-kvm-s390x\u003dcomplete"},{"line_number":145,"context_line":"driver-impl-libvirt-qemu-x86\u003dcomplete"},{"line_number":146,"context_line":"driver-impl-libvirt-lxc\u003dmissing"},{"line_number":147,"context_line":"driver-impl-libvirt-xen\u003dmissing"}],"source_content_type":"text/x-properties","patch_set":19,"id":"5f201791_4a3d3a8d","line":144,"range":{"start_line":144,"start_character":30,"end_line":144,"end_character":38},"in_reply_to":"5f201791_bbea38a9","updated":"2017-06-27 21:29:52.000000000","message":"Done","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d6a85bc03209dcb3d9a06191d7e4418e659ab52c","unresolved":false,"context_lines":[{"line_number":144,"context_line":"driver-impl-libvirt-kvm-s390x\u003dcomplete"},{"line_number":145,"context_line":"driver-impl-libvirt-qemu-x86\u003dcomplete"},{"line_number":146,"context_line":"driver-impl-libvirt-lxc\u003dmissing"},{"line_number":147,"context_line":"driver-impl-libvirt-xen\u003dmissing"},{"line_number":148,"context_line":"driver-impl-vmware\u003dmissing"},{"line_number":149,"context_line":"driver-impl-hyperv\u003dmissing"},{"line_number":150,"context_line":"driver-impl-ironic\u003dmissing"}],"source_content_type":"text/x-properties","patch_set":19,"id":"5f201791_5bdb241a","line":147,"range":{"start_line":147,"start_character":24,"end_line":147,"end_character":31},"updated":"2017-06-23 20:08:38.000000000","message":"Hmm, are we sure? We could ask anthonyper. Mark as unknown.","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"5563f9f91f30240b97cfd1bd797ad3a424f9ee01","unresolved":false,"context_lines":[{"line_number":144,"context_line":"driver-impl-libvirt-kvm-s390x\u003dcomplete"},{"line_number":145,"context_line":"driver-impl-libvirt-qemu-x86\u003dcomplete"},{"line_number":146,"context_line":"driver-impl-libvirt-lxc\u003dmissing"},{"line_number":147,"context_line":"driver-impl-libvirt-xen\u003dmissing"},{"line_number":148,"context_line":"driver-impl-vmware\u003dmissing"},{"line_number":149,"context_line":"driver-impl-hyperv\u003dmissing"},{"line_number":150,"context_line":"driver-impl-ironic\u003dmissing"}],"source_content_type":"text/x-properties","patch_set":19,"id":"5f201791_ea4d263e","line":147,"range":{"start_line":147,"start_character":24,"end_line":147,"end_character":31},"in_reply_to":"5f201791_5bdb241a","updated":"2017-06-27 21:29:52.000000000","message":"Done","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d6a85bc03209dcb3d9a06191d7e4418e659ab52c","unresolved":false,"context_lines":[{"line_number":148,"context_line":"driver-impl-vmware\u003dmissing"},{"line_number":149,"context_line":"driver-impl-hyperv\u003dmissing"},{"line_number":150,"context_line":"driver-impl-ironic\u003dmissing"},{"line_number":151,"context_line":"driver-impl-libvirt-vz-vm\u003dmissing"},{"line_number":152,"context_line":"driver-impl-libvirt-vz-ct\u003dmissing"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"[operation.attach-interface]"}],"source_content_type":"text/x-properties","patch_set":19,"id":"5f201791_fbbb10c1","line":151,"range":{"start_line":151,"start_character":26,"end_line":151,"end_character":33},"updated":"2017-06-23 20:08:38.000000000","message":"I\u0027m not sure about this one. The virtuozzo vm stuff is done through the libvirt driver so it might work. We could mark this one as \u0027unknown\u0027. mnestratov would be the person to ask.","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"5563f9f91f30240b97cfd1bd797ad3a424f9ee01","unresolved":false,"context_lines":[{"line_number":148,"context_line":"driver-impl-vmware\u003dmissing"},{"line_number":149,"context_line":"driver-impl-hyperv\u003dmissing"},{"line_number":150,"context_line":"driver-impl-ironic\u003dmissing"},{"line_number":151,"context_line":"driver-impl-libvirt-vz-vm\u003dmissing"},{"line_number":152,"context_line":"driver-impl-libvirt-vz-ct\u003dmissing"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"[operation.attach-interface]"}],"source_content_type":"text/x-properties","patch_set":19,"id":"5f201791_c595bd88","line":151,"range":{"start_line":151,"start_character":26,"end_line":151,"end_character":33},"in_reply_to":"5f201791_fbbb10c1","updated":"2017-06-27 21:29:52.000000000","message":"Done","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d6a85bc03209dcb3d9a06191d7e4418e659ab52c","unresolved":false,"context_lines":[{"line_number":149,"context_line":"driver-impl-hyperv\u003dmissing"},{"line_number":150,"context_line":"driver-impl-ironic\u003dmissing"},{"line_number":151,"context_line":"driver-impl-libvirt-vz-vm\u003dmissing"},{"line_number":152,"context_line":"driver-impl-libvirt-vz-ct\u003dmissing"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"[operation.attach-interface]"},{"line_number":155,"context_line":"title\u003dAttach virtual network interface to instance"}],"source_content_type":"text/x-properties","patch_set":19,"id":"5f201791_1bdecc10","line":152,"updated":"2017-06-23 20:08:38.000000000","message":"The docs job is failing on this for some reason but it looks OK to me:\n\nhttp://logs.openstack.org/22/454322/19/check/gate-nova-docs-ubuntu-xenial/cdfcfe2/console.html#_2017-06-21_21_08_41_262062","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"5563f9f91f30240b97cfd1bd797ad3a424f9ee01","unresolved":false,"context_lines":[{"line_number":149,"context_line":"driver-impl-hyperv\u003dmissing"},{"line_number":150,"context_line":"driver-impl-ironic\u003dmissing"},{"line_number":151,"context_line":"driver-impl-libvirt-vz-vm\u003dmissing"},{"line_number":152,"context_line":"driver-impl-libvirt-vz-ct\u003dmissing"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"[operation.attach-interface]"},{"line_number":155,"context_line":"title\u003dAttach virtual network interface to instance"}],"source_content_type":"text/x-properties","patch_set":19,"id":"5f201791_ea764670","line":152,"in_reply_to":"5f201791_1bdecc10","updated":"2017-06-27 21:29:52.000000000","message":"Done. Will mark as unknown too.","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a9e601b090a106971913b8e1f825eb0933e7741","unresolved":false,"context_lines":[{"line_number":148,"context_line":"driver-impl-vmware\u003dmissing"},{"line_number":149,"context_line":"driver-impl-hyperv\u003dmissing"},{"line_number":150,"context_line":"driver-impl-ironic\u003dmissing"},{"line_number":151,"context_line":"driver-impl-libvirt-vz-vm\u003dunknown"},{"line_number":152,"context_line":"driver-impl-libvirt-vz-ct\u003dunknown"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"[operation.attach-interface]"}],"source_content_type":"text/x-properties","patch_set":20,"id":"5f201791_587f46aa","line":151,"range":{"start_line":151,"start_character":26,"end_line":151,"end_character":33},"updated":"2017-06-28 02:38:19.000000000","message":"I suppose this should also be \u0027missing\u0027 since I think you can only attach vz volumes to vz vms and we don\u0027t have extend_volume implemented for the vz volume driver:\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/virt/libvirt/volume/vzstorage.py\n\nI don\u0027t know if you can attach iscsi or fc volumes to vz vm\u0027s though, maybe you can, that would be a question for the vz guys (mnestratov), so I guess it\u0027d be ok to leave this as unknown for now.","commit_id":"ac8e7d91bc84c012beb9ec6e4c68d172f634dcda"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a9e601b090a106971913b8e1f825eb0933e7741","unresolved":false,"context_lines":[{"line_number":149,"context_line":"driver-impl-hyperv\u003dmissing"},{"line_number":150,"context_line":"driver-impl-ironic\u003dmissing"},{"line_number":151,"context_line":"driver-impl-libvirt-vz-vm\u003dunknown"},{"line_number":152,"context_line":"driver-impl-libvirt-vz-ct\u003dunknown"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"[operation.attach-interface]"},{"line_number":155,"context_line":"title\u003dAttach virtual network interface to instance"}],"source_content_type":"text/x-properties","patch_set":20,"id":"5f201791_d89d960a","line":152,"range":{"start_line":152,"start_character":26,"end_line":152,"end_character":33},"updated":"2017-06-28 02:38:19.000000000","message":"This should be \u0027missing\u0027 since you can\u0027t attach a volume to a vz container, see operation.attach-volume above.","commit_id":"ac8e7d91bc84c012beb9ec6e4c68d172f634dcda"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b954ee5a04609001d739c033ef021542aa6ade8c","unresolved":false,"context_lines":[{"line_number":138,"context_line":"  extend the size of an attached volume is for those cases"},{"line_number":139,"context_line":"  where the instance is considered to be more of a pet than cattle."},{"line_number":140,"context_line":"  Therefore this operation is not considered to be mandatory to support."},{"line_number":141,"context_line":"driver-impl-xenserver\u003dmissing"},{"line_number":142,"context_line":"driver-impl-libvirt-kvm-x86\u003dcomplete"},{"line_number":143,"context_line":"driver-impl-libvirt-kvm-ppc64\u003dunknown"},{"line_number":144,"context_line":"driver-impl-libvirt-kvm-s390x\u003dunknown"}],"source_content_type":"text/x-properties","patch_set":21,"id":"5f201791_54a5cea0","line":141,"updated":"2017-06-28 05:41:04.000000000","message":"The problem might be that you\u0027re missing the cli entry.","commit_id":"d1995bbd2600dc2f1e4f213e53b45330b79973ae"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1415e6718fefd82db1c487377aa149d78fda14b9","unresolved":false,"context_lines":[{"line_number":153,"context_line":"driver-impl-hyperv\u003dmissing"},{"line_number":154,"context_line":"driver-impl-ironic\u003dmissing"},{"line_number":155,"context_line":"driver-impl-libvirt-vz-vm\u003dunknown"},{"line_number":156,"context_line":"driver-impl-libvirt-vz-ct\u003dmissing"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"[operation.attach-interface]"},{"line_number":159,"context_line":"title\u003dAttach virtual network interface to instance"}],"source_content_type":"text/x-properties","patch_set":24,"id":"3f1d235d_6f725faf","line":156,"updated":"2017-07-05 19:05:31.000000000","message":"Ah powervm is missing from this list now.","commit_id":"56eb2eda2aab9a8c21d0afde1049e3b2dd2d84d0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"97c0c4c3bece0268a90d2b1011318d7b39566646","unresolved":false,"context_lines":[{"line_number":136,"context_line":"notes\u003dThe extend volume operation provides a means to extend"},{"line_number":137,"context_line":"  the size of an attached volume. This allows volume size"},{"line_number":138,"context_line":"  to be expanded without interruption of service."},{"line_number":139,"context_line":"  In a cloud model it would be more typical to just"},{"line_number":140,"context_line":"  spin up a new instance with large storage, so the ability to"},{"line_number":141,"context_line":"  extend the size of an attached volume is for those cases"},{"line_number":142,"context_line":"  where the instance is considered to be more of a pet than cattle."}],"source_content_type":"text/x-properties","patch_set":35,"id":"3f1d235d_6fb871c7","line":139,"range":{"start_line":139,"start_character":2,"end_line":139,"end_character":18},"updated":"2017-07-11 18:38:04.000000000","message":"isn\u0027t that what we\u0027re supposed to be in? ;)","commit_id":"e66cd6aca780102189ecb275390519f0d2ee236a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"053204977de999066869633f0ea488214f03c961","unresolved":false,"context_lines":[{"line_number":136,"context_line":"notes\u003dThe extend volume operation provides a means to extend"},{"line_number":137,"context_line":"  the size of an attached volume. This allows volume size"},{"line_number":138,"context_line":"  to be expanded without interruption of service."},{"line_number":139,"context_line":"  In a cloud model it would be more typical to just"},{"line_number":140,"context_line":"  spin up a new instance with large storage, so the ability to"},{"line_number":141,"context_line":"  extend the size of an attached volume is for those cases"},{"line_number":142,"context_line":"  where the instance is considered to be more of a pet than cattle."}],"source_content_type":"text/x-properties","patch_set":35,"id":"3f1d235d_bae6c543","line":139,"range":{"start_line":139,"start_character":2,"end_line":139,"end_character":18},"in_reply_to":"3f1d235d_6fb871c7","updated":"2017-07-11 18:50:22.000000000","message":"This is boilerplate from the attach volume notes above.","commit_id":"e66cd6aca780102189ecb275390519f0d2ee236a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"780b811b0fa744b9055a001f94e39a5e2d262cfc","unresolved":false,"context_lines":[{"line_number":136,"context_line":"notes\u003dThe extend volume operation provides a means to extend"},{"line_number":137,"context_line":"  the size of an attached volume. This allows volume size"},{"line_number":138,"context_line":"  to be expanded without interruption of service."},{"line_number":139,"context_line":"  In a cloud model it would be more typical to just"},{"line_number":140,"context_line":"  spin up a new instance with large storage, so the ability to"},{"line_number":141,"context_line":"  extend the size of an attached volume is for those cases"},{"line_number":142,"context_line":"  where the instance is considered to be more of a pet than cattle."}],"source_content_type":"text/x-properties","patch_set":35,"id":"3f1d235d_dacbc147","line":139,"range":{"start_line":139,"start_character":2,"end_line":139,"end_character":18},"in_reply_to":"3f1d235d_bae6c543","updated":"2017-07-11 19:48:44.000000000","message":"yeah, I know, I was just joking around. :)","commit_id":"e66cd6aca780102189ecb275390519f0d2ee236a"}],"nova/api/openstack/compute/instance_actions.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"97c0c4c3bece0268a90d2b1011318d7b39566646","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        action_id \u003d action[\u0027id\u0027]"},{"line_number":86,"context_line":"        action \u003d self._format_action(action)"},{"line_number":87,"context_line":"        # Prior to microversion 2.50, events would only be returned in the"},{"line_number":88,"context_line":"        # response for non-admins by default policy rules. Starting in"},{"line_number":89,"context_line":"        # microversion 2.50, events are returned for admin_or_owner (of the"},{"line_number":90,"context_line":"        # instance) but the \"traceback\" field is only shown for admin users"},{"line_number":91,"context_line":"        # by default."}],"source_content_type":"text/x-python","patch_set":35,"id":"3f1d235d_cff4258a","line":88,"range":{"start_line":88,"start_character":23,"end_line":88,"end_character":33},"updated":"2017-07-11 18:38:04.000000000","message":"I think this is supposed to be *admins*, no?","commit_id":"e66cd6aca780102189ecb275390519f0d2ee236a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"053204977de999066869633f0ea488214f03c961","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        action_id \u003d action[\u0027id\u0027]"},{"line_number":86,"context_line":"        action \u003d self._format_action(action)"},{"line_number":87,"context_line":"        # Prior to microversion 2.50, events would only be returned in the"},{"line_number":88,"context_line":"        # response for non-admins by default policy rules. Starting in"},{"line_number":89,"context_line":"        # microversion 2.50, events are returned for admin_or_owner (of the"},{"line_number":90,"context_line":"        # instance) but the \"traceback\" field is only shown for admin users"},{"line_number":91,"context_line":"        # by default."}],"source_content_type":"text/x-python","patch_set":35,"id":"3f1d235d_9ae1c92d","line":88,"range":{"start_line":88,"start_character":23,"end_line":88,"end_character":33},"in_reply_to":"3f1d235d_cff4258a","updated":"2017-07-11 18:50:22.000000000","message":"Yes, good eye.","commit_id":"e66cd6aca780102189ecb275390519f0d2ee236a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"97c0c4c3bece0268a90d2b1011318d7b39566646","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        elif api_version_request.is_supported(req, \u00272.50\u0027):"},{"line_number":99,"context_line":"            # The user is not able to see all event details, but they can at"},{"line_number":100,"context_line":"            # least see the non-traceback event details."},{"line_number":101,"context_line":"            show_events \u003d True"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        if show_events:"},{"line_number":104,"context_line":"            events_raw \u003d self.action_api.action_events_get(context, instance,"}],"source_content_type":"text/x-python","patch_set":35,"id":"3f1d235d_8f4aada9","line":101,"updated":"2017-07-11 18:38:04.000000000","message":"This is kind of a weird policy-rule-like hack. Was it not possible to add a new policy rule called events.volume-extended or events.no-traceback or something like that and apply it by default as admin_or_owner?","commit_id":"e66cd6aca780102189ecb275390519f0d2ee236a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"780b811b0fa744b9055a001f94e39a5e2d262cfc","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        elif api_version_request.is_supported(req, \u00272.50\u0027):"},{"line_number":99,"context_line":"            # The user is not able to see all event details, but they can at"},{"line_number":100,"context_line":"            # least see the non-traceback event details."},{"line_number":101,"context_line":"            show_events \u003d True"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        if show_events:"},{"line_number":104,"context_line":"            events_raw \u003d self.action_api.action_events_get(context, instance,"}],"source_content_type":"text/x-python","patch_set":35,"id":"3f1d235d_0741e10b","line":101,"in_reply_to":"3f1d235d_7a05cdc1","updated":"2017-07-11 19:48:44.000000000","message":"ack","commit_id":"e66cd6aca780102189ecb275390519f0d2ee236a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"053204977de999066869633f0ea488214f03c961","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        elif api_version_request.is_supported(req, \u00272.50\u0027):"},{"line_number":99,"context_line":"            # The user is not able to see all event details, but they can at"},{"line_number":100,"context_line":"            # least see the non-traceback event details."},{"line_number":101,"context_line":"            show_events \u003d True"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        if show_events:"},{"line_number":104,"context_line":"            events_raw \u003d self.action_api.action_events_get(context, instance,"}],"source_content_type":"text/x-python","patch_set":35,"id":"3f1d235d_7a05cdc1","line":101,"in_reply_to":"3f1d235d_8f4aada9","updated":"2017-07-11 18:50:22.000000000","message":"This shouldn\u0027t be coupled with the volume-extended event, so I wouldn\u0027t mix that in here explicitly.\n\nAs for an \u0027events:traceback\u0027 type policy rule, we could do that, but we still have to check the microversion to see if we can return events at all in the response, since that\u0027s a change in the response so it has to be bound on the microversion, not a new policy rule. Whether or not the traceback is shown is currently based on the existing policy rule, which I just continued here.","commit_id":"e66cd6aca780102189ecb275390519f0d2ee236a"}],"nova/api/openstack/compute/rest_api_version_history.rst":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":568,"context_line":"2.49"},{"line_number":569,"context_line":"----"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"  Add \u0027volume-extended\u0027 event name to external-events."},{"line_number":572,"context_line":""}],"source_content_type":"text/x-rst","patch_set":18,"id":"5f201791_9b69338d","line":571,"range":{"start_line":571,"start_character":38,"end_line":571,"end_character":53},"updated":"2017-06-20 14:52:44.000000000","message":"to the ``os-server-external-events`` API.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":568,"context_line":"2.49"},{"line_number":569,"context_line":"----"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"  Add \u0027volume-extended\u0027 event name to external-events."},{"line_number":572,"context_line":""}],"source_content_type":"text/x-rst","patch_set":18,"id":"5f201791_09739982","line":571,"range":{"start_line":571,"start_character":38,"end_line":571,"end_character":53},"in_reply_to":"5f201791_9b69338d","updated":"2017-06-21 21:04:54.000000000","message":"Done","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"97c0c4c3bece0268a90d2b1011318d7b39566646","unresolved":false,"context_lines":[{"line_number":593,"context_line":"  * Expose the ``events`` field in the response body for the"},{"line_number":594,"context_line":"    ``GET /servers/{server_id}/os-instance-actions/{request_id}`` API. This is"},{"line_number":595,"context_line":"    useful for API users to monitor when a volume extend operation completes"},{"line_number":596,"context_line":"    for the given server instance. The existing"},{"line_number":597,"context_line":"    ``os_compute_api:os-instance-actions:events`` policy rule will be checked"},{"line_number":598,"context_line":"    to see if the ``traceback`` field should be shown for events. By"},{"line_number":599,"context_line":"    default only users with the administrator role will be able to see event"},{"line_number":600,"context_line":"    ``traceback`` details."}],"source_content_type":"text/x-rst","patch_set":35,"id":"3f1d235d_ef6c8137","line":598,"range":{"start_line":596,"start_character":35,"end_line":598,"end_character":65},"updated":"2017-07-11 18:38:04.000000000","message":"This does not match the logic added in this patch. The logic added in this patch doesn\u0027t checked the traceback field by looking at the os-instance-actions:events policy rule. Instead, there is a separate check to see if microversion 2.50 is supported, and if so, shows events but not tracebacks.","commit_id":"e66cd6aca780102189ecb275390519f0d2ee236a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"780b811b0fa744b9055a001f94e39a5e2d262cfc","unresolved":false,"context_lines":[{"line_number":593,"context_line":"  * Expose the ``events`` field in the response body for the"},{"line_number":594,"context_line":"    ``GET /servers/{server_id}/os-instance-actions/{request_id}`` API. This is"},{"line_number":595,"context_line":"    useful for API users to monitor when a volume extend operation completes"},{"line_number":596,"context_line":"    for the given server instance. The existing"},{"line_number":597,"context_line":"    ``os_compute_api:os-instance-actions:events`` policy rule will be checked"},{"line_number":598,"context_line":"    to see if the ``traceback`` field should be shown for events. By"},{"line_number":599,"context_line":"    default only users with the administrator role will be able to see event"},{"line_number":600,"context_line":"    ``traceback`` details."}],"source_content_type":"text/x-rst","patch_set":35,"id":"3f1d235d_870291b3","line":598,"range":{"start_line":596,"start_character":35,"end_line":598,"end_character":65},"in_reply_to":"3f1d235d_3ab635fc","updated":"2017-07-11 19:48:44.000000000","message":"if we could just change it to remove the wording around \"existing ... policy rule will be checked to see if the ``traceback`` field should be shown\", I\u0027d be happy.\n\nYou can say something like \"If the existing ... policy about viewing instance events fails for the calling user, we now check the microversion to determine if the user can see event details without traceback information\".","commit_id":"e66cd6aca780102189ecb275390519f0d2ee236a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7da281c5cb28a57ad8506fbf7baf61c3313202ab","unresolved":false,"context_lines":[{"line_number":593,"context_line":"  * Expose the ``events`` field in the response body for the"},{"line_number":594,"context_line":"    ``GET /servers/{server_id}/os-instance-actions/{request_id}`` API. This is"},{"line_number":595,"context_line":"    useful for API users to monitor when a volume extend operation completes"},{"line_number":596,"context_line":"    for the given server instance. The existing"},{"line_number":597,"context_line":"    ``os_compute_api:os-instance-actions:events`` policy rule will be checked"},{"line_number":598,"context_line":"    to see if the ``traceback`` field should be shown for events. By"},{"line_number":599,"context_line":"    default only users with the administrator role will be able to see event"},{"line_number":600,"context_line":"    ``traceback`` details."}],"source_content_type":"text/x-rst","patch_set":35,"id":"1f1a1f67_abb7f4d8","line":598,"range":{"start_line":596,"start_character":35,"end_line":598,"end_character":65},"in_reply_to":"3f1d235d_6c5e3413","updated":"2017-07-12 13:52:30.000000000","message":"Yes, please :)","commit_id":"e66cd6aca780102189ecb275390519f0d2ee236a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f2c8499cb5add810b7d22ff41e459d246191bb79","unresolved":false,"context_lines":[{"line_number":593,"context_line":"  * Expose the ``events`` field in the response body for the"},{"line_number":594,"context_line":"    ``GET /servers/{server_id}/os-instance-actions/{request_id}`` API. This is"},{"line_number":595,"context_line":"    useful for API users to monitor when a volume extend operation completes"},{"line_number":596,"context_line":"    for the given server instance. The existing"},{"line_number":597,"context_line":"    ``os_compute_api:os-instance-actions:events`` policy rule will be checked"},{"line_number":598,"context_line":"    to see if the ``traceback`` field should be shown for events. By"},{"line_number":599,"context_line":"    default only users with the administrator role will be able to see event"},{"line_number":600,"context_line":"    ``traceback`` details."}],"source_content_type":"text/x-rst","patch_set":35,"id":"3f1d235d_6c5e3413","line":598,"range":{"start_line":596,"start_character":35,"end_line":598,"end_character":65},"in_reply_to":"3f1d235d_870291b3","updated":"2017-07-12 00:17:00.000000000","message":"Maybe I should just remove this sentence altogether. The paragraph is probably clear enough for what I want to communicate without it. Yeah?","commit_id":"e66cd6aca780102189ecb275390519f0d2ee236a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"053204977de999066869633f0ea488214f03c961","unresolved":false,"context_lines":[{"line_number":593,"context_line":"  * Expose the ``events`` field in the response body for the"},{"line_number":594,"context_line":"    ``GET /servers/{server_id}/os-instance-actions/{request_id}`` API. This is"},{"line_number":595,"context_line":"    useful for API users to monitor when a volume extend operation completes"},{"line_number":596,"context_line":"    for the given server instance. The existing"},{"line_number":597,"context_line":"    ``os_compute_api:os-instance-actions:events`` policy rule will be checked"},{"line_number":598,"context_line":"    to see if the ``traceback`` field should be shown for events. By"},{"line_number":599,"context_line":"    default only users with the administrator role will be able to see event"},{"line_number":600,"context_line":"    ``traceback`` details."}],"source_content_type":"text/x-rst","patch_set":35,"id":"3f1d235d_3ab635fc","line":598,"range":{"start_line":596,"start_character":35,"end_line":598,"end_character":65},"in_reply_to":"3f1d235d_ef6c8137","updated":"2017-07-11 18:50:22.000000000","message":"Well, yes and no. It does check the policy rule for events and if the context passes that check, they can see both events and the traceback details, regardless of microversion - that\u0027s the way it\u0027s always worked.\n\nIf they fail that policy check, but are microversion\u003e\u003d2.50, then they can see events in the response but not the traceback details, which is what I was trying to get at here.\n\nIf we added a new policy rule like os_compute_api:os-instance-actions:events:traceback, and you set that to admin_or_owner (by default it would be admin-only), then with microversion 2.50 you\u0027re seeing events and traceback, which is the same as if you set os_compute_api:os-instance-actions:events to admin_or_owner, which is why I didn\u0027t add a new policy rule, since the usage is redundant as far as I can tell.","commit_id":"e66cd6aca780102189ecb275390519f0d2ee236a"}],"nova/api/openstack/compute/schemas/server_external_events.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ff3c6aa4732d5e9297b1be1b5f5b124ab08a03be","unresolved":false,"context_lines":[{"line_number":28,"context_line":"                    },"},{"line_number":29,"context_line":"                    \u0027name\u0027: {"},{"line_number":30,"context_line":"                        \u0027type\u0027: \u0027string\u0027,"},{"line_number":31,"context_line":"                        \u0027enum\u0027: external_event_obj.EVENT_NAMES[:-1]"},{"line_number":32,"context_line":"                    },"},{"line_number":33,"context_line":"                    \u0027status\u0027: {"},{"line_number":34,"context_line":"                       \u0027type\u0027: \u0027string\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_a34358af","line":31,"range":{"start_line":31,"start_character":62,"end_line":31,"end_character":67},"updated":"2017-05-31 14:12:14.000000000","message":"This will be wrong when we add another event name later. We should probably be more specific here.","commit_id":"6589a034da8840772f79328a6ffe804506d41f21"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"create_v249 \u003d copy.deepcopy(create)"},{"line_number":56,"context_line":"name \u003d create_v249[\u0027properties\u0027][\u0027events\u0027][\u0027items\u0027][\u0027properties\u0027][\u0027name\u0027]"},{"line_number":57,"context_line":"name[\u0027enum\u0027].extend([\u0027volume-extended\u0027])"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_3bdc5f45","line":57,"range":{"start_line":57,"start_character":13,"end_line":57,"end_character":40},"updated":"2017-06-20 14:52:44.000000000","message":"nit: I\u0027d do .append(\u0027volume-extended\u0027) but that\u0027s just a style nit.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"create_v249 \u003d copy.deepcopy(create)"},{"line_number":56,"context_line":"name \u003d create_v249[\u0027properties\u0027][\u0027events\u0027][\u0027items\u0027][\u0027properties\u0027][\u0027name\u0027]"},{"line_number":57,"context_line":"name[\u0027enum\u0027].extend([\u0027volume-extended\u0027])"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_09f839c2","line":57,"range":{"start_line":57,"start_character":13,"end_line":57,"end_character":40},"in_reply_to":"5f201791_3bdc5f45","updated":"2017-06-21 21:04:54.000000000","message":"Done","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"}],"nova/api/openstack/compute/server_external_events.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"98ff94291d07bdcefb9e6ea1429be1103f4d8ac4","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    @extensions.expected_errors((400, 403, 404))"},{"line_number":41,"context_line":"    @wsgi.response(200)"},{"line_number":42,"context_line":"    @validation.schema(server_external_events.create, \u00272.1\u0027, \u00272.44\u0027)"},{"line_number":43,"context_line":"    @validation.schema(server_external_events.create_v246, \u00272.46\u0027)"},{"line_number":44,"context_line":"    def create(self, req, body):"},{"line_number":45,"context_line":"        \"\"\"Creates a new instance event.\"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_43359c45","line":42,"range":{"start_line":42,"start_character":64,"end_line":42,"end_character":66},"updated":"2017-05-31 14:11:04.000000000","message":"This should be n-1 from the new microversion.","commit_id":"6589a034da8840772f79328a6ffe804506d41f21"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            # it will not be possible to dispatch the event"},{"line_number":95,"context_line":"            if instance:"},{"line_number":96,"context_line":"                if instance.host:"},{"line_number":97,"context_line":"                    accepted_events.append(event)"},{"line_number":98,"context_line":"                    accepted_instances.add(instance)"},{"line_number":99,"context_line":"                    LOG.info(\u0027Creating event %(name)s:%(tag)s for \u0027"},{"line_number":100,"context_line":"                             \u0027instance %(instance_uuid)s on %(host)s\u0027,"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_3b5b3f88","line":97,"updated":"2017-06-20 14:52:44.000000000","message":"Before accepting the event, we could check to see if tag is provided for the given event in a private helper method. To be backward compatible, tag would be optional for everything except the \"volume-extended\" event, and tag is required for that event otherwise it\u0027s a 400 response for that specific event.\n\nI mentioned this in the compute manager code too.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            # it will not be possible to dispatch the event"},{"line_number":95,"context_line":"            if instance:"},{"line_number":96,"context_line":"                if instance.host:"},{"line_number":97,"context_line":"                    accepted_events.append(event)"},{"line_number":98,"context_line":"                    accepted_instances.add(instance)"},{"line_number":99,"context_line":"                    LOG.info(\u0027Creating event %(name)s:%(tag)s for \u0027"},{"line_number":100,"context_line":"                             \u0027instance %(instance_uuid)s on %(host)s\u0027,"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_a48e0cce","line":97,"in_reply_to":"5f201791_3b5b3f88","updated":"2017-06-21 21:04:54.000000000","message":"Done","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d6a85bc03209dcb3d9a06191d7e4418e659ab52c","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        self.compute_api \u003d compute.API()"},{"line_number":37,"context_line":"        super(ServerExternalEventsController, self).__init__()"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _is_event_tag_present(self, event):"},{"line_number":40,"context_line":"        if event.name \u003d\u003d \u0027volume-extended\u0027 and event.tag is None:"},{"line_number":41,"context_line":"            return False"},{"line_number":42,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_3b44e8b6","line":39,"range":{"start_line":39,"start_character":8,"end_line":39,"end_character":29},"updated":"2017-06-23 20:08:38.000000000","message":"This is misleading since it\u0027s specific to the volume-extended event. I\u0027d call it \"_is_volume_extended_event_tag_present\" or \"_is_event_tag_present_when_required\" - the latter is more generic which is nicer when using it in generic code below.","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"5563f9f91f30240b97cfd1bd797ad3a424f9ee01","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        self.compute_api \u003d compute.API()"},{"line_number":37,"context_line":"        super(ServerExternalEventsController, self).__init__()"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _is_event_tag_present(self, event):"},{"line_number":40,"context_line":"        if event.name \u003d\u003d \u0027volume-extended\u0027 and event.tag is None:"},{"line_number":41,"context_line":"            return False"},{"line_number":42,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_6a3116a3","line":39,"range":{"start_line":39,"start_character":8,"end_line":39,"end_character":29},"in_reply_to":"5f201791_3b44e8b6","updated":"2017-06-27 21:29:52.000000000","message":"Done","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d6a85bc03209dcb3d9a06191d7e4418e659ab52c","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            # for which the event is sent is assigned to a host; otherwise"},{"line_number":99,"context_line":"            # it will not be possible to dispatch the event"},{"line_number":100,"context_line":"            if instance:"},{"line_number":101,"context_line":"                if not self._is_event_tag_present(event):"},{"line_number":102,"context_line":"                    LOG.debug(\"Event tag is missing for instance \""},{"line_number":103,"context_line":"                              \"%(instance)s. Dropping event %(event)s\","},{"line_number":104,"context_line":"                              {\u0027instance\u0027: event.instance_uuid,"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_db0e148c","line":101,"updated":"2017-06-23 20:08:38.000000000","message":"The confusion here is because until Pike, Neutron wasn\u0027t sending the port id as the tag for network-changed events, and tag isn\u0027t required before this new microversion, so the name on the function is confusing.","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"5563f9f91f30240b97cfd1bd797ad3a424f9ee01","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            # for which the event is sent is assigned to a host; otherwise"},{"line_number":99,"context_line":"            # it will not be possible to dispatch the event"},{"line_number":100,"context_line":"            if instance:"},{"line_number":101,"context_line":"                if not self._is_event_tag_present(event):"},{"line_number":102,"context_line":"                    LOG.debug(\"Event tag is missing for instance \""},{"line_number":103,"context_line":"                              \"%(instance)s. Dropping event %(event)s\","},{"line_number":104,"context_line":"                              {\u0027instance\u0027: event.instance_uuid,"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_2a279e66","line":101,"in_reply_to":"5f201791_db0e148c","updated":"2017-06-27 21:29:52.000000000","message":"Done","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"}],"nova/compute/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ea898e339a69e3b1a9d9d5e0983928809cd369c","unresolved":false,"context_lines":[{"line_number":4278,"context_line":""},{"line_number":4279,"context_line":"        for event in events:"},{"line_number":4280,"context_line":"            if event.name \u003d\u003d \u0027volume-extended\u0027:"},{"line_number":4281,"context_line":"                self._record_action_start(context, event.instance_uuid,"},{"line_number":4282,"context_line":"                                          instance_actions.EXTEND_VOLUME)"},{"line_number":4283,"context_line":"            for host in hosts_by_instance[event.instance_uuid]:"},{"line_number":4284,"context_line":"                events_by_host[host].append(event)"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f1d235d_53a04c90","line":4281,"updated":"2017-07-06 13:19:06.000000000","message":"I think I\u0027ve mentioned this before, maybe it was elsewhere, but as I was writing the Tempest test\n\nhttps://review.openstack.org/#/c/480746/\n\nI realized how the end user can\u0027t tell when this operation is complete. By default the end-user can list instance actions but they can\u0027t view the event details, and that\u0027s how you tell when it\u0027s complete. We hide the events from non-admins since they can contain tracebacks with internal details that we want to hide from end users normally, like instance faults.\n\nI was thinking we could get the end user to track this if we set a task_state on the instance from the API before we return to the API caller, with a value of \"extending_volume\" or something. Once everything is complete on the compute manager side, we set the task_state to None to indicate we\u0027re done.\n\nThere are pros/cons to this:\n\n1. If we set the task_state, it indicates there is some operation happening to the instance and other actions can be rejected until the task is complete. For example, the stop API.\n\n2. Conversely, if the task_state is already set when the volume-extended event happens from Cinder, we\u0027ll fail to set the task_state on this instance and it will raise an UnexpectedTaskStateError from the DB API. What do we do in that case? Fail in the API and return a 400 to the caller? Or just record a fault and skip this event?\n\n--\n\nI\u0027d like to discuss this with the wider nova dev team so I\u0027ll probably start something in the dev mailing list and/or bring this up in today\u0027s nova meeting.","commit_id":"8e61e1d2ab69895a1d6197175f947cd5c071b03b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7be8661d323d7834b0a22f9e04ff285bd7591051","unresolved":false,"context_lines":[{"line_number":4278,"context_line":""},{"line_number":4279,"context_line":"        for event in events:"},{"line_number":4280,"context_line":"            if event.name \u003d\u003d \u0027volume-extended\u0027:"},{"line_number":4281,"context_line":"                self._record_action_start(context, event.instance_uuid,"},{"line_number":4282,"context_line":"                                          instance_actions.EXTEND_VOLUME)"},{"line_number":4283,"context_line":"            for host in hosts_by_instance[event.instance_uuid]:"},{"line_number":4284,"context_line":"                events_by_host[host].append(event)"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f1d235d_d6c9e025","line":4281,"range":{"start_line":4281,"start_character":51,"end_line":4281,"end_character":70},"updated":"2017-07-06 17:56:11.000000000","message":"This is the wrong parameter type, it\u0027s expecting an Instance object:\n\nhttp://logs.openstack.org/78/480778/2/check/gate-tempest-dsvm-neutron-full-ubuntu-xenial/1c189c5/logs/screen-n-api.txt.gz#_Jul_06_15_38_21_960603\n\nso it does instance.uuid - we\u0027ll have to fix something here.","commit_id":"8e61e1d2ab69895a1d6197175f947cd5c071b03b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d48d1b3d65ee73aec8b7915ed1e62726c63ae6d0","unresolved":false,"context_lines":[{"line_number":4278,"context_line":""},{"line_number":4279,"context_line":"        for event in events:"},{"line_number":4280,"context_line":"            if event.name \u003d\u003d \u0027volume-extended\u0027:"},{"line_number":4281,"context_line":"                self._record_action_start(context, event.instance_uuid,"},{"line_number":4282,"context_line":"                                          instance_actions.EXTEND_VOLUME)"},{"line_number":4283,"context_line":"            for host in hosts_by_instance[event.instance_uuid]:"},{"line_number":4284,"context_line":"                events_by_host[host].append(event)"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f1d235d_5bfce23c","line":4281,"in_reply_to":"3f1d235d_53a04c90","updated":"2017-07-06 14:30:29.000000000","message":"I talked with Dan Smith in IRC, the full conversation is logged here:\n\n\n\nWe came down to four options:\n\n1. Do nothing - the end API user can see the instance action but not the events by default policy. Maybe that\u0027s OK, we don\u0027t really know how people are going to use this.\n\n2. We don\u0027t currently ever call InstanceAction.action_finish to actually \u0027finish\u0027 an action and set it\u0027s finish_time record, nor do we expose the action.finish_time in the os-instance-actions REST API. We could start doing that in the same microversion we have here.\n\n3. In the same microversion as this change, expose the instance action events but still hide the \u0027traceback\u0027 field by default policy from non-admins, just like we do for instance faults in the REST API.\n\n4. Add a new task_state for modeling this.\n\n--\n\n#1 is easy for us, since we don\u0027t have to do anything, but sucks for API user experience.\n\n#2 is cleaner but a much bigger change, and you\u0027d start having older actions that are actually finished now start showing up looking like they aren\u0027t finished in the API - we\u0027d have to do some sort of data migration for those (maybe find all of the events for a given action and take the latest event finish_time and use that?).\n\n#3 is probably the easiest since it\u0027s just fiddling the logic in the instance actions show() API method a bit based on a microversion so we expose certain fields or not.\n\n#4 gets complicated because it\u0027d be adding something new to the internal \u0027state machine\u0027 and is easy to get wrong, or miss in which cases it\u0027s OK to extend a volume and when it\u0027s not - vm_state would actually be better for that if we had a new one, but we aren\u0027t going to do that. Plus if we set a new task_state for this operation, it really starts to overload the os-server-external-events API function and simple utility, and I think we\u0027d need to consider not using it for this and instead create a full blown server admin action API for volume extend - something which would be a big change at this point and put the patch at risk of not making the Pike release.\n\n--\n\nSo to conclude, the lesser of all evils is option #3 so I can help to start working on that in this change if you want.","commit_id":"8e61e1d2ab69895a1d6197175f947cd5c071b03b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c7c3fce20458762140d18844d3a6da20d664823f","unresolved":false,"context_lines":[{"line_number":4278,"context_line":""},{"line_number":4279,"context_line":"        for event in events:"},{"line_number":4280,"context_line":"            if event.name \u003d\u003d \u0027volume-extended\u0027:"},{"line_number":4281,"context_line":"                self._record_action_start(context, event.instance_uuid,"},{"line_number":4282,"context_line":"                                          instance_actions.EXTEND_VOLUME)"},{"line_number":4283,"context_line":"            for host in hosts_by_instance[event.instance_uuid]:"},{"line_number":4284,"context_line":"                events_by_host[host].append(event)"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f1d235d_fbc3aeeb","line":4281,"in_reply_to":"3f1d235d_5bfce23c","updated":"2017-07-06 14:31:23.000000000","message":"\u003e I talked with Dan Smith in IRC, the full conversation is logged here:\n\nhttp://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2017-07-06.log.html#t2017-07-06T14:04:39","commit_id":"8e61e1d2ab69895a1d6197175f947cd5c071b03b"}],"nova/compute/instance_actions.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2ad7f94d3008ecb1f834ecfb2ecb320ad27b59ae","unresolved":false,"context_lines":[{"line_number":52,"context_line":"LIVE_MIGRATION_CANCEL \u003d \u0027live_migration_cancel\u0027"},{"line_number":53,"context_line":"LIVE_MIGRATION_FORCE_COMPLETE \u003d \u0027live_migration_force_complete\u0027"},{"line_number":54,"context_line":"TRIGGER_CRASH_DUMP \u003d \u0027trigger_crash_dump\u0027"},{"line_number":55,"context_line":"EXTEND_VOLUME \u003d \u0027extend_volume\u0027"}],"source_content_type":"text/x-python","patch_set":23,"id":"3f1d235d_547856c2","line":55,"updated":"2017-07-05 18:57:10.000000000","message":"We should probably have a comment in here explaining that this isn\u0027t a normal instance action per the usual server actions APIs defined in https://developer.openstack.org/api-ref/compute/?expanded\u003d#servers-run-an-action-servers-action - this is for a cinder-initiated server event API call when an attached volume is resized. Since it\u0027s an asynchronous action on the server, we use the instance actions framework for helping the end user / admin track the operation to completion on the compute side.","commit_id":"517aef156aa98ff20970878b8d7892eb482d00fb"}],"nova/compute/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"58ae3689409d31ec23b921cb79358dd02d366c01","unresolved":false,"context_lines":[{"line_number":6776,"context_line":"        LOG.debug(\u0027Handling volume-extended event for volume %(vol)s\u0027,"},{"line_number":6777,"context_line":"                  {\u0027vol\u0027: extended_volume_id}, instance\u003dinstance)"},{"line_number":6778,"context_line":""},{"line_number":6779,"context_line":"        if extended_volume_id is None:"},{"line_number":6780,"context_line":"            LOG.warning(_LW(\u0027Unexpected attempt to extend volume \u0027"},{"line_number":6781,"context_line":"                            \u0027without providing the volume_id.\u0027))"},{"line_number":6782,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_7e698423","line":6779,"updated":"2017-04-24 21:00:57.000000000","message":"This is a good check since we don\u0027t enforce that tag is required in the API schema unfortunately:\n\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/compute/schemas/server_external_events.py#L40","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"c567f7fa35eb6d4963fc8c82fc570198df3ed86c","unresolved":false,"context_lines":[{"line_number":6776,"context_line":"        LOG.debug(\u0027Handling volume-extended event for volume %(vol)s\u0027,"},{"line_number":6777,"context_line":"                  {\u0027vol\u0027: extended_volume_id}, instance\u003dinstance)"},{"line_number":6778,"context_line":""},{"line_number":6779,"context_line":"        if extended_volume_id is None:"},{"line_number":6780,"context_line":"            LOG.warning(_LW(\u0027Unexpected attempt to extend volume \u0027"},{"line_number":6781,"context_line":"                            \u0027without providing the volume_id.\u0027))"},{"line_number":6782,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_34bc3d04","line":6779,"in_reply_to":"5ff73747_7e698423","updated":"2017-04-25 01:05:09.000000000","message":"Good to know. Should it be checked earlier at the API level? Or is the manager the right place since this code path could be reached from somewhere else?","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"58ae3689409d31ec23b921cb79358dd02d366c01","unresolved":false,"context_lines":[{"line_number":6777,"context_line":"                  {\u0027vol\u0027: extended_volume_id}, instance\u003dinstance)"},{"line_number":6778,"context_line":""},{"line_number":6779,"context_line":"        if extended_volume_id is None:"},{"line_number":6780,"context_line":"            LOG.warning(_LW(\u0027Unexpected attempt to extend volume \u0027"},{"line_number":6781,"context_line":"                            \u0027without providing the volume_id.\u0027))"},{"line_number":6782,"context_line":"            return"},{"line_number":6783,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_1e62803f","line":6780,"range":{"start_line":6780,"start_character":24,"end_line":6780,"end_character":27},"updated":"2017-04-24 21:00:57.000000000","message":"We don\u0027t use these translation markers anymore.","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"c567f7fa35eb6d4963fc8c82fc570198df3ed86c","unresolved":false,"context_lines":[{"line_number":6777,"context_line":"                  {\u0027vol\u0027: extended_volume_id}, instance\u003dinstance)"},{"line_number":6778,"context_line":""},{"line_number":6779,"context_line":"        if extended_volume_id is None:"},{"line_number":6780,"context_line":"            LOG.warning(_LW(\u0027Unexpected attempt to extend volume \u0027"},{"line_number":6781,"context_line":"                            \u0027without providing the volume_id.\u0027))"},{"line_number":6782,"context_line":"            return"},{"line_number":6783,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_39b55632","line":6780,"range":{"start_line":6780,"start_character":24,"end_line":6780,"end_character":27},"in_reply_to":"5ff73747_1e62803f","updated":"2017-04-25 01:05:09.000000000","message":"Done","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"58ae3689409d31ec23b921cb79358dd02d366c01","unresolved":false,"context_lines":[{"line_number":6781,"context_line":"                            \u0027without providing the volume_id.\u0027))"},{"line_number":6782,"context_line":"            return"},{"line_number":6783,"context_line":""},{"line_number":6784,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("},{"line_number":6785,"context_line":"                context, instance.uuid)"},{"line_number":6786,"context_line":""},{"line_number":6787,"context_line":"        for bdm in bdms:"},{"line_number":6788,"context_line":"            if bdm.volume_id \u003d\u003d extended_volume_id:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_1ec72015","line":6785,"range":{"start_line":6784,"start_character":8,"end_line":6785,"end_character":39},"updated":"2017-04-24 21:00:57.000000000","message":"Use objects.BlockDeviceMapping.get_by_volume_and_instance instead to get the single BDM you need.","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"c567f7fa35eb6d4963fc8c82fc570198df3ed86c","unresolved":false,"context_lines":[{"line_number":6781,"context_line":"                            \u0027without providing the volume_id.\u0027))"},{"line_number":6782,"context_line":"            return"},{"line_number":6783,"context_line":""},{"line_number":6784,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("},{"line_number":6785,"context_line":"                context, instance.uuid)"},{"line_number":6786,"context_line":""},{"line_number":6787,"context_line":"        for bdm in bdms:"},{"line_number":6788,"context_line":"            if bdm.volume_id \u003d\u003d extended_volume_id:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_596dc296","line":6785,"range":{"start_line":6784,"start_character":8,"end_line":6785,"end_character":39},"in_reply_to":"5ff73747_1ec72015","updated":"2017-04-25 01:05:09.000000000","message":"Done","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"58ae3689409d31ec23b921cb79358dd02d366c01","unresolved":false,"context_lines":[{"line_number":6786,"context_line":""},{"line_number":6787,"context_line":"        for bdm in bdms:"},{"line_number":6788,"context_line":"            if bdm.volume_id \u003d\u003d extended_volume_id:"},{"line_number":6789,"context_line":"                LOG.info(_LI(\u0027Cinder extended volume %(vol)s; \u0027"},{"line_number":6790,"context_line":"                             \u0027extending it to detect new size\u0027),"},{"line_number":6791,"context_line":"                         {\u0027vol\u0027: bdm.volume_id},"},{"line_number":6792,"context_line":"                         instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_9eda10e7","line":6789,"range":{"start_line":6789,"start_character":25,"end_line":6789,"end_character":28},"updated":"2017-04-24 21:00:57.000000000","message":"remove _LI usage","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"c567f7fa35eb6d4963fc8c82fc570198df3ed86c","unresolved":false,"context_lines":[{"line_number":6786,"context_line":""},{"line_number":6787,"context_line":"        for bdm in bdms:"},{"line_number":6788,"context_line":"            if bdm.volume_id \u003d\u003d extended_volume_id:"},{"line_number":6789,"context_line":"                LOG.info(_LI(\u0027Cinder extended volume %(vol)s; \u0027"},{"line_number":6790,"context_line":"                             \u0027extending it to detect new size\u0027),"},{"line_number":6791,"context_line":"                         {\u0027vol\u0027: bdm.volume_id},"},{"line_number":6792,"context_line":"                         instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_19e97a19","line":6789,"range":{"start_line":6789,"start_character":25,"end_line":6789,"end_character":28},"in_reply_to":"5ff73747_9eda10e7","updated":"2017-04-25 01:05:09.000000000","message":"Done","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"58ae3689409d31ec23b921cb79358dd02d366c01","unresolved":false,"context_lines":[{"line_number":6791,"context_line":"                         {\u0027vol\u0027: bdm.volume_id},"},{"line_number":6792,"context_line":"                         instance\u003dinstance)"},{"line_number":6793,"context_line":"                volume \u003d self.volume_api.get(context, bdm.volume_id)"},{"line_number":6794,"context_line":"                bdm.update({\u0027volume_size\u0027: volume[\u0027size\u0027]})"},{"line_number":6795,"context_line":""},{"line_number":6796,"context_line":"                if bdm.connection_info is None:"},{"line_number":6797,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_5e9248f8","line":6794,"range":{"start_line":6794,"start_character":16,"end_line":6794,"end_character":59},"updated":"2017-04-24 21:00:57.000000000","message":"This doesn\u0027t persist the change in the BDM table. You\u0027d need to do:\n\n  bdm.volume_size \u003d volume[\u0027size\u0027]\n  bdm.save()\n\nAlso, do this after the connection_info check below.","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"c567f7fa35eb6d4963fc8c82fc570198df3ed86c","unresolved":false,"context_lines":[{"line_number":6791,"context_line":"                         {\u0027vol\u0027: bdm.volume_id},"},{"line_number":6792,"context_line":"                         instance\u003dinstance)"},{"line_number":6793,"context_line":"                volume \u003d self.volume_api.get(context, bdm.volume_id)"},{"line_number":6794,"context_line":"                bdm.update({\u0027volume_size\u0027: volume[\u0027size\u0027]})"},{"line_number":6795,"context_line":""},{"line_number":6796,"context_line":"                if bdm.connection_info is None:"},{"line_number":6797,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_99f90a82","line":6794,"range":{"start_line":6794,"start_character":16,"end_line":6794,"end_character":59},"in_reply_to":"5ff73747_5e9248f8","updated":"2017-04-25 01:05:09.000000000","message":"Done","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"58ae3689409d31ec23b921cb79358dd02d366c01","unresolved":false,"context_lines":[{"line_number":6793,"context_line":"                volume \u003d self.volume_api.get(context, bdm.volume_id)"},{"line_number":6794,"context_line":"                bdm.update({\u0027volume_size\u0027: volume[\u0027size\u0027]})"},{"line_number":6795,"context_line":""},{"line_number":6796,"context_line":"                if bdm.connection_info is None:"},{"line_number":6797,"context_line":"                    continue"},{"line_number":6798,"context_line":"                connection_info \u003d jsonutils.loads(bdm.connection_info)"},{"line_number":6799,"context_line":"                try:"},{"line_number":6800,"context_line":"                    self.driver.extend_volume(connection_info,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_9eb1f092","line":6797,"range":{"start_line":6796,"start_character":16,"end_line":6797,"end_character":28},"updated":"2017-04-24 21:00:57.000000000","message":"This is an error right? Or at least a warning, we shouldn\u0027t be extending the size of a volume and getting a notification from cinder if it\u0027s not attached, and if it\u0027s attached we should have connection_info.","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"c567f7fa35eb6d4963fc8c82fc570198df3ed86c","unresolved":false,"context_lines":[{"line_number":6793,"context_line":"                volume \u003d self.volume_api.get(context, bdm.volume_id)"},{"line_number":6794,"context_line":"                bdm.update({\u0027volume_size\u0027: volume[\u0027size\u0027]})"},{"line_number":6795,"context_line":""},{"line_number":6796,"context_line":"                if bdm.connection_info is None:"},{"line_number":6797,"context_line":"                    continue"},{"line_number":6798,"context_line":"                connection_info \u003d jsonutils.loads(bdm.connection_info)"},{"line_number":6799,"context_line":"                try:"},{"line_number":6800,"context_line":"                    self.driver.extend_volume(connection_info,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_b9396642","line":6797,"range":{"start_line":6796,"start_character":16,"end_line":6797,"end_character":28},"in_reply_to":"5ff73747_9eb1f092","updated":"2017-04-25 01:05:09.000000000","message":"Done. Let me know if the error handling is appropriate.","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"58ae3689409d31ec23b921cb79358dd02d366c01","unresolved":false,"context_lines":[{"line_number":6800,"context_line":"                    self.driver.extend_volume(connection_info,"},{"line_number":6801,"context_line":"                                              instance,"},{"line_number":6802,"context_line":"                                              bdm.device_name)"},{"line_number":6803,"context_line":"                except NotImplementedError:"},{"line_number":6804,"context_line":"                    LOG.debug(\u0027Hypervisor driver does not support \u0027"},{"line_number":6805,"context_line":"                              \u0027extend volume operation\u0027, instance\u003dinstance)"},{"line_number":6806,"context_line":"                except exception.NovaException as ex:"},{"line_number":6807,"context_line":"                    LOG.warning("},{"line_number":6808,"context_line":"                        _LW(\u0027Extend volume failed, \u0027"},{"line_number":6809,"context_line":"                            \u0027volume_id\u003d%(volume_id)s, reason: %(msg)s\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_fe50f434","line":6806,"range":{"start_line":6803,"start_character":16,"end_line":6806,"end_character":53},"updated":"2017-04-24 21:00:57.000000000","message":"I think this is where we start needing to ask about error handling, i.e. do we just record an instance fault, or do we fail and put the instance into ERROR state so the admin can investigate, fix the issue and reset the state to ACTIVE?\n\nexternal_instance_event uses wrap_exception but that just sends a notification about an error if one occurs.\n\nTaking the server pause action as an example, we should probably be doing something like using these same decorators on this method:\n\n    @reverts_task_state\n    @wrap_instance_event(prefix\u003d\u0027compute\u0027)\n    @wrap_instance_fault\n\nThe first will set the task_state on the instance to None if there is an error. Which means we should probably change the task_state on the instance at some point so someone doesn\u0027t try to delete the instance while we\u0027re extending the size of the volume in the virt driver. Ideally we\u0027d set the task_state in the API, but that leaks implementation details into the API for the generic server external events API, so maybe we just set the task_state here in the compute manager once we have a bdm and are about to call the virt driver method.\n\nwrap_instance_event will record an instance action event start/stop record, which is useful to know that some action was performed on the instance.\n\nAnd wrap_instance_fault will record an instance fault in case there is an error - so I think we should rely on that rather than swallowing exceptions in here. We could handle them and log them if you wanted, but I\u0027d still use exc_utils.save_and_reraise_exception() so the fault is recorded.","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"c567f7fa35eb6d4963fc8c82fc570198df3ed86c","unresolved":false,"context_lines":[{"line_number":6800,"context_line":"                    self.driver.extend_volume(connection_info,"},{"line_number":6801,"context_line":"                                              instance,"},{"line_number":6802,"context_line":"                                              bdm.device_name)"},{"line_number":6803,"context_line":"                except NotImplementedError:"},{"line_number":6804,"context_line":"                    LOG.debug(\u0027Hypervisor driver does not support \u0027"},{"line_number":6805,"context_line":"                              \u0027extend volume operation\u0027, instance\u003dinstance)"},{"line_number":6806,"context_line":"                except exception.NovaException as ex:"},{"line_number":6807,"context_line":"                    LOG.warning("},{"line_number":6808,"context_line":"                        _LW(\u0027Extend volume failed, \u0027"},{"line_number":6809,"context_line":"                            \u0027volume_id\u003d%(volume_id)s, reason: %(msg)s\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_f4edb525","line":6806,"range":{"start_line":6803,"start_character":16,"end_line":6806,"end_character":53},"in_reply_to":"5ff73747_fe50f434","updated":"2017-04-25 01:05:09.000000000","message":"Ok, my understanding of your suggestion is updating the task_state to reflect the work being done at the virt driver level. Which task_state value do you suggest we use? \"extending-volume\"?  Let me know so I can start exploring and learning how to add a new task_state.\n\nSo exc_utils.save_and_reraise_exception() is a helper used/leveraged by @wrap_instance_fault decorator? From my first read of the sources, it looks like reraising the exception is enough and @wrap_instance_fault will call exc_utils.save_and_reraise_exception() for you.\n\nI will go ahead and update with my understanding of your comment. Please let me know if I got anything wrong.\n\nI will add @reverts_task_state once we agree on a task_state.","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"58ae3689409d31ec23b921cb79358dd02d366c01","unresolved":false,"context_lines":[{"line_number":6805,"context_line":"                              \u0027extend volume operation\u0027, instance\u003dinstance)"},{"line_number":6806,"context_line":"                except exception.NovaException as ex:"},{"line_number":6807,"context_line":"                    LOG.warning("},{"line_number":6808,"context_line":"                        _LW(\u0027Extend volume failed, \u0027"},{"line_number":6809,"context_line":"                            \u0027volume_id\u003d%(volume_id)s, reason: %(msg)s\u0027),"},{"line_number":6810,"context_line":"                        {\u0027volume_id\u0027: extended_volume_id, \u0027msg\u0027: ex},"},{"line_number":6811,"context_line":"                        instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_5eab681c","line":6808,"range":{"start_line":6808,"start_character":24,"end_line":6808,"end_character":27},"updated":"2017-04-24 21:00:57.000000000","message":"remove _LW","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"c567f7fa35eb6d4963fc8c82fc570198df3ed86c","unresolved":false,"context_lines":[{"line_number":6805,"context_line":"                              \u0027extend volume operation\u0027, instance\u003dinstance)"},{"line_number":6806,"context_line":"                except exception.NovaException as ex:"},{"line_number":6807,"context_line":"                    LOG.warning("},{"line_number":6808,"context_line":"                        _LW(\u0027Extend volume failed, \u0027"},{"line_number":6809,"context_line":"                            \u0027volume_id\u003d%(volume_id)s, reason: %(msg)s\u0027),"},{"line_number":6810,"context_line":"                        {\u0027volume_id\u0027: extended_volume_id, \u0027msg\u0027: ex},"},{"line_number":6811,"context_line":"                        instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_1476e1a5","line":6808,"range":{"start_line":6808,"start_character":24,"end_line":6808,"end_character":27},"in_reply_to":"5ff73747_5eab681c","updated":"2017-04-25 01:05:09.000000000","message":"Done","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"58ae3689409d31ec23b921cb79358dd02d366c01","unresolved":false,"context_lines":[{"line_number":6847,"context_line":"                                                                 instance,"},{"line_number":6848,"context_line":"                                                                 event.tag)"},{"line_number":6849,"context_line":"                except exception.NotFound as e:"},{"line_number":6850,"context_line":"                    LOG.info(_LI(\u0027Failed to process external instance event \u0027"},{"line_number":6851,"context_line":"                                 \u0027%(event)s due to: %(error)s\u0027),"},{"line_number":6852,"context_line":"                             {\u0027event\u0027: event.key, \u0027error\u0027: six.text_type(e)},"},{"line_number":6853,"context_line":"                             instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_ded098cc","line":6850,"range":{"start_line":6850,"start_character":29,"end_line":6850,"end_character":32},"updated":"2017-04-24 21:00:57.000000000","message":"Don\u0027t use _LI anymore.","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"c567f7fa35eb6d4963fc8c82fc570198df3ed86c","unresolved":false,"context_lines":[{"line_number":6847,"context_line":"                                                                 instance,"},{"line_number":6848,"context_line":"                                                                 event.tag)"},{"line_number":6849,"context_line":"                except exception.NotFound as e:"},{"line_number":6850,"context_line":"                    LOG.info(_LI(\u0027Failed to process external instance event \u0027"},{"line_number":6851,"context_line":"                                 \u0027%(event)s due to: %(error)s\u0027),"},{"line_number":6852,"context_line":"                             {\u0027event\u0027: event.key, \u0027error\u0027: six.text_type(e)},"},{"line_number":6853,"context_line":"                             instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_14d2615d","line":6850,"range":{"start_line":6850,"start_character":29,"end_line":6850,"end_character":32},"in_reply_to":"5ff73747_ded098cc","updated":"2017-04-25 01:05:09.000000000","message":"Done","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":6850,"context_line":"        LOG.debug(\u0027Handling volume-extended event for volume %(vol)s\u0027,"},{"line_number":6851,"context_line":"                  {\u0027vol\u0027: extended_volume_id}, instance\u003dinstance)"},{"line_number":6852,"context_line":""},{"line_number":6853,"context_line":"        if extended_volume_id is None:"},{"line_number":6854,"context_line":"            LOG.warning(\u0027Unexpected attempt to extend volume \u0027"},{"line_number":6855,"context_line":"                        \u0027without providing the volume_id.\u0027)"},{"line_number":6856,"context_line":"            return"},{"line_number":6857,"context_line":""},{"line_number":6858,"context_line":"        try:"},{"line_number":6859,"context_line":"            bdm \u003d objects.BlockDeviceMapping.get_by_volume_and_instance("}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_7bc65719","line":6856,"range":{"start_line":6853,"start_character":8,"end_line":6856,"end_character":18},"updated":"2017-06-20 14:52:44.000000000","message":"We could check for this in the compute API and return a 400 to the caller if they forget the tag. Doing that in ServerExternalEventsController might be kind of messy unless we provide a private helper method.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":6850,"context_line":"        LOG.debug(\u0027Handling volume-extended event for volume %(vol)s\u0027,"},{"line_number":6851,"context_line":"                  {\u0027vol\u0027: extended_volume_id}, instance\u003dinstance)"},{"line_number":6852,"context_line":""},{"line_number":6853,"context_line":"        if extended_volume_id is None:"},{"line_number":6854,"context_line":"            LOG.warning(\u0027Unexpected attempt to extend volume \u0027"},{"line_number":6855,"context_line":"                        \u0027without providing the volume_id.\u0027)"},{"line_number":6856,"context_line":"            return"},{"line_number":6857,"context_line":""},{"line_number":6858,"context_line":"        try:"},{"line_number":6859,"context_line":"            bdm \u003d objects.BlockDeviceMapping.get_by_volume_and_instance("}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_04b14090","line":6856,"range":{"start_line":6853,"start_character":8,"end_line":6856,"end_character":18},"in_reply_to":"5f201791_7bc65719","updated":"2017-06-21 21:04:54.000000000","message":"Done. Moved validation to API.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":6867,"context_line":""},{"line_number":6868,"context_line":"        LOG.info(\u0027Cinder extended volume %(vol)s; \u0027"},{"line_number":6869,"context_line":"                 \u0027extending it to detect new size\u0027,"},{"line_number":6870,"context_line":"                 {\u0027vol\u0027: bdm.volume_id},"},{"line_number":6871,"context_line":"                 instance\u003dinstance)"},{"line_number":6872,"context_line":"        volume \u003d self.volume_api.get(context, bdm.volume_id)"},{"line_number":6873,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_3be9ff7f","line":6870,"range":{"start_line":6870,"start_character":25,"end_line":6870,"end_character":38},"updated":"2017-06-20 14:52:44.000000000","message":"nit: could just use extended_volume_id here.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":6867,"context_line":""},{"line_number":6868,"context_line":"        LOG.info(\u0027Cinder extended volume %(vol)s; \u0027"},{"line_number":6869,"context_line":"                 \u0027extending it to detect new size\u0027,"},{"line_number":6870,"context_line":"                 {\u0027vol\u0027: bdm.volume_id},"},{"line_number":6871,"context_line":"                 instance\u003dinstance)"},{"line_number":6872,"context_line":"        volume \u003d self.volume_api.get(context, bdm.volume_id)"},{"line_number":6873,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_c9efe1e7","line":6870,"range":{"start_line":6870,"start_character":25,"end_line":6870,"end_character":38},"in_reply_to":"5f201791_3be9ff7f","updated":"2017-06-21 21:04:54.000000000","message":"Done","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":6873,"context_line":""},{"line_number":6874,"context_line":"        if bdm.connection_info is None:"},{"line_number":6875,"context_line":"            LOG.warning(\u0027Extend volume failed, \u0027"},{"line_number":6876,"context_line":"                        \u0027attached volume %(vol)s has not connection_info\u0027,"},{"line_number":6877,"context_line":"                        {\u0027vol\u0027: bdm.volume_id},"},{"line_number":6878,"context_line":"                        instance\u003dinstance)"},{"line_number":6879,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_9bf9334f","line":6876,"range":{"start_line":6876,"start_character":53,"end_line":6876,"end_character":56},"updated":"2017-06-20 14:52:44.000000000","message":"no","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":6873,"context_line":""},{"line_number":6874,"context_line":"        if bdm.connection_info is None:"},{"line_number":6875,"context_line":"            LOG.warning(\u0027Extend volume failed, \u0027"},{"line_number":6876,"context_line":"                        \u0027attached volume %(vol)s has not connection_info\u0027,"},{"line_number":6877,"context_line":"                        {\u0027vol\u0027: bdm.volume_id},"},{"line_number":6878,"context_line":"                        instance\u003dinstance)"},{"line_number":6879,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_a9eca5f3","line":6876,"range":{"start_line":6876,"start_character":53,"end_line":6876,"end_character":56},"in_reply_to":"5f201791_9bf9334f","updated":"2017-06-21 21:04:54.000000000","message":"Done","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":6874,"context_line":"        if bdm.connection_info is None:"},{"line_number":6875,"context_line":"            LOG.warning(\u0027Extend volume failed, \u0027"},{"line_number":6876,"context_line":"                        \u0027attached volume %(vol)s has not connection_info\u0027,"},{"line_number":6877,"context_line":"                        {\u0027vol\u0027: bdm.volume_id},"},{"line_number":6878,"context_line":"                        instance\u003dinstance)"},{"line_number":6879,"context_line":"            return"},{"line_number":6880,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_fb02673e","line":6877,"range":{"start_line":6877,"start_character":32,"end_line":6877,"end_character":45},"updated":"2017-06-20 14:52:44.000000000","message":"extended_volume_id","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":6874,"context_line":"        if bdm.connection_info is None:"},{"line_number":6875,"context_line":"            LOG.warning(\u0027Extend volume failed, \u0027"},{"line_number":6876,"context_line":"                        \u0027attached volume %(vol)s has not connection_info\u0027,"},{"line_number":6877,"context_line":"                        {\u0027vol\u0027: bdm.volume_id},"},{"line_number":6878,"context_line":"                        instance\u003dinstance)"},{"line_number":6879,"context_line":"            return"},{"line_number":6880,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_e9cbbd6f","line":6877,"range":{"start_line":6877,"start_character":32,"end_line":6877,"end_character":45},"in_reply_to":"5f201791_fb02673e","updated":"2017-06-21 21:04:54.000000000","message":"Done","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":6885,"context_line":"        try:"},{"line_number":6886,"context_line":"            self.driver.extend_volume(connection_info,"},{"line_number":6887,"context_line":"                                      instance,"},{"line_number":6888,"context_line":"                                      bdm.device_name)"},{"line_number":6889,"context_line":"        except NotImplementedError:"},{"line_number":6890,"context_line":"            LOG.debug(\u0027Hypervisor driver does not support \u0027"},{"line_number":6891,"context_line":"                      \u0027extend volume operation\u0027, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_db720be4","line":6888,"range":{"start_line":6888,"start_character":38,"end_line":6888,"end_character":53},"updated":"2017-06-20 14:52:44.000000000","message":"Does this actually depend on the device name in the nova database and the guest being the same? Because the libvirt driver ignores any user-supplied device name since Liberty, and I\u0027ve heard reports that it\u0027s not always accurate for what shows up in the guest. There are probably other ways to identify the block device in the guest using the volume id or some other identifier. This might be OK for now, I\u0027m just wondering if it\u0027s going to always work.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":6885,"context_line":"        try:"},{"line_number":6886,"context_line":"            self.driver.extend_volume(connection_info,"},{"line_number":6887,"context_line":"                                      instance,"},{"line_number":6888,"context_line":"                                      bdm.device_name)"},{"line_number":6889,"context_line":"        except NotImplementedError:"},{"line_number":6890,"context_line":"            LOG.debug(\u0027Hypervisor driver does not support \u0027"},{"line_number":6891,"context_line":"                      \u0027extend volume operation\u0027, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_eaaa8bd0","line":6888,"range":{"start_line":6888,"start_character":38,"end_line":6888,"end_character":53},"in_reply_to":"5f201791_db720be4","updated":"2017-06-21 21:04:54.000000000","message":"It looks like the parameter is not actually used but was introduced to match the current interface of connect_volume and disconnect_volume.\n\nconnection_info[\u0027data\u0027] and connection_info[\u0027data\u0027][\u0027device_path\u0027] are actually used by the volume and virt driver.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"354a0a4b4ece0e4f4ecf24f2fb49562199cbac61","unresolved":false,"context_lines":[{"line_number":6885,"context_line":"        try:"},{"line_number":6886,"context_line":"            self.driver.extend_volume(connection_info,"},{"line_number":6887,"context_line":"                                      instance,"},{"line_number":6888,"context_line":"                                      bdm.device_name)"},{"line_number":6889,"context_line":"        except NotImplementedError:"},{"line_number":6890,"context_line":"            LOG.debug(\u0027Hypervisor driver does not support \u0027"},{"line_number":6891,"context_line":"                      \u0027extend volume operation\u0027, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_fb7c30ec","line":6888,"range":{"start_line":6888,"start_character":38,"end_line":6888,"end_character":53},"in_reply_to":"5f201791_eaaa8bd0","updated":"2017-06-28 02:28:52.000000000","message":"OK if it\u0027s not used and not needed I would drop it.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":6886,"context_line":"            self.driver.extend_volume(connection_info,"},{"line_number":6887,"context_line":"                                      instance,"},{"line_number":6888,"context_line":"                                      bdm.device_name)"},{"line_number":6889,"context_line":"        except NotImplementedError:"},{"line_number":6890,"context_line":"            LOG.debug(\u0027Hypervisor driver does not support \u0027"},{"line_number":6891,"context_line":"                      \u0027extend volume operation\u0027, instance\u003dinstance)"},{"line_number":6892,"context_line":"        except Exception as ex:"},{"line_number":6893,"context_line":"            LOG.warning(\u0027Extend volume failed, \u0027"},{"line_number":6894,"context_line":"                       \u0027volume_id\u003d%(volume_id)s, reason: %(msg)s\u0027,"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_bb062f20","line":6891,"range":{"start_line":6889,"start_character":8,"end_line":6891,"end_character":67},"updated":"2017-06-20 14:52:44.000000000","message":"This is where my question about putting a capabilities flag in the driver class comes in. At this point we\u0027ve updated the size on the bdm to match what the volume size is in Cinder, but we can\u0027t actually extend the size of the block device in the guest because the hypervisor driver doesn\u0027t support it. This should be more than a debug statement I\u0027d think since the admin/user are going to need to know that they have to do something manually to refresh the guest - I think you said you could reboot the guest and that would do it?\n\nThe wrap_instance_event decorator will record a start/end event and if it failed it will record it as failed, but to get that you need to raise an exception:\n\nhttps://github.com/openstack/nova/blob/9045a98145f0834446d668e0282ddb1c6f2d136c/nova/compute/utils.py#L708\n\nSo I was thinking we could raise a new type of exception after checking the driver capabilities flag, like VolumeExtendNotSupported or something, and then that would get recorded as the event finish with failure event.\n\nI think the question is if we do that before or after we update the bdm.volume_size field. I suppose we might as well do it after we update the BDM record because it\u0027s been updated in Cinder and we can\u0027t roll that back at this point since we\u0027ve already returned to the REST API caller. Plus if the VolumeExtendNotSupported exception message says to reboot the guest to make the change, then we still want our BDM record to be accurate.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":6886,"context_line":"            self.driver.extend_volume(connection_info,"},{"line_number":6887,"context_line":"                                      instance,"},{"line_number":6888,"context_line":"                                      bdm.device_name)"},{"line_number":6889,"context_line":"        except NotImplementedError:"},{"line_number":6890,"context_line":"            LOG.debug(\u0027Hypervisor driver does not support \u0027"},{"line_number":6891,"context_line":"                      \u0027extend volume operation\u0027, instance\u003dinstance)"},{"line_number":6892,"context_line":"        except Exception as ex:"},{"line_number":6893,"context_line":"            LOG.warning(\u0027Extend volume failed, \u0027"},{"line_number":6894,"context_line":"                       \u0027volume_id\u003d%(volume_id)s, reason: %(msg)s\u0027,"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_0a126759","line":6891,"range":{"start_line":6889,"start_character":8,"end_line":6891,"end_character":67},"in_reply_to":"5f201791_bb062f20","updated":"2017-06-21 21:04:54.000000000","message":"Done.\n* Implemented the driver capabilities flag.\n* Now raising VolumeExtendNotSupported if capability is missing\n\nYou still need to rescan the iSCSI target on the host for the new size to be detected. I can\u0027t remember if performing a \"nova reboot\" is enough for the iSCSI target to be recreated or if \"nova reboot --hard\" is required.\n\nI will propose a first implementation so people can comment on it.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":6891,"context_line":"                      \u0027extend volume operation\u0027, instance\u003dinstance)"},{"line_number":6892,"context_line":"        except Exception as ex:"},{"line_number":6893,"context_line":"            LOG.warning(\u0027Extend volume failed, \u0027"},{"line_number":6894,"context_line":"                       \u0027volume_id\u003d%(volume_id)s, reason: %(msg)s\u0027,"},{"line_number":6895,"context_line":"                       {\u0027volume_id\u0027: extended_volume_id, \u0027msg\u0027: ex},"},{"line_number":6896,"context_line":"                       instance\u003dinstance)"},{"line_number":6897,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_1ebab1dd","line":6894,"range":{"start_line":6894,"start_character":23,"end_line":6894,"end_character":24},"updated":"2017-06-20 14:52:44.000000000","message":"nit: alignment","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":6891,"context_line":"                      \u0027extend volume operation\u0027, instance\u003dinstance)"},{"line_number":6892,"context_line":"        except Exception as ex:"},{"line_number":6893,"context_line":"            LOG.warning(\u0027Extend volume failed, \u0027"},{"line_number":6894,"context_line":"                       \u0027volume_id\u003d%(volume_id)s, reason: %(msg)s\u0027,"},{"line_number":6895,"context_line":"                       {\u0027volume_id\u0027: extended_volume_id, \u0027msg\u0027: ex},"},{"line_number":6896,"context_line":"                       instance\u003dinstance)"},{"line_number":6897,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_e9905d51","line":6894,"range":{"start_line":6894,"start_character":23,"end_line":6894,"end_character":24},"in_reply_to":"5f201791_1ebab1dd","updated":"2017-06-21 21:04:54.000000000","message":"Done","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":6933,"context_line":"                                                                 event.tag)"},{"line_number":6934,"context_line":"                except exception.NotFound as e:"},{"line_number":6935,"context_line":"                    LOG.info(\u0027Failed to process external instance event \u0027"},{"line_number":6936,"context_line":"                                 \u0027%(event)s due to: %(error)s\u0027,"},{"line_number":6937,"context_line":"                             {\u0027event\u0027: event.key, \u0027error\u0027: six.text_type(e)},"},{"line_number":6938,"context_line":"                             instance\u003dinstance)"},{"line_number":6939,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_9bd6d3f1","line":6936,"range":{"start_line":6936,"start_character":29,"end_line":6936,"end_character":33},"updated":"2017-06-20 14:52:44.000000000","message":"alignment is off here","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":6933,"context_line":"                                                                 event.tag)"},{"line_number":6934,"context_line":"                except exception.NotFound as e:"},{"line_number":6935,"context_line":"                    LOG.info(\u0027Failed to process external instance event \u0027"},{"line_number":6936,"context_line":"                                 \u0027%(event)s due to: %(error)s\u0027,"},{"line_number":6937,"context_line":"                             {\u0027event\u0027: event.key, \u0027error\u0027: six.text_type(e)},"},{"line_number":6938,"context_line":"                             instance\u003dinstance)"},{"line_number":6939,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_698e8d2f","line":6936,"range":{"start_line":6936,"start_character":29,"end_line":6936,"end_character":33},"in_reply_to":"5f201791_9bd6d3f1","updated":"2017-06-21 21:04:54.000000000","message":"Done","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d6a85bc03209dcb3d9a06191d7e4418e659ab52c","unresolved":false,"context_lines":[{"line_number":6877,"context_line":"        bdm.volume_size \u003d volume[\u0027size\u0027]"},{"line_number":6878,"context_line":"        bdm.save()"},{"line_number":6879,"context_line":""},{"line_number":6880,"context_line":"        if not self.driver.capabilities.get(\u0027supports_extend_volume\u0027):"},{"line_number":6881,"context_line":"            raise exception.ExtendVolumeNotSupported("},{"line_number":6882,"context_line":"                instance_uuid\u003dinstance.uuid)"},{"line_number":6883,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_1b7a4cf0","line":6880,"range":{"start_line":6880,"start_character":40,"end_line":6880,"end_character":43},"updated":"2017-06-23 20:08:38.000000000","message":"Let\u0027s default to False if the key isn\u0027t in the capabilities dict, which will be the case for several drivers that override the capabilities dict (Ironic, XenAPI, Hyperv, etc).","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"5563f9f91f30240b97cfd1bd797ad3a424f9ee01","unresolved":false,"context_lines":[{"line_number":6877,"context_line":"        bdm.volume_size \u003d volume[\u0027size\u0027]"},{"line_number":6878,"context_line":"        bdm.save()"},{"line_number":6879,"context_line":""},{"line_number":6880,"context_line":"        if not self.driver.capabilities.get(\u0027supports_extend_volume\u0027):"},{"line_number":6881,"context_line":"            raise exception.ExtendVolumeNotSupported("},{"line_number":6882,"context_line":"                instance_uuid\u003dinstance.uuid)"},{"line_number":6883,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_aaef2ee7","line":6880,"range":{"start_line":6880,"start_character":40,"end_line":6880,"end_character":43},"in_reply_to":"5f201791_1b7a4cf0","updated":"2017-06-27 21:29:52.000000000","message":"Done. I based my implementation on existing ones. Maybe those should be fixed too in a different change so people don\u0027t make the same mistake.","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d74ea7fbc8af1a6bb3b7dabbaa1d0c084cf2b66f","unresolved":false,"context_lines":[{"line_number":6877,"context_line":"        bdm.volume_size \u003d volume[\u0027size\u0027]"},{"line_number":6878,"context_line":"        bdm.save()"},{"line_number":6879,"context_line":""},{"line_number":6880,"context_line":"        if not self.driver.capabilities.get(\u0027supports_extend_volume\u0027):"},{"line_number":6881,"context_line":"            raise exception.ExtendVolumeNotSupported("},{"line_number":6882,"context_line":"                instance_uuid\u003dinstance.uuid)"},{"line_number":6883,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_587506f9","line":6880,"range":{"start_line":6880,"start_character":40,"end_line":6880,"end_character":43},"in_reply_to":"5f201791_aaef2ee7","updated":"2017-06-28 02:35:04.000000000","message":"The other flags are overridden in the virt drivers, like xen and ironic, so that\u0027s probably why they don\u0027t provide a default value.","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d6a85bc03209dcb3d9a06191d7e4418e659ab52c","unresolved":false,"context_lines":[{"line_number":6879,"context_line":""},{"line_number":6880,"context_line":"        if not self.driver.capabilities.get(\u0027supports_extend_volume\u0027):"},{"line_number":6881,"context_line":"            raise exception.ExtendVolumeNotSupported("},{"line_number":6882,"context_line":"                instance_uuid\u003dinstance.uuid)"},{"line_number":6883,"context_line":""},{"line_number":6884,"context_line":"        try:"},{"line_number":6885,"context_line":"            self.driver.extend_volume(connection_info,"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_7bd6e0c5","line":6882,"range":{"start_line":6882,"start_character":16,"end_line":6882,"end_character":43},"updated":"2017-06-23 20:08:38.000000000","message":"Did you mean to use this in the exception message as a parameter? Because it doesn\u0027t use it.","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"5563f9f91f30240b97cfd1bd797ad3a424f9ee01","unresolved":false,"context_lines":[{"line_number":6879,"context_line":""},{"line_number":6880,"context_line":"        if not self.driver.capabilities.get(\u0027supports_extend_volume\u0027):"},{"line_number":6881,"context_line":"            raise exception.ExtendVolumeNotSupported("},{"line_number":6882,"context_line":"                instance_uuid\u003dinstance.uuid)"},{"line_number":6883,"context_line":""},{"line_number":6884,"context_line":"        try:"},{"line_number":6885,"context_line":"            self.driver.extend_volume(connection_info,"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_cacdca85","line":6882,"range":{"start_line":6882,"start_character":16,"end_line":6882,"end_character":43},"in_reply_to":"5f201791_7bd6e0c5","updated":"2017-06-27 21:29:52.000000000","message":"Done. Removed parameter.","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d6a85bc03209dcb3d9a06191d7e4418e659ab52c","unresolved":false,"context_lines":[{"line_number":6884,"context_line":"        try:"},{"line_number":6885,"context_line":"            self.driver.extend_volume(connection_info,"},{"line_number":6886,"context_line":"                                      instance,"},{"line_number":6887,"context_line":"                                      bdm.device_name)"},{"line_number":6888,"context_line":"        except Exception as ex:"},{"line_number":6889,"context_line":"            LOG.warning(\u0027Extend volume failed, \u0027"},{"line_number":6890,"context_line":"                        \u0027volume_id\u003d%(volume_id)s, reason: %(msg)s\u0027,"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_5b77a403","line":6887,"range":{"start_line":6887,"start_character":38,"end_line":6887,"end_character":53},"updated":"2017-06-23 20:08:38.000000000","message":"If this is not used and not needed by the volume driver interface, I\u0027d drop it to avoid confusion in the lower layer.","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"5563f9f91f30240b97cfd1bd797ad3a424f9ee01","unresolved":false,"context_lines":[{"line_number":6884,"context_line":"        try:"},{"line_number":6885,"context_line":"            self.driver.extend_volume(connection_info,"},{"line_number":6886,"context_line":"                                      instance,"},{"line_number":6887,"context_line":"                                      bdm.device_name)"},{"line_number":6888,"context_line":"        except Exception as ex:"},{"line_number":6889,"context_line":"            LOG.warning(\u0027Extend volume failed, \u0027"},{"line_number":6890,"context_line":"                        \u0027volume_id\u003d%(volume_id)s, reason: %(msg)s\u0027,"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_ea8086f7","line":6887,"range":{"start_line":6887,"start_character":38,"end_line":6887,"end_character":53},"in_reply_to":"5f201791_5b77a403","updated":"2017-06-27 21:29:52.000000000","message":"Done","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d6a85bc03209dcb3d9a06191d7e4418e659ab52c","unresolved":false,"context_lines":[{"line_number":6927,"context_line":"                    self._process_instance_volume_extended_event(context,"},{"line_number":6928,"context_line":"                                                                 instance,"},{"line_number":6929,"context_line":"                                                                 event.tag)"},{"line_number":6930,"context_line":"                except exception.NotFound as e:"},{"line_number":6931,"context_line":"                    LOG.info(\u0027Failed to process external instance event \u0027"},{"line_number":6932,"context_line":"                             \u0027%(event)s due to: %(error)s\u0027,"},{"line_number":6933,"context_line":"                             {\u0027event\u0027: event.key, \u0027error\u0027: six.text_type(e)},"},{"line_number":6934,"context_line":"                             instance\u003dinstance)"},{"line_number":6935,"context_line":"            else:"},{"line_number":6936,"context_line":"                self._process_instance_event(instance, event)"},{"line_number":6937,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_5b81e48e","line":6934,"range":{"start_line":6930,"start_character":16,"end_line":6934,"end_character":47},"updated":"2017-06-23 20:08:38.000000000","message":"I\u0027m not sure how much we actually need to care about handling InstanceNotFound here. I think you\u0027re just copying this from above, but those are for specific reasons - we could be racing with neutron when deleting an instance and neutron sends the network-vif-deleted event because nova is deleting the instance and has deleted the port it created, so we just ignore not found in those cases. But in the case of extending a volume attached to a server, we don\u0027t expect the instance to be gone here, so I wouldn\u0027t catch this and log it at INFO since it\u0027s really an unexpected error.","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"5563f9f91f30240b97cfd1bd797ad3a424f9ee01","unresolved":false,"context_lines":[{"line_number":6927,"context_line":"                    self._process_instance_volume_extended_event(context,"},{"line_number":6928,"context_line":"                                                                 instance,"},{"line_number":6929,"context_line":"                                                                 event.tag)"},{"line_number":6930,"context_line":"                except exception.NotFound as e:"},{"line_number":6931,"context_line":"                    LOG.info(\u0027Failed to process external instance event \u0027"},{"line_number":6932,"context_line":"                             \u0027%(event)s due to: %(error)s\u0027,"},{"line_number":6933,"context_line":"                             {\u0027event\u0027: event.key, \u0027error\u0027: six.text_type(e)},"},{"line_number":6934,"context_line":"                             instance\u003dinstance)"},{"line_number":6935,"context_line":"            else:"},{"line_number":6936,"context_line":"                self._process_instance_event(instance, event)"},{"line_number":6937,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_055cd5ea","line":6934,"range":{"start_line":6930,"start_character":16,"end_line":6934,"end_character":47},"in_reply_to":"5f201791_5b81e48e","updated":"2017-06-27 21:29:52.000000000","message":"Done","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8ff822c3dce28adc887ff836e81e51a290e2abd1","unresolved":false,"context_lines":[{"line_number":6840,"context_line":"                                instance\u003dinstance)"},{"line_number":6841,"context_line":"                break"},{"line_number":6842,"context_line":""},{"line_number":6843,"context_line":"    @wrap_instance_event(prefix\u003d\u0027compute\u0027)"},{"line_number":6844,"context_line":"    @wrap_instance_fault"},{"line_number":6845,"context_line":"    def _process_instance_volume_extended_event(self, context, instance,"},{"line_number":6846,"context_line":"                                                extended_volume_id):"}],"source_content_type":"text/x-python","patch_set":22,"id":"5f201791_3807c51b","line":6843,"range":{"start_line":6843,"start_character":5,"end_line":6843,"end_character":24},"updated":"2017-06-28 23:00:51.000000000","message":"This came up in the related cinder change, about how we can test this scenario using Tempest. I suggested a test but the problem is on the nova side, how we determine when the operation is complete. We can use instance actions for that, but we aren\u0027t recording an instance action in the API for this operation, only the events.\n\nInstance actions usually get recorded in the nova.compute.api.API code and is for things on the server actions API, like \"resize\" action:\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/compute/api.py#n280\n\nWhen recording an event, the nova db api code looks up a corresponding action by request id and if it can\u0027t find it, it associates the last recorded action for the instance, which is probably wrong in this case. This is something we should fix so we can poll the os-instance-actions API for this instance in a Tempest test to tell when we\u0027re done handling the extend volume event on the nova side.\n\nI think we could just call this from the compute manager code here:\n\nobjects.InstanceAction.action_start(context, instance.uuid,\n                                            action, want_result\u003dFalse)\n\nThe action should probably be \"extend_volume\" to match what would be in the instance action event - if we rename the method here to extend_volume as suggested below.","commit_id":"bd083fb506de314aa397beb085aa14f3ec7c77b5"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"83cd1ced6dc5f211cb2783d2af2d38c2335a4a31","unresolved":false,"context_lines":[{"line_number":6840,"context_line":"                                instance\u003dinstance)"},{"line_number":6841,"context_line":"                break"},{"line_number":6842,"context_line":""},{"line_number":6843,"context_line":"    @wrap_instance_event(prefix\u003d\u0027compute\u0027)"},{"line_number":6844,"context_line":"    @wrap_instance_fault"},{"line_number":6845,"context_line":"    def _process_instance_volume_extended_event(self, context, instance,"},{"line_number":6846,"context_line":"                                                extended_volume_id):"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f1d235d_3c1cc776","line":6843,"range":{"start_line":6843,"start_character":5,"end_line":6843,"end_character":24},"in_reply_to":"5f201791_3807c51b","updated":"2017-07-05 00:05:39.000000000","message":"Done","commit_id":"bd083fb506de314aa397beb085aa14f3ec7c77b5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8ff822c3dce28adc887ff836e81e51a290e2abd1","unresolved":false,"context_lines":[{"line_number":6842,"context_line":""},{"line_number":6843,"context_line":"    @wrap_instance_event(prefix\u003d\u0027compute\u0027)"},{"line_number":6844,"context_line":"    @wrap_instance_fault"},{"line_number":6845,"context_line":"    def _process_instance_volume_extended_event(self, context, instance,"},{"line_number":6846,"context_line":"                                                extended_volume_id):"},{"line_number":6847,"context_line":"        # If an attached volume is extended by cinder, it needs to"},{"line_number":6848,"context_line":"        # be extended by virt driver so host can detect its new size."}],"source_content_type":"text/x-python","patch_set":22,"id":"5f201791_d55adc4e","line":6845,"range":{"start_line":6845,"start_character":8,"end_line":6845,"end_character":47},"updated":"2017-06-28 23:00:51.000000000","message":"I know this is following a naming convention, but we should consider calling this extend_volume because of how wrap_instance_event works, it will create an action event with name \"compute_{method name}\" which would look odd in this case. \"compute_extend_volume\" would be better.","commit_id":"bd083fb506de314aa397beb085aa14f3ec7c77b5"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"83cd1ced6dc5f211cb2783d2af2d38c2335a4a31","unresolved":false,"context_lines":[{"line_number":6842,"context_line":""},{"line_number":6843,"context_line":"    @wrap_instance_event(prefix\u003d\u0027compute\u0027)"},{"line_number":6844,"context_line":"    @wrap_instance_fault"},{"line_number":6845,"context_line":"    def _process_instance_volume_extended_event(self, context, instance,"},{"line_number":6846,"context_line":"                                                extended_volume_id):"},{"line_number":6847,"context_line":"        # If an attached volume is extended by cinder, it needs to"},{"line_number":6848,"context_line":"        # be extended by virt driver so host can detect its new size."}],"source_content_type":"text/x-python","patch_set":22,"id":"3f1d235d_7c2c7fab","line":6845,"range":{"start_line":6845,"start_character":8,"end_line":6845,"end_character":47},"in_reply_to":"5f201791_d55adc4e","updated":"2017-07-05 00:05:39.000000000","message":"Done","commit_id":"bd083fb506de314aa397beb085aa14f3ec7c77b5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2ad7f94d3008ecb1f834ecfb2ecb320ad27b59ae","unresolved":false,"context_lines":[{"line_number":6886,"context_line":"    @wrap_instance_fault"},{"line_number":6887,"context_line":"    def extend_volume(self, context, instance, extended_volume_id):"},{"line_number":6888,"context_line":""},{"line_number":6889,"context_line":"        objects.InstanceAction.action_start(context, instance.uuid,"},{"line_number":6890,"context_line":"                                            instance_actions.EXTEND_VOLUME,"},{"line_number":6891,"context_line":"                                            want_result\u003dFalse)"},{"line_number":6892,"context_line":""},{"line_number":6893,"context_line":"        # If an attached volume is extended by cinder, it needs to"},{"line_number":6894,"context_line":"        # be extended by virt driver so host can detect its new size."}],"source_content_type":"text/x-python","patch_set":23,"id":"3f1d235d_b4520a3a","line":6891,"range":{"start_line":6889,"start_character":8,"end_line":6891,"end_character":62},"updated":"2017-07-05 18:57:10.000000000","message":"A comment about why we are doing this here would be good I think since normally people only see these instance actions getting recorded in the compute API code (similar justification for what I left in the instance_actions module).","commit_id":"517aef156aa98ff20970878b8d7892eb482d00fb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7c78d86b9714cf0d744ad0baa33300e7a7aefb03","unresolved":false,"context_lines":[{"line_number":6886,"context_line":"    @wrap_instance_fault"},{"line_number":6887,"context_line":"    def extend_volume(self, context, instance, extended_volume_id):"},{"line_number":6888,"context_line":""},{"line_number":6889,"context_line":"        objects.InstanceAction.action_start(context, instance.uuid,"},{"line_number":6890,"context_line":"                                            instance_actions.EXTEND_VOLUME,"},{"line_number":6891,"context_line":"                                            want_result\u003dFalse)"},{"line_number":6892,"context_line":""},{"line_number":6893,"context_line":"        # If an attached volume is extended by cinder, it needs to"},{"line_number":6894,"context_line":"        # be extended by virt driver so host can detect its new size."}],"source_content_type":"text/x-python","patch_set":24,"id":"3f1d235d_61595333","line":6891,"range":{"start_line":6889,"start_character":8,"end_line":6891,"end_character":62},"updated":"2017-07-05 19:42:39.000000000","message":"Hmm, we likely need to do this in the API after all.\n\nThe wrap_instance_event decorator will call EventReporter which is a context manager, and on entering the context it will record an instance action event starting:\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/compute/utils.py#n701\n\nWhich calls db.action_event_start:\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/objects/instance_action.py#n169\n\nThe events are scoped to an action which is keyed by request id, and if it can\u0027t find an existing action by the request id:\n\nhttps://git.openstack.org/cgit/openstack/nova/tree/nova/db/sqlalchemy/api.py#n6140\n\nThen that will try and look up the last action recorded if the context does not have a project_id associated - which I don\u0027t think would be the case here, we have a token with a project_id in it:\n\nhttps://git.openstack.org/cgit/openstack/nova/tree/nova/db/sqlalchemy/api.py#n6148\n\nSo I think we\u0027ll get here:\n\nhttps://git.openstack.org/cgit/openstack/nova/tree/nova/db/sqlalchemy/api.py#n6152\n\nAnd it will raise InstanceActionNotFound.\n\nWe don\u0027t have an action for this until we call objects.InstanceAction.action_start but wrap_instance_event is processed first when entering that context manager.\n\nThis was likely not caught in tests because the DB API or action event code is all mocked out.\n\nSo I guess we are going to have to move the action_start call to the API so the event tracking in the compute works.\n\nI can help with that if you want. I was also planning on starting a Tempest scenario test to test this all out to make sure it\u0027s what we expect before we land it.","commit_id":"56eb2eda2aab9a8c21d0afde1049e3b2dd2d84d0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"c15b76605e568f592c3d0619f302eb656476e1ae","unresolved":false,"context_lines":[{"line_number":6886,"context_line":"    @wrap_instance_fault"},{"line_number":6887,"context_line":"    def extend_volume(self, context, instance, extended_volume_id):"},{"line_number":6888,"context_line":""},{"line_number":6889,"context_line":"        objects.InstanceAction.action_start(context, instance.uuid,"},{"line_number":6890,"context_line":"                                            instance_actions.EXTEND_VOLUME,"},{"line_number":6891,"context_line":"                                            want_result\u003dFalse)"},{"line_number":6892,"context_line":""},{"line_number":6893,"context_line":"        # If an attached volume is extended by cinder, it needs to"},{"line_number":6894,"context_line":"        # be extended by virt driver so host can detect its new size."}],"source_content_type":"text/x-python","patch_set":24,"id":"3f1d235d_e4c33156","line":6891,"range":{"start_line":6889,"start_character":8,"end_line":6891,"end_character":62},"in_reply_to":"3f1d235d_61595333","updated":"2017-07-05 20:34:13.000000000","message":"Done","commit_id":"56eb2eda2aab9a8c21d0afde1049e3b2dd2d84d0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"97c0c4c3bece0268a90d2b1011318d7b39566646","unresolved":false,"context_lines":[{"line_number":6884,"context_line":"    @wrap_instance_event(prefix\u003d\u0027compute\u0027)"},{"line_number":6885,"context_line":"    @wrap_instance_fault"},{"line_number":6886,"context_line":"    def extend_volume(self, context, instance, extended_volume_id):"},{"line_number":6887,"context_line":""},{"line_number":6888,"context_line":"        # If an attached volume is extended by cinder, it needs to"},{"line_number":6889,"context_line":"        # be extended by virt driver so host can detect its new size."},{"line_number":6890,"context_line":"        # And bdm needs to be updated."}],"source_content_type":"text/x-python","patch_set":35,"id":"3f1d235d_6fbe3166","line":6887,"updated":"2017-07-11 18:38:04.000000000","message":"nit: unnecessary empty line here and no docstring.","commit_id":"e66cd6aca780102189ecb275390519f0d2ee236a"}],"nova/exception.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d6a85bc03209dcb3d9a06191d7e4418e659ab52c","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"class ExtendVolumeNotSupported(Invalid):"},{"line_number":268,"context_line":"    msg_fmt \u003d _(\"Volume extension is not supported by the hypervisor.\")"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"class VolumeEncryptionNotSupported(Invalid):"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_fbcaf017","line":268,"range":{"start_line":268,"start_character":24,"end_line":268,"end_character":33},"updated":"2017-06-23 20:08:38.000000000","message":"Let\u0027s find something else to call this to avoid confusion with things like API extensions, or extension points.\n\nMaybe \"Extending the size of attached volumes is not supported by this compute driver or for this type of volume.\"","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"5563f9f91f30240b97cfd1bd797ad3a424f9ee01","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"class ExtendVolumeNotSupported(Invalid):"},{"line_number":268,"context_line":"    msg_fmt \u003d _(\"Volume extension is not supported by the hypervisor.\")"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"class VolumeEncryptionNotSupported(Invalid):"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_4ae3fad9","line":268,"range":{"start_line":268,"start_character":24,"end_line":268,"end_character":33},"in_reply_to":"5f201791_fbcaf017","updated":"2017-06-27 21:29:52.000000000","message":"Done. Will use \"volume size extension\" to match spec wording.","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"}],"nova/objects/external_event.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ceaa38e3006b3ab9d3b043e662cad02d1afb2492","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    \u0027network-vif-deleted\u0027,"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    # Volume was extended for this instance, tag is volume_id"},{"line_number":28,"context_line":"    \u0027volume-extended\u0027,"},{"line_number":29,"context_line":"]"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"EVENT_STATUSES \u003d [\u0027failed\u0027, \u0027completed\u0027, \u0027in-progress\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_7ef62492","line":28,"updated":"2017-04-24 20:48:24.000000000","message":"We need a microversion change in the API schema for this:\n\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/compute/schemas/server_external_events.py#L30\n\nSo I think it\u0027s fine to have this defined here in this EVENT_NAMES constant, we\u0027ll need to restrict the list in the jsonschema.\n\nSo you need a new 2.43 microversion which will be the full EVENT_NAMES list for that entry, but everything before 2.43 will need to be EVENT_NAMES[:-1].\n\nWe\u0027ll also want to update the api-ref for that:\n\nhttps://github.com/openstack/nova/blob/master/api-ref/source/parameters.yaml#L1882\n\nYou\u0027ll need to note in those docs that volume-extended is only available starting in microversion 2.43.\n\nAlso note when you update a microversion there are some other files you\u0027ll need to change:\n\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/api_version_request.py\n\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/compute/rest_api_version_history.rst\n\nhttps://github.com/openstack/nova/tree/master/doc/api_samples/versions","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"c567f7fa35eb6d4963fc8c82fc570198df3ed86c","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    \u0027network-vif-deleted\u0027,"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    # Volume was extended for this instance, tag is volume_id"},{"line_number":28,"context_line":"    \u0027volume-extended\u0027,"},{"line_number":29,"context_line":"]"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"EVENT_STATUSES \u003d [\u0027failed\u0027, \u0027completed\u0027, \u0027in-progress\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_f4513510","line":28,"in_reply_to":"5ff73747_7ef62492","updated":"2017-04-25 01:05:09.000000000","message":"Done","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":17814,"name":"fengzhr","email":"fengzhr@awcloud.com","username":"space"},"change_message_id":"9612d99a5767c11c2bc1bbc26d88ba4c32f34de9","unresolved":false,"context_lines":[{"line_number":6514,"context_line":"        drvr._host.get_guest \u003d mock.Mock(return_value\u003dguest)"},{"line_number":6515,"context_line":"        drvr._extend_volume \u003d mock.Mock(return_value\u003dnew_size_in_kb)"},{"line_number":6516,"context_line":""},{"line_number":6517,"context_line":"        for state in (power_state.RUNNING, power_state.PAUSED):"},{"line_number":6518,"context_line":"            guest.get_power_state \u003d mock.Mock(return_value\u003dstate)"},{"line_number":6519,"context_line":""},{"line_number":6520,"context_line":"            drvr.extend_volume(connection_info, instance, \u0027/dev/sda\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ffa3b31_a5f8b27a","line":6517,"range":{"start_line":6517,"start_character":8,"end_line":6517,"end_character":62},"updated":"2017-04-20 03:07:01.000000000","message":"Called twice.","commit_id":"dc94ef97b1b15c9283760002623e94cf0d0e55cc"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"af94097d7dc1cee57de255c6c9f74d14155e1580","unresolved":false,"context_lines":[{"line_number":6514,"context_line":"        drvr._host.get_guest \u003d mock.Mock(return_value\u003dguest)"},{"line_number":6515,"context_line":"        drvr._extend_volume \u003d mock.Mock(return_value\u003dnew_size_in_kb)"},{"line_number":6516,"context_line":""},{"line_number":6517,"context_line":"        for state in (power_state.RUNNING, power_state.PAUSED):"},{"line_number":6518,"context_line":"            guest.get_power_state \u003d mock.Mock(return_value\u003dstate)"},{"line_number":6519,"context_line":""},{"line_number":6520,"context_line":"            drvr.extend_volume(connection_info, instance, \u0027/dev/sda\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ffa3b31_8bf707d4","line":6517,"range":{"start_line":6517,"start_character":8,"end_line":6517,"end_character":62},"in_reply_to":"7ffa3b31_a5f8b27a","updated":"2017-04-20 04:56:16.000000000","message":"Thanks, I added this small change after running tests and didn\u0027t account for mock being called twice. Will fix in next patchset.","commit_id":"dc94ef97b1b15c9283760002623e94cf0d0e55cc"},{"author":{"_account_id":17814,"name":"fengzhr","email":"fengzhr@awcloud.com","username":"space"},"change_message_id":"9612d99a5767c11c2bc1bbc26d88ba4c32f34de9","unresolved":false,"context_lines":[{"line_number":6518,"context_line":"            guest.get_power_state \u003d mock.Mock(return_value\u003dstate)"},{"line_number":6519,"context_line":""},{"line_number":6520,"context_line":"            drvr.extend_volume(connection_info, instance, \u0027/dev/sda\u0027)"},{"line_number":6521,"context_line":"            drvr._extend_volume.assert_called_once_with(connection_info,"},{"line_number":6522,"context_line":"                                                        \u0027/dev/sda\u0027)"},{"line_number":6523,"context_line":"            guest.get_block_device.assert_called_once_with(\u0027/fake\u0027)"},{"line_number":6524,"context_line":"            block_device.resize.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":3,"id":"7ffa3b31_a5caf24a","line":6521,"range":{"start_line":6521,"start_character":32,"end_line":6521,"end_character":55},"updated":"2017-04-20 03:07:01.000000000","message":"Called twice. So it didn\u0027t pass the test case.","commit_id":"dc94ef97b1b15c9283760002623e94cf0d0e55cc"},{"author":{"_account_id":17814,"name":"fengzhr","email":"fengzhr@awcloud.com","username":"space"},"change_message_id":"9612d99a5767c11c2bc1bbc26d88ba4c32f34de9","unresolved":false,"context_lines":[{"line_number":6520,"context_line":"            drvr.extend_volume(connection_info, instance, \u0027/dev/sda\u0027)"},{"line_number":6521,"context_line":"            drvr._extend_volume.assert_called_once_with(connection_info,"},{"line_number":6522,"context_line":"                                                        \u0027/dev/sda\u0027)"},{"line_number":6523,"context_line":"            guest.get_block_device.assert_called_once_with(\u0027/fake\u0027)"},{"line_number":6524,"context_line":"            block_device.resize.assert_called_once_with("},{"line_number":6525,"context_line":"                new_size_in_kb / units.Ki)"},{"line_number":6526,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7ffa3b31_a5cf9254","line":6523,"range":{"start_line":6523,"start_character":35,"end_line":6523,"end_character":58},"updated":"2017-04-20 03:07:01.000000000","message":"ditto","commit_id":"dc94ef97b1b15c9283760002623e94cf0d0e55cc"},{"author":{"_account_id":17814,"name":"fengzhr","email":"fengzhr@awcloud.com","username":"space"},"change_message_id":"9612d99a5767c11c2bc1bbc26d88ba4c32f34de9","unresolved":false,"context_lines":[{"line_number":6521,"context_line":"            drvr._extend_volume.assert_called_once_with(connection_info,"},{"line_number":6522,"context_line":"                                                        \u0027/dev/sda\u0027)"},{"line_number":6523,"context_line":"            guest.get_block_device.assert_called_once_with(\u0027/fake\u0027)"},{"line_number":6524,"context_line":"            block_device.resize.assert_called_once_with("},{"line_number":6525,"context_line":"                new_size_in_kb / units.Ki)"},{"line_number":6526,"context_line":""},{"line_number":6527,"context_line":"    def test_extend_volume_disk_not_found(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ffa3b31_250dc2a0","line":6524,"range":{"start_line":6524,"start_character":32,"end_line":6524,"end_character":55},"updated":"2017-04-20 03:07:01.000000000","message":"ditto","commit_id":"dc94ef97b1b15c9283760002623e94cf0d0e55cc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"91b1ce10d0d35a9c83d0b0a26309a6a5c2c4d89d","unresolved":false,"context_lines":[{"line_number":6624,"context_line":"                                                   instance)"},{"line_number":6625,"context_line":"            guest.get_block_device.assert_called_with(\u0027/fake\u0027)"},{"line_number":6626,"context_line":"            block_device.resize.assert_called_with("},{"line_number":6627,"context_line":"                new_size_in_kb / units.Ki)"},{"line_number":6628,"context_line":""},{"line_number":6629,"context_line":"    def test_extend_volume_with_volume_driver_without_support(self):"},{"line_number":6630,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"}],"source_content_type":"text/x-python","patch_set":28,"id":"3f1d235d_319a4c61","line":6627,"range":{"start_line":6627,"start_character":16,"end_line":6627,"end_character":41},"updated":"2017-07-07 05:51:26.000000000","message":"We should assert this is an int since we\u0027re mocking out blockRebase and that expects an int, but py35 gives a float.","commit_id":"bc666af1fc621a818acd19cdc43f841c3ed124e5"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"a02058786a0b1cf0d698233bf988a6e7f8e6e967","unresolved":false,"context_lines":[{"line_number":6624,"context_line":"                                                   instance)"},{"line_number":6625,"context_line":"            guest.get_block_device.assert_called_with(\u0027/fake\u0027)"},{"line_number":6626,"context_line":"            block_device.resize.assert_called_with("},{"line_number":6627,"context_line":"                new_size_in_kb / units.Ki)"},{"line_number":6628,"context_line":""},{"line_number":6629,"context_line":"    def test_extend_volume_with_volume_driver_without_support(self):"},{"line_number":6630,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"}],"source_content_type":"text/x-python","patch_set":28,"id":"3f1d235d_71178fa5","line":6627,"range":{"start_line":6627,"start_character":16,"end_line":6627,"end_character":41},"in_reply_to":"3f1d235d_319a4c61","updated":"2017-07-07 17:28:04.000000000","message":"Done","commit_id":"bc666af1fc621a818acd19cdc43f841c3ed124e5"}],"nova/virt/driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    \"\"\""},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    capabilities \u003d {"},{"line_number":125,"context_line":"        \"has_imagecache\": False,"},{"line_number":126,"context_line":"        \"supports_recreate\": False,"},{"line_number":127,"context_line":"        \"supports_migrate_to_same_host\": False,"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_1bebe3b0","line":124,"range":{"start_line":124,"start_character":4,"end_line":124,"end_character":16},"updated":"2017-06-20 14:52:44.000000000","message":"We should probably add something here as a capability flag since not all drivers are going to support extending attached volumes right now. I\u0027d called it \"supports_volume_extend\" and default to False. You\u0027d set that to True in the libvirt driver\u0027s capabilities override dict, and False in any other virt drivers that override the base capabilities dict.\n\nThe compute manager would check for this capability and fail fast if the driver doesn\u0027t support it.\n\n--\n\nWe should also have an entry in the feature support matrix for this new capability:\n\nhttps://docs.openstack.org/developer/nova/support-matrix.html\n\nThose are defined here:\n\nhttps://github.com/openstack/nova/blob/9045a98145f0834446d668e0282ddb1c6f2d136c/doc/source/support-matrix.ini","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    \"\"\""},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    capabilities \u003d {"},{"line_number":125,"context_line":"        \"has_imagecache\": False,"},{"line_number":126,"context_line":"        \"supports_recreate\": False,"},{"line_number":127,"context_line":"        \"supports_migrate_to_same_host\": False,"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_8fa0c9a7","line":124,"range":{"start_line":124,"start_character":4,"end_line":124,"end_character":16},"in_reply_to":"5f201791_1bebe3b0","updated":"2017-06-21 21:04:54.000000000","message":"Done","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":1413,"context_line":"                LOG.debug(\u0027resizing block device %(dev)s to %(size)u kb\u0027,"},{"line_number":1414,"context_line":"                          {\u0027dev\u0027: disk_path, \u0027size\u0027: new_size})"},{"line_number":1415,"context_line":"                dev \u003d guest.get_block_device(disk_path)"},{"line_number":1416,"context_line":"                # TODO(mgagne) guest._domain.blockResize raises"},{"line_number":1417,"context_line":"                # an exception if block device is not found which should"},{"line_number":1418,"context_line":"                # be handled below."},{"line_number":1419,"context_line":"                # Exception: libvirtError: invalid argument: invalid path: XXX"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_5e1829d2","line":1416,"range":{"start_line":1416,"start_character":18,"end_line":1416,"end_character":22},"updated":"2017-06-20 14:52:44.000000000","message":"What is the TODO for now? You\u0027re handling libvirtError below.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":1413,"context_line":"                LOG.debug(\u0027resizing block device %(dev)s to %(size)u kb\u0027,"},{"line_number":1414,"context_line":"                          {\u0027dev\u0027: disk_path, \u0027size\u0027: new_size})"},{"line_number":1415,"context_line":"                dev \u003d guest.get_block_device(disk_path)"},{"line_number":1416,"context_line":"                # TODO(mgagne) guest._domain.blockResize raises"},{"line_number":1417,"context_line":"                # an exception if block device is not found which should"},{"line_number":1418,"context_line":"                # be handled below."},{"line_number":1419,"context_line":"                # Exception: libvirtError: invalid argument: invalid path: XXX"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_49987169","line":1416,"range":{"start_line":1416,"start_character":18,"end_line":1416,"end_character":22},"in_reply_to":"5f201791_5e1829d2","updated":"2017-06-21 21:04:54.000000000","message":"Done","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":1417,"context_line":"                # an exception if block device is not found which should"},{"line_number":1418,"context_line":"                # be handled below."},{"line_number":1419,"context_line":"                # Exception: libvirtError: invalid argument: invalid path: XXX"},{"line_number":1420,"context_line":"                dev.resize(new_size / units.Ki)"},{"line_number":1421,"context_line":"            else:"},{"line_number":1422,"context_line":"                LOG.debug(\u0027Skipping block device resize, guest is not running\u0027,"},{"line_number":1423,"context_line":"                          instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_89d1e95a","line":1420,"range":{"start_line":1420,"start_character":27,"end_line":1420,"end_character":35},"updated":"2017-06-20 14:52:44.000000000","message":"As noted in the volume driver code, if you are hitting a volume that doesn\u0027t support or implement the extend_volume function, then new_size is going to be None because the default implementation is \"pass\". So this is going to result in a TypeError. So that\u0027s why I think the volume driver extend_volume should default to raise NotImplementedError and we should handle that gracefully in the libvirt driver (this method) so we can raise a coherent error back up to the compute manager.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":1417,"context_line":"                # an exception if block device is not found which should"},{"line_number":1418,"context_line":"                # be handled below."},{"line_number":1419,"context_line":"                # Exception: libvirtError: invalid argument: invalid path: XXX"},{"line_number":1420,"context_line":"                dev.resize(new_size / units.Ki)"},{"line_number":1421,"context_line":"            else:"},{"line_number":1422,"context_line":"                LOG.debug(\u0027Skipping block device resize, guest is not running\u0027,"},{"line_number":1423,"context_line":"                          instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_8a61d73c","line":1420,"range":{"start_line":1420,"start_character":27,"end_line":1420,"end_character":35},"in_reply_to":"5f201791_89d1e95a","updated":"2017-06-21 21:04:54.000000000","message":"Done. Now checking for NotImplementedError before calling block resize.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":1421,"context_line":"            else:"},{"line_number":1422,"context_line":"                LOG.debug(\u0027Skipping block device resize, guest is not running\u0027,"},{"line_number":1423,"context_line":"                          instance\u003dinstance)"},{"line_number":1424,"context_line":"        except exception.InstanceNotFound:"},{"line_number":1425,"context_line":"            LOG.warning(_LW(\u0027During extend_volume, instance disappeared.\u0027),"},{"line_number":1426,"context_line":"                        instance\u003dinstance)"},{"line_number":1427,"context_line":"        except libvirt.libvirtError:"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_be4e1dbf","line":1424,"range":{"start_line":1424,"start_character":25,"end_line":1424,"end_character":41},"updated":"2017-06-20 14:52:44.000000000","message":"We should probably re-raise this so the compute manager handles it.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":1421,"context_line":"            else:"},{"line_number":1422,"context_line":"                LOG.debug(\u0027Skipping block device resize, guest is not running\u0027,"},{"line_number":1423,"context_line":"                          instance\u003dinstance)"},{"line_number":1424,"context_line":"        except exception.InstanceNotFound:"},{"line_number":1425,"context_line":"            LOG.warning(_LW(\u0027During extend_volume, instance disappeared.\u0027),"},{"line_number":1426,"context_line":"                        instance\u003dinstance)"},{"line_number":1427,"context_line":"        except libvirt.libvirtError:"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_6488f470","line":1424,"range":{"start_line":1424,"start_character":25,"end_line":1424,"end_character":41},"in_reply_to":"5f201791_be4e1dbf","updated":"2017-06-21 21:04:54.000000000","message":"Done","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":1422,"context_line":"                LOG.debug(\u0027Skipping block device resize, guest is not running\u0027,"},{"line_number":1423,"context_line":"                          instance\u003dinstance)"},{"line_number":1424,"context_line":"        except exception.InstanceNotFound:"},{"line_number":1425,"context_line":"            LOG.warning(_LW(\u0027During extend_volume, instance disappeared.\u0027),"},{"line_number":1426,"context_line":"                        instance\u003dinstance)"},{"line_number":1427,"context_line":"        except libvirt.libvirtError:"},{"line_number":1428,"context_line":"            LOG.error(_LE(\u0027resizing block device failed.\u0027),"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_7edc0518","line":1425,"range":{"start_line":1425,"start_character":24,"end_line":1425,"end_character":27},"updated":"2017-06-20 14:52:44.000000000","message":"We don\u0027t need these translation markers anymore.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":1422,"context_line":"                LOG.debug(\u0027Skipping block device resize, guest is not running\u0027,"},{"line_number":1423,"context_line":"                          instance\u003dinstance)"},{"line_number":1424,"context_line":"        except exception.InstanceNotFound:"},{"line_number":1425,"context_line":"            LOG.warning(_LW(\u0027During extend_volume, instance disappeared.\u0027),"},{"line_number":1426,"context_line":"                        instance\u003dinstance)"},{"line_number":1427,"context_line":"        except libvirt.libvirtError:"},{"line_number":1428,"context_line":"            LOG.error(_LE(\u0027resizing block device failed.\u0027),"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_0a970793","line":1425,"range":{"start_line":1425,"start_character":24,"end_line":1425,"end_character":27},"in_reply_to":"5f201791_7edc0518","updated":"2017-06-21 21:04:54.000000000","message":"Done","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":1424,"context_line":"        except exception.InstanceNotFound:"},{"line_number":1425,"context_line":"            LOG.warning(_LW(\u0027During extend_volume, instance disappeared.\u0027),"},{"line_number":1426,"context_line":"                        instance\u003dinstance)"},{"line_number":1427,"context_line":"        except libvirt.libvirtError:"},{"line_number":1428,"context_line":"            LOG.error(_LE(\u0027resizing block device failed.\u0027),"},{"line_number":1429,"context_line":"                     instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":1430,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_9e724111","line":1427,"range":{"start_line":1427,"start_character":23,"end_line":1427,"end_character":35},"updated":"2017-06-20 14:52:44.000000000","message":"We should re-raise this. If the resize failed, we need to raise an error up to the compute manager so it can record the fault/action event finish with the exception.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":1424,"context_line":"        except exception.InstanceNotFound:"},{"line_number":1425,"context_line":"            LOG.warning(_LW(\u0027During extend_volume, instance disappeared.\u0027),"},{"line_number":1426,"context_line":"                        instance\u003dinstance)"},{"line_number":1427,"context_line":"        except libvirt.libvirtError:"},{"line_number":1428,"context_line":"            LOG.error(_LE(\u0027resizing block device failed.\u0027),"},{"line_number":1429,"context_line":"                     instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":1430,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_a4b4cc36","line":1427,"range":{"start_line":1427,"start_character":23,"end_line":1427,"end_character":35},"in_reply_to":"5f201791_9e724111","updated":"2017-06-21 21:04:54.000000000","message":"Done","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":1425,"context_line":"            LOG.warning(_LW(\u0027During extend_volume, instance disappeared.\u0027),"},{"line_number":1426,"context_line":"                        instance\u003dinstance)"},{"line_number":1427,"context_line":"        except libvirt.libvirtError:"},{"line_number":1428,"context_line":"            LOG.error(_LE(\u0027resizing block device failed.\u0027),"},{"line_number":1429,"context_line":"                     instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":1430,"context_line":""},{"line_number":1431,"context_line":"    def attach_interface(self, context, instance, image_meta, vif):"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_1eebd1b0","line":1428,"range":{"start_line":1428,"start_character":22,"end_line":1428,"end_character":25},"updated":"2017-06-20 14:52:44.000000000","message":"same","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":1425,"context_line":"            LOG.warning(_LW(\u0027During extend_volume, instance disappeared.\u0027),"},{"line_number":1426,"context_line":"                        instance\u003dinstance)"},{"line_number":1427,"context_line":"        except libvirt.libvirtError:"},{"line_number":1428,"context_line":"            LOG.error(_LE(\u0027resizing block device failed.\u0027),"},{"line_number":1429,"context_line":"                     instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":1430,"context_line":""},{"line_number":1431,"context_line":"    def attach_interface(self, context, instance, image_meta, vif):"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_44a4d808","line":1428,"range":{"start_line":1428,"start_character":22,"end_line":1428,"end_character":25},"in_reply_to":"5f201791_1eebd1b0","updated":"2017-06-21 21:04:54.000000000","message":"Done","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":1426,"context_line":"                        instance\u003dinstance)"},{"line_number":1427,"context_line":"        except libvirt.libvirtError:"},{"line_number":1428,"context_line":"            LOG.error(_LE(\u0027resizing block device failed.\u0027),"},{"line_number":1429,"context_line":"                     instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":1430,"context_line":""},{"line_number":1431,"context_line":"    def attach_interface(self, context, instance, image_meta, vif):"},{"line_number":1432,"context_line":"        guest \u003d self._host.get_guest(instance)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_7e7885f7","line":1429,"range":{"start_line":1429,"start_character":40,"end_line":1429,"end_character":53},"updated":"2017-06-20 14:52:44.000000000","message":"nit: using LOG.exception has the same effect.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":1426,"context_line":"                        instance\u003dinstance)"},{"line_number":1427,"context_line":"        except libvirt.libvirtError:"},{"line_number":1428,"context_line":"            LOG.error(_LE(\u0027resizing block device failed.\u0027),"},{"line_number":1429,"context_line":"                     instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":1430,"context_line":""},{"line_number":1431,"context_line":"    def attach_interface(self, context, instance, image_meta, vif):"},{"line_number":1432,"context_line":"        guest \u003d self._host.get_guest(instance)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_69bc4dbb","line":1429,"range":{"start_line":1429,"start_character":40,"end_line":1429,"end_character":53},"in_reply_to":"5f201791_7e7885f7","updated":"2017-06-21 21:04:54.000000000","message":"Done","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"666ef326433e8f206e92d4f6f717579b8d669924","unresolved":false,"context_lines":[{"line_number":1424,"context_line":"                LOG.debug(\u0027resizing block device %(dev)s to %(size)u kb\u0027,"},{"line_number":1425,"context_line":"                          {\u0027dev\u0027: disk_path, \u0027size\u0027: new_size})"},{"line_number":1426,"context_line":"                dev \u003d guest.get_block_device(disk_path)"},{"line_number":1427,"context_line":"                dev.resize(new_size / units.Ki)"},{"line_number":1428,"context_line":"            else:"},{"line_number":1429,"context_line":"                LOG.debug(\u0027Skipping block device resize, guest is not running\u0027,"},{"line_number":1430,"context_line":"                          instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":28,"id":"3f1d235d_119ab0b7","line":1427,"range":{"start_line":1427,"start_character":16,"end_line":1427,"end_character":47},"updated":"2017-07-07 05:48:40.000000000","message":"This fails on py35:\n\nhttp://logs.openstack.org/78/480778/2/check/gate-tempest-dsvm-py35-ubuntu-xenial/e356b5a/logs/screen-n-cpu.txt.gz?level\u003dTRACE#_Jul_07_02_16_13_098024\n\nRight before that it logs:\n\nJul 07 02:16:13.023765 ubuntu-xenial-internap-mtl01-9695720 nova-compute[23981]: DEBUG nova.virt.libvirt.driver [req-af178efb-d301-40ed-bb68-27fd83c3d8e7 req-fa12a02e-1d11-4470-a0bd-2abfc871c784 service nova] resizing block device /dev/disk/by-path/ip-198.72.124.154:3260-iscsi-iqn.2010-10.org.openstack:volume-a0ca8709-f4ab-4078-b86f-3f73f88c0ac0-lun-1 to 1073741824 kb {{(pid\u003d23981) extend_volume /opt/stack/new/nova/nova/virt/libvirt/driver.py:1425}}","commit_id":"bc666af1fc621a818acd19cdc43f841c3ed124e5"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"a02058786a0b1cf0d698233bf988a6e7f8e6e967","unresolved":false,"context_lines":[{"line_number":1424,"context_line":"                LOG.debug(\u0027resizing block device %(dev)s to %(size)u kb\u0027,"},{"line_number":1425,"context_line":"                          {\u0027dev\u0027: disk_path, \u0027size\u0027: new_size})"},{"line_number":1426,"context_line":"                dev \u003d guest.get_block_device(disk_path)"},{"line_number":1427,"context_line":"                dev.resize(new_size / units.Ki)"},{"line_number":1428,"context_line":"            else:"},{"line_number":1429,"context_line":"                LOG.debug(\u0027Skipping block device resize, guest is not running\u0027,"},{"line_number":1430,"context_line":"                          instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":28,"id":"3f1d235d_b143e7af","line":1427,"range":{"start_line":1427,"start_character":16,"end_line":1427,"end_character":47},"in_reply_to":"3f1d235d_119ab0b7","updated":"2017-07-07 17:28:04.000000000","message":"Done","commit_id":"bc666af1fc621a818acd19cdc43f841c3ed124e5"}],"nova/virt/libvirt/volume/fibrechannel.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d9b6f4145b47e622ecf7904895f64bcdfe43cbbf","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        super(LibvirtFibreChannelVolumeDriver,"},{"line_number":75,"context_line":"              self).disconnect_volume(connection_info, disk_dev, instance)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def extend_volume(self, connection_info, disk_info, instance):"},{"line_number":78,"context_line":"        \"\"\"Extend the volume.\"\"\""},{"line_number":79,"context_line":"        LOG.debug(\"calling os-brick to extend FC Volume\", instance\u003dinstance)"},{"line_number":80,"context_line":"        new_size \u003d self.connector.extend_volume(connection_info[\u0027data\u0027])"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_7b5b8053","line":77,"updated":"2017-06-23 20:09:34.000000000","message":"You have a unit test for the iscsi volume driver change, so you should probably also have one for the FC driver.","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"5563f9f91f30240b97cfd1bd797ad3a424f9ee01","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        super(LibvirtFibreChannelVolumeDriver,"},{"line_number":75,"context_line":"              self).disconnect_volume(connection_info, disk_dev, instance)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def extend_volume(self, connection_info, disk_info, instance):"},{"line_number":78,"context_line":"        \"\"\"Extend the volume.\"\"\""},{"line_number":79,"context_line":"        LOG.debug(\"calling os-brick to extend FC Volume\", instance\u003dinstance)"},{"line_number":80,"context_line":"        new_size \u003d self.connector.extend_volume(connection_info[\u0027data\u0027])"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_0a1062a7","line":77,"in_reply_to":"5f201791_7b5b8053","updated":"2017-06-27 21:29:52.000000000","message":"Done","commit_id":"d94d4f97b7f88338631af8482892ee06650cd62a"}],"nova/virt/libvirt/volume/iscsi.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ceaa38e3006b3ab9d3b043e662cad02d1afb2492","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        super(LibvirtISCSIVolumeDriver,"},{"line_number":81,"context_line":"              self).disconnect_volume(connection_info, disk_dev)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def extend_volume(self, connection_info, disk_info):"},{"line_number":84,"context_line":"        \"\"\"Extend the volume.\"\"\""},{"line_number":85,"context_line":"        LOG.debug(\"calling os-brick to extend iSCSI Volume\")"},{"line_number":86,"context_line":"        # TODO(mgagne) Figure out how bad this operation can fail."}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_beeb8cae","line":83,"updated":"2017-04-24 20:48:24.000000000","message":"This needs a unit test.","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"c567f7fa35eb6d4963fc8c82fc570198df3ed86c","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        super(LibvirtISCSIVolumeDriver,"},{"line_number":81,"context_line":"              self).disconnect_volume(connection_info, disk_dev)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def extend_volume(self, connection_info, disk_info):"},{"line_number":84,"context_line":"        \"\"\"Extend the volume.\"\"\""},{"line_number":85,"context_line":"        LOG.debug(\"calling os-brick to extend iSCSI Volume\")"},{"line_number":86,"context_line":"        # TODO(mgagne) Figure out how bad this operation can fail."}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_b9af2693","line":83,"in_reply_to":"5ff73747_beeb8cae","updated":"2017-04-25 01:05:09.000000000","message":"Done","commit_id":"c80675efe0d4fb722d0c624595e13263df38feaa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def extend_volume(self, connection_info, disk_info, instance):"},{"line_number":84,"context_line":"        \"\"\"Extend the volume.\"\"\""},{"line_number":85,"context_line":"        LOG.debug(\"calling os-brick to extend iSCSI Volume\")"},{"line_number":86,"context_line":"        # TODO(mgagne) Figure out how bad this operation can fail."},{"line_number":87,"context_line":"        # Known exceptions:"},{"line_number":88,"context_line":"        # * os_brick.exception.VolumePathsNotFound"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_292655b9","line":85,"updated":"2017-06-20 14:52:44.000000000","message":"Here and below, pass the instance\u003dinstance kwarg to the logging statements, otherwise the instance argument isn\u0027t used at all.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def extend_volume(self, connection_info, disk_info, instance):"},{"line_number":84,"context_line":"        \"\"\"Extend the volume.\"\"\""},{"line_number":85,"context_line":"        LOG.debug(\"calling os-brick to extend iSCSI Volume\")"},{"line_number":86,"context_line":"        # TODO(mgagne) Figure out how bad this operation can fail."},{"line_number":87,"context_line":"        # Known exceptions:"},{"line_number":88,"context_line":"        # * os_brick.exception.VolumePathsNotFound"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_ead60bc4","line":85,"in_reply_to":"5f201791_292655b9","updated":"2017-06-21 21:04:54.000000000","message":"Done","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"}],"nova/virt/libvirt/volume/volume.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        \"\"\"Disconnect the volume.\"\"\""},{"line_number":106,"context_line":"        pass"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def extend_volume(self, connection_info, disk_info, instance):"},{"line_number":109,"context_line":"        \"\"\"Extend the volume.\"\"\""},{"line_number":110,"context_line":"        pass"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_be585d56","line":108,"updated":"2017-06-20 14:52:44.000000000","message":"It looks like the fibre channel connector in os-brick also possibly supports volume extend:\n\nhttp://git.openstack.org/cgit/openstack/os-brick/tree/os_brick/initiator/connectors/fibre_channel.py#n97\n\nSo shouldn\u0027t you also implement this for LibvirtFibreChannelVolumeDriver?","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        \"\"\"Disconnect the volume.\"\"\""},{"line_number":106,"context_line":"        pass"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def extend_volume(self, connection_info, disk_info, instance):"},{"line_number":109,"context_line":"        \"\"\"Extend the volume.\"\"\""},{"line_number":110,"context_line":"        pass"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_ca910ff4","line":108,"in_reply_to":"5f201791_be585d56","updated":"2017-06-21 21:04:54.000000000","message":"Done","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def extend_volume(self, connection_info, disk_info, instance):"},{"line_number":109,"context_line":"        \"\"\"Extend the volume.\"\"\""},{"line_number":110,"context_line":"        pass"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"class LibvirtVolumeDriver(LibvirtBaseVolumeDriver):"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_89fe8903","line":110,"range":{"start_line":110,"start_character":8,"end_line":110,"end_character":12},"updated":"2017-06-20 14:52:44.000000000","message":"Why doesn\u0027t this raise NotImplementedError? Maybe this is handled on the Cinder side, but what I was thinking was, if this is just a pass, the libvirt driver calls this on some volume driver that doesn\u0027t support volume extend, let\u0027s say for rbd, but it doesn\u0027t fail. So then the libvirt driver does a resize - does that fail in some weird way? Or does it no-op because the size didn\u0027t change and we report that everything was successful even though we didn\u0027t do anything?","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def extend_volume(self, connection_info, disk_info, instance):"},{"line_number":109,"context_line":"        \"\"\"Extend the volume.\"\"\""},{"line_number":110,"context_line":"        pass"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"class LibvirtVolumeDriver(LibvirtBaseVolumeDriver):"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f201791_6a679b27","line":110,"range":{"start_line":110,"start_character":8,"end_line":110,"end_character":12},"in_reply_to":"5f201791_89fe8903","updated":"2017-06-21 21:04:54.000000000","message":"Done. I think you addressed the question in compute manager. Will now raise NotImplementedError.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"}],"releasenotes/notes/nova-support-attached-volume-extend-88ce16ce41aa6d41.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73290a3cbb795f5c9243cccc8775b21d93bfdd52","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    It will also resize the device in QEMU so instance can detect"},{"line_number":8,"context_line":"    the new disk size without rebooting."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"    Currently only the libvirt compute driver supports"},{"line_number":11,"context_line":"    the online volume size change."}],"source_content_type":"text/x-yaml","patch_set":18,"id":"5f201791_c9492161","line":11,"range":{"start_line":10,"start_character":4,"end_line":11,"end_character":34},"updated":"2017-06-20 14:52:44.000000000","message":"This also needs to state which types of volumes are supported, because right now it\u0027s only the iscsi type - things like rbd and sheepdog wouldn\u0027t work, for example.","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b80d2413ac3f51d5881111c4fce7f7f4212fb412","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    It will also resize the device in QEMU so instance can detect"},{"line_number":8,"context_line":"    the new disk size without rebooting."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"    Currently only the libvirt compute driver supports"},{"line_number":11,"context_line":"    the online volume size change."}],"source_content_type":"text/x-yaml","patch_set":18,"id":"5f201791_a4504cd6","line":11,"range":{"start_line":10,"start_character":4,"end_line":11,"end_character":34},"in_reply_to":"5f201791_c9492161","updated":"2017-06-21 21:04:54.000000000","message":"Done","commit_id":"47c5f9d8dc8d207dc9f81d8165d1829269239de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c90830ee62fdeac975cda88c503ce6c56464df47","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    It is now possible to signal and perform an online volume size change"},{"line_number":5,"context_line":"    as of the 2.50 microversion using the ``volume-extended`` external event."}],"source_content_type":"text/x-yaml","patch_set":28,"id":"3f1d235d_3fcd8784","line":2,"updated":"2017-07-06 19:21:18.000000000","message":"This needs to be updated for the instance action event details API change too.","commit_id":"bc666af1fc621a818acd19cdc43f841c3ed124e5"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"a02058786a0b1cf0d698233bf988a6e7f8e6e967","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    It is now possible to signal and perform an online volume size change"},{"line_number":5,"context_line":"    as of the 2.50 microversion using the ``volume-extended`` external event."}],"source_content_type":"text/x-yaml","patch_set":28,"id":"3f1d235d_51cff328","line":2,"in_reply_to":"3f1d235d_3fcd8784","updated":"2017-07-07 17:28:04.000000000","message":"Done","commit_id":"bc666af1fc621a818acd19cdc43f841c3ed124e5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"97c0c4c3bece0268a90d2b1011318d7b39566646","unresolved":false,"context_lines":[{"line_number":13,"context_line":"    The 2.50 microversion exposes the ``events`` field in the response body for"},{"line_number":14,"context_line":"    the ``GET /servers/{server_id}/os-instance-actions/{request_id}`` API. This"},{"line_number":15,"context_line":"    is useful for API users to monitor when a volume extend operation completes"},{"line_number":16,"context_line":"    for the given server instance. The existing"},{"line_number":17,"context_line":"    ``os_compute_api:os-instance-actions:events`` policy rule will be checked"},{"line_number":18,"context_line":"    to see if the ``traceback`` field should be shown for events. By"},{"line_number":19,"context_line":"    default only users with the administrator role will be able to see event"},{"line_number":20,"context_line":"    ``traceback`` details."}],"source_content_type":"text/x-yaml","patch_set":35,"id":"3f1d235d_7a4dcd70","line":18,"range":{"start_line":16,"start_character":35,"end_line":18,"end_character":66},"updated":"2017-07-11 18:38:04.000000000","message":"similar comment about this not really matching what the logic is in the patch.","commit_id":"e66cd6aca780102189ecb275390519f0d2ee236a"}]}
