)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"97895795cd19a74a73b68b924016d848f6153aa8","unresolved":false,"context_lines":[{"line_number":14,"context_line":"Co-Authored-By:Jasson SUN (sunjia@inspur.com)"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I8aa2b9be5b53ba13c8921dbb66b6b7d4c57e9f6c"},{"line_number":17,"context_line":"Blueprint: add-user-id-to-the-migrations-table"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_01d29000","line":17,"range":{"start_line":17,"start_character":11,"end_line":17,"end_character":46},"updated":"2019-07-01 21:25:37.000000000","message":"add-user-id-field-to-the-migrations-table","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":30077,"name":"Qiu Fossen","display_name":"fossnqiu","email":"qiujunting@inspur.com","username":"qiufossen"},"change_message_id":"2f7450d845445c1f870d923a0a98fa961138bf6f","unresolved":false,"context_lines":[{"line_number":14,"context_line":"Co-Authored-By:Jasson SUN (sunjia@inspur.com)"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I8aa2b9be5b53ba13c8921dbb66b6b7d4c57e9f6c"},{"line_number":17,"context_line":"Blueprint: add-user-id-to-the-migrations-table"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_07e860df","line":17,"range":{"start_line":17,"start_character":11,"end_line":17,"end_character":46},"in_reply_to":"9fb8cfa7_01d29000","updated":"2019-07-03 01:40:41.000000000","message":"I\u0027m very sorry ! It is that add-user-id-field-to-the-migrations-table","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"}],"specs/train/approved/add-user-id-field-to-the-migrations-table.rst":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"adb463238e76cfd3eb796ebe67d6dc53963b2b05","unresolved":false,"context_lines":[{"line_number":43,"context_line":"* GET /servers/{server_id}/migrations"},{"line_number":44,"context_line":"* GET /servers/{server_id}/migrations/{migration_id}"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":".. todo:: Determine if user_id and project_id should be filter parameters on"},{"line_number":47,"context_line":"          GET /os-migrations as well - might as well?"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7faddb67_dfc07ce3","line":46,"updated":"2019-07-25 20:31:04.000000000","message":"This is my only outstanding question on this spec, but I think if we\u0027re going to expose user_id/project_id in these APIs we might as well add them as a request filter parameter to GET /os-migrations. If others agree I can update this quick.","commit_id":"e2f79efabc6b74583eedfdf8a0162b23eae0e121"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c4ce6eadd2cdfa47dcc3b9d39a90b64be3a39063","unresolved":false,"context_lines":[{"line_number":43,"context_line":"* GET /servers/{server_id}/migrations"},{"line_number":44,"context_line":"* GET /servers/{server_id}/migrations/{migration_id}"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":".. todo:: Determine if user_id and project_id should be filter parameters on"},{"line_number":47,"context_line":"          GET /os-migrations as well - might as well?"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7faddb67_ba610e3c","line":46,"in_reply_to":"7faddb67_3ad0bef7","updated":"2019-07-25 21:24:13.000000000","message":"oh right the users and project table are in keystone.","commit_id":"e2f79efabc6b74583eedfdf8a0162b23eae0e121"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"14866733c6dea2fe49147cedff4dbd0fa855ad5a","unresolved":false,"context_lines":[{"line_number":43,"context_line":"* GET /servers/{server_id}/migrations"},{"line_number":44,"context_line":"* GET /servers/{server_id}/migrations/{migration_id}"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":".. todo:: Determine if user_id and project_id should be filter parameters on"},{"line_number":47,"context_line":"          GET /os-migrations as well - might as well?"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7faddb67_ff069820","line":46,"in_reply_to":"7faddb67_dfc07ce3","updated":"2019-07-25 20:46:15.000000000","message":"Yes, that makes sense IMO.","commit_id":"e2f79efabc6b74583eedfdf8a0162b23eae0e121"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9cf6957cb772351a9991ecc38541a7dee1262e8c","unresolved":false,"context_lines":[{"line_number":43,"context_line":"* GET /servers/{server_id}/migrations"},{"line_number":44,"context_line":"* GET /servers/{server_id}/migrations/{migration_id}"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":".. todo:: Determine if user_id and project_id should be filter parameters on"},{"line_number":47,"context_line":"          GET /os-migrations as well - might as well?"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7faddb67_3ad0bef7","line":46,"in_reply_to":"7faddb67_fa01c6b0","updated":"2019-07-25 21:16:25.000000000","message":"Foreign key to what? We don\u0027t have a users/projects table like in placement. The indexes yes I can see, should have probably noted that in the data model impact section.","commit_id":"e2f79efabc6b74583eedfdf8a0162b23eae0e121"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"e7c61379f89ce0ae4fbad9c7c7238ae4364d3a50","unresolved":false,"context_lines":[{"line_number":43,"context_line":"* GET /servers/{server_id}/migrations"},{"line_number":44,"context_line":"* GET /servers/{server_id}/migrations/{migration_id}"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":".. todo:: Determine if user_id and project_id should be filter parameters on"},{"line_number":47,"context_line":"          GET /os-migrations as well - might as well?"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7faddb67_7f62a5af","line":46,"in_reply_to":"7faddb67_ff069820","updated":"2019-07-26 01:19:14.000000000","message":"Yeah, I think it makes sense too.\nFrom the request filter parameter to get *instance migrations* will be very practical, I am happy to see this change.","commit_id":"e2f79efabc6b74583eedfdf8a0162b23eae0e121"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8ac65c0e98f71f759c5a55dff9f683dc2b2a17e1","unresolved":false,"context_lines":[{"line_number":43,"context_line":"* GET /servers/{server_id}/migrations"},{"line_number":44,"context_line":"* GET /servers/{server_id}/migrations/{migration_id}"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":".. todo:: Determine if user_id and project_id should be filter parameters on"},{"line_number":47,"context_line":"          GET /os-migrations as well - might as well?"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7faddb67_fa01c6b0","line":46,"in_reply_to":"7faddb67_ff069820","updated":"2019-07-25 21:09:07.000000000","message":"ya i think that makes sense too.\nwe will have a forien key constraint on the user and project so i expect we would have an index on them so this should be fast to filter by and it could be useful if you wanted to find a migrations started by a rouge admin.","commit_id":"e2f79efabc6b74583eedfdf8a0162b23eae0e121"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cc3afd9a66a6f93c32fe2c7ae22ed44414c23100","unresolved":false,"context_lines":[{"line_number":54,"context_line":"between the instance action record and the migration record so trying to use"},{"line_number":55,"context_line":"the actions to correlate that information to the migrations can be complicated"},{"line_number":56,"context_line":"and error prone, especially if a server is moved multiple times in the same"},{"line_number":57,"context_line":"day. Since migration records a top-level resource in the API like servers,"},{"line_number":58,"context_line":"it makes sense for them to include the user_id/project_id like servers when"},{"line_number":59,"context_line":"they are created and by whom."},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7faddb67_1a5e2212","line":57,"range":{"start_line":57,"start_character":29,"end_line":57,"end_character":30},"updated":"2019-07-25 20:54:42.000000000","message":"are a","commit_id":"e2f79efabc6b74583eedfdf8a0162b23eae0e121"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d3968407fe9ee423e0906ac60441b4991db74ffa","unresolved":false,"context_lines":[{"line_number":54,"context_line":"between the instance action record and the migration record so trying to use"},{"line_number":55,"context_line":"the actions to correlate that information to the migrations can be complicated"},{"line_number":56,"context_line":"and error prone, especially if a server is moved multiple times in the same"},{"line_number":57,"context_line":"day. Since migration records a top-level resource in the API like servers,"},{"line_number":58,"context_line":"it makes sense for them to include the user_id/project_id like servers when"},{"line_number":59,"context_line":"they are created and by whom."},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7faddb67_bad10e5a","line":57,"range":{"start_line":57,"start_character":29,"end_line":57,"end_character":30},"in_reply_to":"7faddb67_1a5e2212","updated":"2019-07-25 21:08:53.000000000","message":"Done","commit_id":"e2f79efabc6b74583eedfdf8a0162b23eae0e121"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cc3afd9a66a6f93c32fe2c7ae22ed44414c23100","unresolved":false,"context_lines":[{"line_number":55,"context_line":"the actions to correlate that information to the migrations can be complicated"},{"line_number":56,"context_line":"and error prone, especially if a server is moved multiple times in the same"},{"line_number":57,"context_line":"day. Since migration records a top-level resource in the API like servers,"},{"line_number":58,"context_line":"it makes sense for them to include the user_id/project_id like servers when"},{"line_number":59,"context_line":"they are created and by whom."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7faddb67_7aa4f608","line":58,"range":{"start_line":58,"start_character":71,"end_line":58,"end_character":75},"updated":"2019-07-25 20:54:42.000000000","message":"indicating when...","commit_id":"e2f79efabc6b74583eedfdf8a0162b23eae0e121"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d3968407fe9ee423e0906ac60441b4991db74ffa","unresolved":false,"context_lines":[{"line_number":55,"context_line":"the actions to correlate that information to the migrations can be complicated"},{"line_number":56,"context_line":"and error prone, especially if a server is moved multiple times in the same"},{"line_number":57,"context_line":"day. Since migration records a top-level resource in the API like servers,"},{"line_number":58,"context_line":"it makes sense for them to include the user_id/project_id like servers when"},{"line_number":59,"context_line":"they are created and by whom."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7faddb67_dad40a4a","line":58,"range":{"start_line":58,"start_character":71,"end_line":58,"end_character":75},"in_reply_to":"7faddb67_7aa4f608","updated":"2019-07-25 21:08:53.000000000","message":"That\u0027s not really what I was going for - indicating when they are created is the created_at field. I just meant, \"when the migration records are created, like the Instance record\".","commit_id":"e2f79efabc6b74583eedfdf8a0162b23eae0e121"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cc3afd9a66a6f93c32fe2c7ae22ed44414c23100","unresolved":false,"context_lines":[{"line_number":160,"context_line":"      }"},{"line_number":161,"context_line":"    }"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"The key will always be returned but the value could be null for older records."},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"Security impact"},{"line_number":166,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7faddb67_5aa9fada","line":163,"range":{"start_line":163,"start_character":55,"end_line":163,"end_character":59},"updated":"2019-07-25 20:54:42.000000000","message":"✔","commit_id":"e2f79efabc6b74583eedfdf8a0162b23eae0e121"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8ac65c0e98f71f759c5a55dff9f683dc2b2a17e1","unresolved":false,"context_lines":[{"line_number":160,"context_line":"      }"},{"line_number":161,"context_line":"    }"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"The key will always be returned but the value could be null for older records."},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"Security impact"},{"line_number":166,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7faddb67_5aca5a6e","line":163,"range":{"start_line":163,"start_character":55,"end_line":163,"end_character":59},"in_reply_to":"7faddb67_5aa9fada","updated":"2019-07-25 21:09:07.000000000","message":"cool its minor but i would assume we drop this field for older microverions but an extra field should not break people unless they are doing strict validation which is unlikely.","commit_id":"e2f79efabc6b74583eedfdf8a0162b23eae0e121"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9cf6957cb772351a9991ecc38541a7dee1262e8c","unresolved":false,"context_lines":[{"line_number":160,"context_line":"      }"},{"line_number":161,"context_line":"    }"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"The key will always be returned but the value could be null for older records."},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"Security impact"},{"line_number":166,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7faddb67_1ad5c2e5","line":163,"range":{"start_line":163,"start_character":55,"end_line":163,"end_character":59},"in_reply_to":"7faddb67_5aca5a6e","updated":"2019-07-25 21:16:25.000000000","message":"Tempest does strict response validation.","commit_id":"e2f79efabc6b74583eedfdf8a0162b23eae0e121"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cc3afd9a66a6f93c32fe2c7ae22ed44414c23100","unresolved":false,"context_lines":[{"line_number":192,"context_line":"--------------"},{"line_number":193,"context_line":"None. The new columns in the database will be nullable as will the fields"},{"line_number":194,"context_line":"on the Migration object and the API response can return null values. A data"},{"line_number":195,"context_line":"migration to populate the values for existing migrations will not be added."},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"Implementation"},{"line_number":198,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7faddb67_fab78639","line":195,"range":{"start_line":195,"start_character":57,"end_line":195,"end_character":74},"updated":"2019-07-25 20:54:42.000000000","message":"✔","commit_id":"e2f79efabc6b74583eedfdf8a0162b23eae0e121"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8ac65c0e98f71f759c5a55dff9f683dc2b2a17e1","unresolved":false,"context_lines":[{"line_number":192,"context_line":"--------------"},{"line_number":193,"context_line":"None. The new columns in the database will be nullable as will the fields"},{"line_number":194,"context_line":"on the Migration object and the API response can return null values. A data"},{"line_number":195,"context_line":"migration to populate the values for existing migrations will not be added."},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"Implementation"},{"line_number":198,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7faddb67_9aad329d","line":195,"range":{"start_line":195,"start_character":57,"end_line":195,"end_character":74},"in_reply_to":"7faddb67_fab78639","updated":"2019-07-25 21:09:07.000000000","message":"yep makes sense it would like have to be an online migration and it would be complext to corralate","commit_id":"e2f79efabc6b74583eedfdf8a0162b23eae0e121"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cc3afd9a66a6f93c32fe2c7ae22ed44414c23100","unresolved":false,"context_lines":[{"line_number":207,"context_line":"  Migration versioned object."},{"line_number":208,"context_line":"* Modify the API to expose the ``user_id`` and ``project_id`` fields in"},{"line_number":209,"context_line":"  GET responses that expose migration resources."},{"line_number":210,"context_line":"* Add related tests"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"Dependencies"},{"line_number":213,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7faddb67_ba834e56","line":210,"updated":"2019-07-25 20:54:42.000000000","message":"microversion paperwork blah blah","commit_id":"e2f79efabc6b74583eedfdf8a0162b23eae0e121"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d3968407fe9ee423e0906ac60441b4991db74ffa","unresolved":false,"context_lines":[{"line_number":207,"context_line":"  Migration versioned object."},{"line_number":208,"context_line":"* Modify the API to expose the ``user_id`` and ``project_id`` fields in"},{"line_number":209,"context_line":"  GET responses that expose migration resources."},{"line_number":210,"context_line":"* Add related tests"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"Dependencies"},{"line_number":213,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7faddb67_fabea6fd","line":210,"in_reply_to":"7faddb67_ba834e56","updated":"2019-07-25 21:08:53.000000000","message":"Done","commit_id":"e2f79efabc6b74583eedfdf8a0162b23eae0e121"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7fda4de74345d113f2629d17fa2c54945b349d23","unresolved":false,"context_lines":[{"line_number":59,"context_line":"it makes sense for them to include the user_id/project_id like servers when"},{"line_number":60,"context_line":"they are created and by whom."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"Data model impact"},{"line_number":63,"context_line":"-----------------"},{"line_number":64,"context_line":"Add ``user_id`` and ``project_id`` columns to the ``migrations`` table. The"},{"line_number":65,"context_line":"schema will be the same as in the ``instances`` and ``instance_actions``"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7faddb67_3af99e7f","line":62,"updated":"2019-07-25 21:17:06.000000000","message":"As Sean pointed out in PS3 we\u0027d likely want index(es?) for user_id and project_id filtering.","commit_id":"1a04191494db4f19e22e4486d5b0c7535f4234f3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"e01c9e7559bf49da65e1b503bb1b3c15eb82a143","unresolved":false,"context_lines":[{"line_number":59,"context_line":"it makes sense for them to include the user_id/project_id like servers when"},{"line_number":60,"context_line":"they are created and by whom."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"Data model impact"},{"line_number":63,"context_line":"-----------------"},{"line_number":64,"context_line":"Add ``user_id`` and ``project_id`` columns to the ``migrations`` table. The"},{"line_number":65,"context_line":"schema will be the same as in the ``instances`` and ``instance_actions``"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7faddb67_e272787c","line":62,"in_reply_to":"7faddb67_3af99e7f","updated":"2019-07-26 04:17:22.000000000","message":"Most of times, the index doesn\u0027t help for anything. Hope Jay is here. \n\nFor the API \u0027GET /os-migrations\u0027,\nIt has a lot of query parameters. But for an index, for example, (user_id, project_id), it won\u0027t works for other query parameter, also won\u0027t work with user_id and project_id and appending any other parameter.\n\nThe index (user_id, project_id) only works when filter user_id first, then filter with project_id. It also doesn\u0027t work only query with project_id.\n\nWe only can optimize the case like query user_id and project_id at same time, and query user_id or project_id separately. With three index (user_id, project_id), (user_id), (project_id)","commit_id":"1a04191494db4f19e22e4486d5b0c7535f4234f3"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4a9d4130783ead9d4d5b4f95f5db244785332aa1","unresolved":false,"context_lines":[{"line_number":59,"context_line":"it makes sense for them to include the user_id/project_id like servers when"},{"line_number":60,"context_line":"they are created and by whom."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"Data model impact"},{"line_number":63,"context_line":"-----------------"},{"line_number":64,"context_line":"Add ``user_id`` and ``project_id`` columns to the ``migrations`` table. The"},{"line_number":65,"context_line":"schema will be the same as in the ``instances`` and ``instance_actions``"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7faddb67_f6355adc","line":62,"in_reply_to":"7faddb67_e272787c","updated":"2019-07-26 10:34:45.000000000","message":"this is an implematnion detail to be honest\n\ni was think of having two sepereate indexes\n(user_id), (project_id) but a DBA can alway add one\nif they like and if people use this feature a lot and\ncomplain about the performace we can adress it then.","commit_id":"1a04191494db4f19e22e4486d5b0c7535f4234f3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6fd8cb1dfd6fe4c24d173c53b761a20bec5030d7","unresolved":false,"context_lines":[{"line_number":59,"context_line":"it makes sense for them to include the user_id/project_id like servers when"},{"line_number":60,"context_line":"they are created and by whom."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"Data model impact"},{"line_number":63,"context_line":"-----------------"},{"line_number":64,"context_line":"Add ``user_id`` and ``project_id`` columns to the ``migrations`` table. The"},{"line_number":65,"context_line":"schema will be the same as in the ``instances`` and ``instance_actions``"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7faddb67_c3765b3f","line":62,"in_reply_to":"7faddb67_f6355adc","updated":"2019-07-26 13:18:05.000000000","message":"Yeah it\u0027s also an admin-only API by default so I\u0027m less worried about overall performance since it\u0027s not impacting to tenant users.","commit_id":"1a04191494db4f19e22e4486d5b0c7535f4234f3"}],"specs/train/approved/add-user-id-to-the-migrations-table.rst":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4b3434a9bdb478dd02ed7eaa864f54eb68d7020a","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The blueprint proposed to adding the ``user_id`` field to the migrations"},{"line_number":14,"context_line":"table in nova DB."},{"line_number":15,"context_line":"When the sever is host to host, displaying the operator in the server"},{"line_number":16,"context_line":"migration history."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_c704881a","line":15,"range":{"start_line":15,"start_character":31,"end_line":15,"end_character":55},"updated":"2019-07-02 02:51:25.000000000","message":"display the operator that started the migration","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4b3434a9bdb478dd02ed7eaa864f54eb68d7020a","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The blueprint proposed to adding the ``user_id`` field to the migrations"},{"line_number":14,"context_line":"table in nova DB."},{"line_number":15,"context_line":"When the sever is host to host, displaying the operator in the server"},{"line_number":16,"context_line":"migration history."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_070f0037","line":15,"range":{"start_line":15,"start_character":18,"end_line":15,"end_character":30},"updated":"2019-07-02 02:51:25.000000000","message":"moved from on host to another","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":30077,"name":"Qiu Fossen","display_name":"fossnqiu","email":"qiujunting@inspur.com","username":"qiufossen"},"change_message_id":"2f7450d845445c1f870d923a0a98fa961138bf6f","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The blueprint proposed to adding the ``user_id`` field to the migrations"},{"line_number":14,"context_line":"table in nova DB."},{"line_number":15,"context_line":"When the sever is host to host, displaying the operator in the server"},{"line_number":16,"context_line":"migration history."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_c247964b","line":15,"range":{"start_line":15,"start_character":18,"end_line":15,"end_character":30},"in_reply_to":"9fb8cfa7_070f0037","updated":"2019-07-03 01:40:41.000000000","message":"Your description is more accurate，thank you !I will modify it.","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":30077,"name":"Qiu Fossen","display_name":"fossnqiu","email":"qiujunting@inspur.com","username":"qiufossen"},"change_message_id":"2f7450d845445c1f870d923a0a98fa961138bf6f","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The blueprint proposed to adding the ``user_id`` field to the migrations"},{"line_number":14,"context_line":"table in nova DB."},{"line_number":15,"context_line":"When the sever is host to host, displaying the operator in the server"},{"line_number":16,"context_line":"migration history."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_e242da3a","line":15,"range":{"start_line":15,"start_character":31,"end_line":15,"end_character":55},"in_reply_to":"9fb8cfa7_c704881a","updated":"2019-07-03 01:40:41.000000000","message":"Your description is more accurate，thank you !I will modify it.","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4b3434a9bdb478dd02ed7eaa864f54eb68d7020a","unresolved":false,"context_lines":[{"line_number":13,"context_line":"The blueprint proposed to adding the ``user_id`` field to the migrations"},{"line_number":14,"context_line":"table in nova DB."},{"line_number":15,"context_line":"When the sever is host to host, displaying the operator in the server"},{"line_number":16,"context_line":"migration history."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Problem description"},{"line_number":19,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_8200be02","line":16,"range":{"start_line":16,"start_character":10,"end_line":16,"end_character":17},"updated":"2019-07-02 02:51:25.000000000","message":"responce","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":30077,"name":"Qiu Fossen","display_name":"fossnqiu","email":"qiujunting@inspur.com","username":"qiufossen"},"change_message_id":"2f7450d845445c1f870d923a0a98fa961138bf6f","unresolved":false,"context_lines":[{"line_number":13,"context_line":"The blueprint proposed to adding the ``user_id`` field to the migrations"},{"line_number":14,"context_line":"table in nova DB."},{"line_number":15,"context_line":"When the sever is host to host, displaying the operator in the server"},{"line_number":16,"context_line":"migration history."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Problem description"},{"line_number":19,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_c2b55633","line":16,"range":{"start_line":16,"start_character":10,"end_line":16,"end_character":17},"in_reply_to":"9fb8cfa7_8200be02","updated":"2019-07-03 01:40:41.000000000","message":"Thank you for your suggestion, but I think the history is more accurate.","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4b3434a9bdb478dd02ed7eaa864f54eb68d7020a","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Problem description"},{"line_number":19,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":20,"context_line":"Currently, the migration, live_migration, resize, and evacuate for instance,"},{"line_number":21,"context_line":"and the user ID cannot be recorded in the database. Therefore, different users"},{"line_number":22,"context_line":"perform the above four operations on instance, the user identity cannot be"},{"line_number":23,"context_line":"determined in the instance migration record."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_473898ec","line":21,"range":{"start_line":20,"start_character":0,"end_line":21,"end_character":51},"updated":"2019-07-02 02:51:25.000000000","message":"im pretty sure its recored in the server action\n\nunless the user_id in the instance action payload is not the user that starte the action but i cant think of what else it would be.\n\n{\n    \"instanceActions\": [\n        {\n            \"action\": \"stop\",\n            \"instance_uuid\": \"fcd19ef2-b593-40b1-90a5-fc31063fa95c\",\n            \"message\": null,\n            \"project_id\": \"6f70656e737461636b20342065766572\",\n            \"request_id\": \"req-f8a59f03-76dc-412f-92c2-21f8612be728\",\n            \"start_time\": \"2018-04-25T01:26:29.092892\",\n            \"user_id\": \"admin\"\n        },\n        {\n            \"action\": \"create\",\n            \"instance_uuid\": \"fcd19ef2-b593-40b1-90a5-fc31063fa95c\",\n            \"message\": null,\n            \"project_id\": \"6f70656e737461636b20342065766572\",\n            \"request_id\": \"req-50189019-626d-47fb-b944-b8342af09679\",\n            \"start_time\": \"2018-04-25T01:26:25.877278\",\n            \"user_id\": \"admin\"\n        }\n    ]\n}\n\nhttps://developer.openstack.org/api-ref/compute/?expanded\u003dlist-actions-for-server-detail#list-actions-for-server","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":30077,"name":"Qiu Fossen","display_name":"fossnqiu","email":"qiujunting@inspur.com","username":"qiufossen"},"change_message_id":"2f7450d845445c1f870d923a0a98fa961138bf6f","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Problem description"},{"line_number":19,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":20,"context_line":"Currently, the migration, live_migration, resize, and evacuate for instance,"},{"line_number":21,"context_line":"and the user ID cannot be recorded in the database. Therefore, different users"},{"line_number":22,"context_line":"perform the above four operations on instance, the user identity cannot be"},{"line_number":23,"context_line":"determined in the instance migration record."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_62282a32","line":21,"range":{"start_line":20,"start_character":0,"end_line":21,"end_character":51},"in_reply_to":"9fb8cfa7_473898ec","updated":"2019-07-03 01:40:41.000000000","message":"Yeah, you are right, but the following record has no user_id.\nGET /servers/{server_id}/migrations\n{\n    \"migrations\": [\n        {\n            \"created_at\": \"2016-01-29T13:42:02.000000\",\n            \"dest_compute\": \"compute2\",\n            \"dest_host\": \"1.2.3.4\",\n            \"dest_node\": \"node2\",\n            \"id\": 1,\n            \"server_uuid\": \"4cfba335-03d8-49b2-8c52-e69043d1e8fe\",\n            \"source_compute\": \"compute1\",\n            \"source_node\": \"node1\",\n            \"status\": \"running\",\n            \"memory_total_bytes\": 123456,\n            \"memory_processed_bytes\": 12345,\n            \"memory_remaining_bytes\": 111111,\n            \"disk_total_bytes\": 234567,\n            \"disk_processed_bytes\": 23456,\n            \"disk_remaining_bytes\": 211111,\n            \"updated_at\": \"2016-01-29T13:42:02.000000\",\n            \"uuid\": \"12341d4b-346a-40d0-83c6-5f4f6892b650\"\n        }\n    ]\n}\nhttps://developer.openstack.org/api-ref/compute/?expanded\u003dlist-migrations-detail,id326-detail","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4b3434a9bdb478dd02ed7eaa864f54eb68d7020a","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Use Cases"},{"line_number":26,"context_line":"---------"},{"line_number":27,"context_line":"As an user, I would like to kown who operates the instance through the"},{"line_number":28,"context_line":"instance migration history. So, the user id field needs to add in the"},{"line_number":29,"context_line":"migrations DB."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Proposed change"},{"line_number":32,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_c72b2892","line":29,"range":{"start_line":27,"start_character":0,"end_line":29,"end_character":14},"updated":"2019-07-02 02:51:25.000000000","message":"as a user im not sure it is appriate for you to know why live migratied your isntace as that is an admin only action.\nbut that said i think this is perferctly valid for an operator to know.","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":30077,"name":"Qiu Fossen","display_name":"fossnqiu","email":"qiujunting@inspur.com","username":"qiufossen"},"change_message_id":"2f7450d845445c1f870d923a0a98fa961138bf6f","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Use Cases"},{"line_number":26,"context_line":"---------"},{"line_number":27,"context_line":"As an user, I would like to kown who operates the instance through the"},{"line_number":28,"context_line":"instance migration history. So, the user id field needs to add in the"},{"line_number":29,"context_line":"migrations DB."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Proposed change"},{"line_number":32,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_e6f65b91","line":29,"range":{"start_line":27,"start_character":0,"end_line":29,"end_character":14},"in_reply_to":"9fb8cfa7_5b0628d0","updated":"2019-07-03 01:40:41.000000000","message":"Yeah, for example, Bob and Sally have the right to live migrate instance. \nbut I want to determine whether Bob is operated by user_id or Sally.\nThank you very much !","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"985ba63fe207a3cf0841c007bdb008df63669696","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Use Cases"},{"line_number":26,"context_line":"---------"},{"line_number":27,"context_line":"As an user, I would like to kown who operates the instance through the"},{"line_number":28,"context_line":"instance migration history. So, the user id field needs to add in the"},{"line_number":29,"context_line":"migrations DB."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Proposed change"},{"line_number":32,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_5b0628d0","line":29,"range":{"start_line":27,"start_character":0,"end_line":29,"end_character":14},"in_reply_to":"9fb8cfa7_c72b2892","updated":"2019-07-02 13:51:09.000000000","message":"This is just an audit use case right? By \"user\" here I think they mean \"person\", not non-admin tenant user.\n\nSo I think this is basically saying, between admins that have access to migrate VMs, they want to record the RequestContext.user_id of the user (person) that made the actual request, e.g. Bob and Sally are both admins that can live migrate things around, and they want to audit later who actually initiated the live migration.","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":30077,"name":"Qiu Fossen","display_name":"fossnqiu","email":"qiujunting@inspur.com","username":"qiufossen"},"change_message_id":"2f7450d845445c1f870d923a0a98fa961138bf6f","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Use Cases"},{"line_number":26,"context_line":"---------"},{"line_number":27,"context_line":"As an user, I would like to kown who operates the instance through the"},{"line_number":28,"context_line":"instance migration history. So, the user id field needs to add in the"},{"line_number":29,"context_line":"migrations DB."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Proposed change"},{"line_number":32,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_ca89e86e","line":29,"range":{"start_line":27,"start_character":0,"end_line":29,"end_character":14},"in_reply_to":"9fb8cfa7_c72b2892","updated":"2019-07-03 01:40:41.000000000","message":"What you said is also very reasonable, but in the actual application, there will be multiple administrators, it is very important to record the administrator\u0027s information. And there are customers who have such a need, so it is still necessary.","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6bea1f3dbdc32e5c45576bfbfcc256317de854b4","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"  - Record ``user_id`` to the ``migrations`` table"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"  - Querying the instance migration record has ``user_id``"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7faddb67_5f6ecc96","line":37,"updated":"2019-07-25 20:24:20.000000000","message":"What does this mean? Add user_id as a filter parameter when listing migrations, e.g. GET /os-migrations?user_id\u003dBob?","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"985ba63fe207a3cf0841c007bdb008df63669696","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"},{"line_number":41,"context_line":"None"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Data model impact"},{"line_number":44,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_5bd4e81f","line":41,"updated":"2019-07-02 13:51:09.000000000","message":"Don\u0027t the server actions APIs show who performed an operation on a server? There is a user_id field:\n\nhttps://developer.openstack.org/api-ref/compute/?expanded\u003d#servers-actions-servers-os-instance-actions\n\nI\u0027m just not sure if the description in the API reference is correct, i.e. is the action user_id the user that owns the server or the user that initiated the action (I think it\u0027s the latter):\n\nhttps://github.com/openstack/nova/blob/5c6c1f8fce7cd976dedc0a1ad28836ed87af2780/nova/objects/instance_action.py#L56\n\nThen we definitely have an alternative to what\u0027s proposed here - just use the instance actions API which is already our server audit log API more or less.","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":30077,"name":"Qiu Fossen","display_name":"fossnqiu","email":"qiujunting@inspur.com","username":"qiufossen"},"change_message_id":"191e4e00e6ef4e5e1c6648861adba38087d4baba","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"},{"line_number":41,"context_line":"None"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Data model impact"},{"line_number":44,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7faddb67_84f8857c","line":41,"in_reply_to":"7faddb67_2451910f","updated":"2019-07-25 03:39:26.000000000","message":"I agree with you, but by request_id to find user_id is not accurate.\nAdd the user_id field to obtain the user_id of the migration operation is accurate. \nIn practical applications, it is necessary to achieve accuracy.\nThe problem of frequent migration operations, I think it should enhance the stability\nof the product, and can not limit the implementation of new features because of this problem.\nAt the same time, the problem of Huawei\u0027s public cloud can not explain that other public clouds\nwill have similar problems.","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"66d0bb11524e9d427386a9151cdbf3b35cf267dc","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"},{"line_number":41,"context_line":"None"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Data model impact"},{"line_number":44,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7faddb67_2451910f","line":41,"in_reply_to":"7faddb67_34e0f996","updated":"2019-07-25 02:09:38.000000000","message":"I\u0027m not totally against adding user_id and project_id to migration records to track who initiated the migrations.\n\nI think they do happen frequently in public clouds during upgrades to avoid downtime (Huawei public cloud and Vexxhost do a lot of live migrations for upgrades when you have a lot of compute nodes and can\u0027t have downtime unlike in a private cloud with weekend maintenance windows).\n\nI don\u0027t like the overlap of the user_id/project_id duplication with instance action records, but as noted above there aren\u0027t great alternatives to try and avoid that duplication.\n\nAlso, migration records are more or less top-level kind of resources in the compute API, like servers, so I don\u0027t think it\u0027s totally unreasonable to track who initiated the migration on that record itself.\n\nI\u0027m still -1 on the spec since it needs quite a bit of cleaning up and explaining that it could be possible - although quite complicated and potentially error prone - to figure out who initiated a migration using instance action records as I\u0027ve described, but the proposal is much simpler than that alternative.","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f8edb2d90a653b8df97a9c051ddc966aa980eefb","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"},{"line_number":41,"context_line":"None"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Data model impact"},{"line_number":44,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7faddb67_77a20c4e","line":41,"in_reply_to":"7faddb67_40f1e8cc","updated":"2019-07-22 20:06:39.000000000","message":"\u003e Hi! I have a question, how do I match the user_id of instance\n \u003e action with the instance in migration DB?\n \u003e There are two matching methods:\n \u003e 1. Match according to the request ID.\n \u003e 2. Add the user_id field in the migration record database.\n \u003e However, the request ID and user_id are not recorded in the\n \u003e migration DB.\n \u003e Therefore, it is necessary to add user_id field to the migration\n \u003e DB.\n\nTo filter all live migrations for a given server, you could do that like:\n\nGET /os-migrations?instance_uuid\u003d\u003cserver_id\u003e\u0026migration_type\u003dlive-migration\n\nFor instance actions on a server, you can get those:\n\nGET /servers/{server_id}/os-instance-actions\n\nAnd then filter the action(s) client-side by the action value. For live migration that would be \"live-migration\".\n\nThe problem is if you have multiple live migrations for the same server, there is not a clear correlation for which action is tied to which migration record. One could possibly sort that out client-side by filtering the actions and migrations based on the created_at or updated_at fields somehow, i.e. if the server is live migrated on Monday, Tuesday and Thursday, then you could correlate that using the created_at values for the associated actions and migrations records in the API - but I admit that\u0027s not very graceful and could be error prone if you have multiple live migrations on the same server in the same day.\n\nIn general it feels wrong to me to include the user_id (and arguably we\u0027d also want to include the project_id also) in the migrations records for the context that initiated the request since that overlaps so much with instance actions, but I can see how trying to correlate who initiated a migration could be confusing as described above. I seem to remember Zhenyu (Kevin) Zheng from Huawei bringing up the idea of storing the request ID in the migrations record so that instance actions could be correlated with the migrations using the request ID which is part of the primary key for actions, but that was awhile ago and I think for what he needed at the time we resolved by storing the host on the action in 2.62:\n\nhttps://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id56\n\nWe can ask Kevin if he\u0027s work on a similar issue or can remember why he wanted to include the request ID in the migrations records.","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"64c8c6427a7835e591ffb000c2ab696187aa9ec3","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"},{"line_number":41,"context_line":"None"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Data model impact"},{"line_number":44,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7faddb67_34e0f996","line":41,"in_reply_to":"7faddb67_77a20c4e","updated":"2019-07-24 00:39:56.000000000","message":"Hi matt, you said this implementation, through the combination of `GET /os-migrations` and `GET /servers/{server_id}/os-instance-actions` to obtain the migration record of the server, in the case of a single situation to meet customer needs.\n\nFor example, if there is only userA in the test project, then no matter how many times he migrates to the server, the records queried here are credible. However, if there are multiple users (userA, userB, userC ...) under the test project, this method is undoubtedly undesirable, although the migration record can be obtained through the request ID, it is not known who migrated the server.\n\nWe have deployed our own OpenStack products in the financial, telecommunications and other industries. We get this information in communication with users.\n\nAs an administrator, I need to know if the server under the project has been migrated. who is it? When and where to go? (maybe it\u0027s mainly), this helps help customers manage.\n\nIn summary, I think it is necessary to add \u0027user_id\u0027 and /or \u0027project_id\u0027 to the migration records. I think *migration* is not performed frequently in the customer environment, except in the event of a failure.","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"68b2d523e7b2670a3fb7d3a6bb3939de4a47d29c","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"},{"line_number":41,"context_line":"None"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Data model impact"},{"line_number":44,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_6981dc4d","line":41,"in_reply_to":"9fb8cfa7_06accf33","updated":"2019-07-03 02:20:49.000000000","message":"\u0027bug/1935063\u0027 already description this change, so you can push you change, and close this bug.","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":30077,"name":"Qiu Fossen","display_name":"fossnqiu","email":"qiujunting@inspur.com","username":"qiufossen"},"change_message_id":"2f7450d845445c1f870d923a0a98fa961138bf6f","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"},{"line_number":41,"context_line":"None"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Data model impact"},{"line_number":44,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_06accf33","line":41,"in_reply_to":"9fb8cfa7_1b8190fb","updated":"2019-07-03 01:40:41.000000000","message":"Hi Matt Riedemann !Do you mean that I need to report a bug? To correctly describe the API reference,\nlike this：https://bugs.launchpad.net/nova/+bug/1835063","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":30077,"name":"Qiu Fossen","display_name":"fossnqiu","email":"qiujunting@inspur.com","username":"qiufossen"},"change_message_id":"2f7450d845445c1f870d923a0a98fa961138bf6f","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"},{"line_number":41,"context_line":"None"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Data model impact"},{"line_number":44,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_66926bff","line":41,"in_reply_to":"9fb8cfa7_5bd4e81f","updated":"2019-07-03 01:40:41.000000000","message":"For example：\nthe user_id is Bob,but Sally live migrate the instance.\nhttps://developer.openstack.org/api-ref/compute/?expanded\u003dlist-actions-for-server-detail#servers-actions-servers-os-instance-actions\n{\n    \"instanceActions\": [\n        {\n            \"action\": \"stop\",\n            \"instance_uuid\": \"fcd19ef2-b593-40b1-90a5-fc31063fa95c\",\n            \"message\": null,\n            \"project_id\": \"6f70656e737461636b20342065766572\",\n            \"request_id\": \"req-f8a59f03-76dc-412f-92c2-21f8612be728\",\n            \"start_time\": \"2018-04-25T01:26:29.092892\",\n            \"user_id\": \"Bob\"\n        },\n        {\n            \"action\": \"create\",\n            \"instance_uuid\": \"fcd19ef2-b593-40b1-90a5-fc31063fa95c\",\n            \"message\": null,\n            \"project_id\": \"6f70656e737461636b20342065766572\",\n            \"request_id\": \"req-50189019-626d-47fb-b944-b8342af09679\",\n            \"start_time\": \"2018-04-25T01:26:25.877278\",\n            \"user_id\": \"Bob\"\n        }\n    ]\n}\n\nSo the user_id should be Sally. However, according to the information below, it cannot be determined that it is Sally.\nhttps://developer.openstack.org/api-ref/compute/?expanded\u003did326-detail#id326\n{\n    \"migrations\": [\n        {\n            \"created_at\": \"2016-01-29T13:42:02.000000\",\n            \"dest_compute\": \"compute2\",\n            \"dest_host\": \"1.2.3.4\",\n            \"dest_node\": \"node2\",\n            \"id\": 1,\n            \"server_uuid\": \"4cfba335-03d8-49b2-8c52-e69043d1e8fe\",\n            \"source_compute\": \"compute1\",\n            \"source_node\": \"node1\",\n            \"status\": \"running\",\n            \"memory_total_bytes\": 123456,\n            \"memory_processed_bytes\": 12345,\n            \"memory_remaining_bytes\": 111111,\n            \"disk_total_bytes\": 234567,\n            \"disk_processed_bytes\": 23456,\n            \"disk_remaining_bytes\": 211111,\n            \"updated_at\": \"2016-01-29T13:42:02.000000\",\n            \"uuid\": \"12341d4b-346a-40d0-83c6-5f4f6892b650\"\n        }\n    ]\n}","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e8474baad9ed20005facbab4867b76079d0dcee4","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"},{"line_number":41,"context_line":"None"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Data model impact"},{"line_number":44,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_1b8190fb","line":41,"in_reply_to":"9fb8cfa7_5bd4e81f","updated":"2019-07-02 13:55:06.000000000","message":"Reported a bug for the incorrect description in the API reference:\n\nhttps://bugs.launchpad.net/nova/+bug/1835063","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":30077,"name":"Qiu Fossen","display_name":"fossnqiu","email":"qiujunting@inspur.com","username":"qiufossen"},"change_message_id":"0276c789b962f43fee55a344e698d8b0267aba19","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"},{"line_number":41,"context_line":"None"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Data model impact"},{"line_number":44,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7faddb67_40f1e8cc","line":41,"in_reply_to":"9fb8cfa7_66926bff","updated":"2019-07-11 02:45:11.000000000","message":"Hi! I have a question, how do I match the user_id of instance action with the instance in migration DB?\nThere are two matching methods: \n    1. Match according to the request ID.\n    2. Add the user_id field in the migration record database.\nHowever, the request ID and user_id are not recorded in the migration DB. \nTherefore, it is necessary to add user_id field to the migration DB.","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":30077,"name":"Qiu Fossen","display_name":"fossnqiu","email":"qiujunting@inspur.com","username":"qiufossen"},"change_message_id":"0276c789b962f43fee55a344e698d8b0267aba19","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"},{"line_number":41,"context_line":"None"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Data model impact"},{"line_number":44,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_09d70052","line":41,"in_reply_to":"9fb8cfa7_6981dc4d","updated":"2019-07-11 02:45:11.000000000","message":"Yeah, thank you very much Brin Zhang !","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"28ad0184556e683b17ac90e474a5948e6da5f033","unresolved":false,"context_lines":[{"line_number":44,"context_line":"-----------------"},{"line_number":45,"context_line":"None"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"REST API impact"},{"line_number":48,"context_line":"---------------"},{"line_number":49,"context_line":"None"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_e16f3c5d","line":47,"range":{"start_line":47,"start_character":0,"end_line":47,"end_character":15},"updated":"2019-07-01 21:24:11.000000000","message":"If this isn\u0027t going to be returned in GET /os-migrations and/or GET /servers/{server_id}/migrations[/{migration_id}, how is it useful? Are you expecting admins to dump the database directly to see it?","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":30077,"name":"Qiu Fossen","display_name":"fossnqiu","email":"qiujunting@inspur.com","username":"qiufossen"},"change_message_id":"2f7450d845445c1f870d923a0a98fa961138bf6f","unresolved":false,"context_lines":[{"line_number":44,"context_line":"-----------------"},{"line_number":45,"context_line":"None"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"REST API impact"},{"line_number":48,"context_line":"---------------"},{"line_number":49,"context_line":"None"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_8a1e906d","line":47,"range":{"start_line":47,"start_character":0,"end_line":47,"end_character":15},"in_reply_to":"9fb8cfa7_6746fc7d","updated":"2019-07-03 01:40:41.000000000","message":"You said that user_id is the owner of the instance, but if there\nare more than one super administrators who can operate the instance, then it is necessary to add user_id to the migration record.","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":30077,"name":"Qiu Fossen","display_name":"fossnqiu","email":"qiujunting@inspur.com","username":"qiufossen"},"change_message_id":"2f7450d845445c1f870d923a0a98fa961138bf6f","unresolved":false,"context_lines":[{"line_number":44,"context_line":"-----------------"},{"line_number":45,"context_line":"None"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"REST API impact"},{"line_number":48,"context_line":"---------------"},{"line_number":49,"context_line":"None"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_07faa0bb","line":47,"range":{"start_line":47,"start_character":0,"end_line":47,"end_character":15},"in_reply_to":"9fb8cfa7_e16f3c5d","updated":"2019-07-03 01:40:41.000000000","message":"I\u0027m very sorry ! The user_id is going to be returned in GET /os-migrations and/or GET /servers/{server_id}/migrations[/{migration_id}","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4b3434a9bdb478dd02ed7eaa864f54eb68d7020a","unresolved":false,"context_lines":[{"line_number":44,"context_line":"-----------------"},{"line_number":45,"context_line":"None"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"REST API impact"},{"line_number":48,"context_line":"---------------"},{"line_number":49,"context_line":"None"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_6746fc7d","line":47,"range":{"start_line":47,"start_character":0,"end_line":47,"end_character":15},"in_reply_to":"9fb8cfa7_e16f3c5d","updated":"2019-07-02 02:51:25.000000000","message":"i think they want to see what user started the migration but that should already be in teh instace action log\n\nhttps://developer.openstack.org/api-ref/compute/?expanded\u003dlist-actions-for-server-detail#list-actions-for-server\n\n\ni guess the other places that would make sense to view this would be https://developer.openstack.org/api-ref/compute/?expanded\u003dshow-migration-details-detail#show-migration-details\n\nin either case wihtout an api change i dont see why we would do this.","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4b3434a9bdb478dd02ed7eaa864f54eb68d7020a","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"Notifications impact"},{"line_number":56,"context_line":"--------------------"},{"line_number":57,"context_line":"None"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"Other end user impact"},{"line_number":60,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_275c8449","line":57,"range":{"start_line":57,"start_character":0,"end_line":57,"end_character":4},"updated":"2019-07-02 02:51:25.000000000","message":"if we change the migration object it will proably change the versioned notifications too.","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":30077,"name":"Qiu Fossen","display_name":"fossnqiu","email":"qiujunting@inspur.com","username":"qiufossen"},"change_message_id":"2f7450d845445c1f870d923a0a98fa961138bf6f","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"Notifications impact"},{"line_number":56,"context_line":"--------------------"},{"line_number":57,"context_line":"None"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"Other end user impact"},{"line_number":60,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_4f142a4d","line":57,"range":{"start_line":57,"start_character":0,"end_line":57,"end_character":4},"in_reply_to":"9fb8cfa7_275c8449","updated":"2019-07-03 01:40:41.000000000","message":"Yeah, it will change the nova/objects/migration.py as this:\n\nVERSION \u003d \u00271.5\u0027\n\n... ...\n\nfiled \u003d {\n    \u0027id\u0027:fields.IntegerField(),\n    ... ...\n    \u0027user_id : fields.StringField(nullable\u003dTrue),\n}\n\n... ...\n\ndef _from_db_object(context, migration, db_migration):\n    ... ...\n    if tartget_version \u003c (1, 5) and \u0027user_id\u0027 in primitive:\n        del primitive[\u0027user_id\u0027]","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"28ad0184556e683b17ac90e474a5948e6da5f033","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"Upgrade impact"},{"line_number":76,"context_line":"--------------"},{"line_number":77,"context_line":"None"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"Implementation"},{"line_number":80,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_c1a9d87b","line":77,"range":{"start_line":77,"start_character":0,"end_line":77,"end_character":4},"updated":"2019-07-01 21:24:11.000000000","message":"database migration?","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":30077,"name":"Qiu Fossen","display_name":"fossnqiu","email":"qiujunting@inspur.com","username":"qiufossen"},"change_message_id":"2f7450d845445c1f870d923a0a98fa961138bf6f","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"Upgrade impact"},{"line_number":76,"context_line":"--------------"},{"line_number":77,"context_line":"None"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"Implementation"},{"line_number":80,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_271ec40b","line":77,"range":{"start_line":77,"start_character":0,"end_line":77,"end_character":4},"in_reply_to":"9fb8cfa7_c1a9d87b","updated":"2019-07-03 01:40:41.000000000","message":"I\u0027m very sorry !The impact is that adding the user_id in migrations database.","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4b3434a9bdb478dd02ed7eaa864f54eb68d7020a","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"Upgrade impact"},{"line_number":76,"context_line":"--------------"},{"line_number":77,"context_line":"None"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"Implementation"},{"line_number":80,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_e7518c31","line":77,"range":{"start_line":77,"start_character":0,"end_line":77,"end_character":4},"in_reply_to":"9fb8cfa7_c1a9d87b","updated":"2019-07-02 02:51:25.000000000","message":"it would be an offline migration proably but yes.\n\nyou could possinble use the server actions to populate it with the user that started all the old migrations but i dont think that is worth an online data migration.","commit_id":"dcce62cdd6c92146418c086afecd4ef2a3e7cd71"}]}
