)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"73baf9c1efdaf1080d7483324fab22b40a837f6a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"4415cd90_f6249cec","updated":"2022-03-22 00:16:31.000000000","message":"Hello, I would like to send attention to Wu. Thanks in advance, Hirotaka.","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"6da576e012fece58321e60210fe82d5bd56c1f60","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"f9aba525_be79461b","updated":"2022-03-22 00:15:12.000000000","message":"Hi Wu! Could you please check this? Here are some points to review.\n\n* The Nova API added \"userdata\" parameter and deprecated the \"files\" parameter[1]. \"config_drive\" parameter is irrelevant. \n* However, recent patch[2] in Trove changed the \"config_drive\" parameter value by changing the default value of \"use_nova_server_config_drive\" in trove.conf. I think we should revert that part. \n* prepare_cloud_config function is a really good job, but this PR changes the prepare_cloud_config function a little because I think this function should prepare userdata only when files is defined, which is based on Nova API specification change. \n* Recent patch[2] in Trove changed the existing test code(test_servers_create_block_device_mapping_v2), but I think it should be avoided unnecessaily. This PR reverts that part.\n\n---\n[1]: https://opendev.org/openstack/nova/commit/126c3d4c78d937888213979272534e1cb706a4d4\n[2]: https://review.opendev.org/c/openstack/trove/+/823632","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"86c7b4c8b31b9b798c54d49119f22df0748af869","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"999d5a9c_73b69dd0","updated":"2022-04-03 15:33:23.000000000","message":"Hi Wu, sorry for my late reply. I think there are two ways to add ssh-key to Trove Guest OS. I will investigate the second way this week.\n\n1) Add ssh-key to guest os statically\nssh-key is injected by the following dib scripts.\nhttps://github.com/openstack/trove/blob/master/integration/scripts/files/elements/ubuntu-guest/extra-data.d/11-ssh-key-dev\n\n2) Add ssh-key to guest os dynamically by using Nova Create Server API\nssh-key is injected by Nova Create Server API. The API document says:\n\u003e Include the key_name parameter in the create request body to add a keypair to the server when you create it.\n\nI will investigate how the Nova API parses the parameters and passes the parameter values to cloud-init this week.\nhttps://docs.openstack.org/api-ref/compute/?expanded\u003dcreate-server-detail#create-server","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":28691,"name":"Bo Tran","email":"ministry.96.nd@gmail.com","username":"ministry"},"change_message_id":"093203a7b374dc75dcc8d4c5994221442875d455","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"3cbc3a3e_a46f8ae1","updated":"2022-03-22 03:21:29.000000000","message":"I\u0027m owner of patch [2]. I had some comment. please review.","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"43f5a6b8b175274cc90de91ef03a13fe5599f0b6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"5572c110_97454d13","in_reply_to":"00432df5_20ff3dc3","updated":"2022-04-05 14:23:14.000000000","message":"Hi,Hirotaka  thanks a lot , yes, We need add Openstack as datasource for cloud init. As Tran mentioned, config-driver doesn\u0027t support live migration, And the previous patch has converted the files to user-data. Trove agent should also work with config-driver\u003dfalse now. What will we benefit from if we revert the config-driver to true ?","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"baeac7e2a492f574e3487d625b804112d7e12cd2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"93ab1ef9_7e94d66a","in_reply_to":"4415cd90_f6249cec","updated":"2022-03-22 01:30:31.000000000","message":"ok, I will take some time to review this ps.","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"91eaf68c71a8e8aa46d21fd22d196c6b45247823","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"c4a8e6cf_68b4b9da","in_reply_to":"5572c110_97454d13","updated":"2022-04-07 05:48:46.000000000","message":"Hi Wu, Thanks for your comments! \n\n\u003e As Tran mentioned, config-driver doesn\u0027t support live migration, \nYes! I understand that Trove users who use nova\u0027s live migration feature must use \"config_drive\u003dFalse\" when calling the Nova API. When calling the nova API with \"config_drive\u003dFalse\", I think all Trove users have to configure config-init to read files from meta data service instead of config drive even if they don\u0027t use nova\u0027s live migration feature.\n\n\u003e And the previous patch has d the files to user-data. \nYes, user-data is a recommended alternative to files. \n\nOne point to remember is that \"use_nova_server_config_drive\u003dFalse\" is not necessary to read user-data because cloud-init can read user-data from meta data service by using \"curl http://169.254.169.254/openstack/latest/user_data\". However the current code seems that \"use_nova_server_config_drive\u003dFalse\" is required to convert files to user-data. I think this should be fixed.\n\n\u003e Trove agent should also work with config-driver\u003dfalse now. \nYes, it also works for me, but in my case, I added the following setting to /etc/cloud/cloud.cfg in my image to read user-data from meta data service.\n```\ndatasource_list: [  ConfigDrive, OpenStack, None ]\n```\n\n\u003e What will we benefit from if we revert the config-driver to true ?\nThere is a benefit for users who currently configure cloud-init to read user-data from config-drive. If we revert that, they need not to change their guest images when updating OpenStack version to Yoga. If we don\u0027t revert that, the required files(controller.conf, guest_info.conf and trove-guestagent.conf) for guest-agent are not created in their guest instances and guest-agent fails to start after their updates.\n\nI\u0027m a little worried that changing config-driver setting possibly causes a negative influence and some users have to change their configuration to avoid that. In addition, we don\u0027t know how many users need to change their configuration. As I reported in my previous comment, the cloud-init setting environment(DIB_CLOUD_INIT_DATASOURCES) in Trove is \"ConfigDrive\". \n\nI think that patch[1] is confusing a bit, because changing the default value is not required to adapt to file injection deprecation. I understand live migration is very useful in some cases, but as Nova\u0027s document[2] says some hypervisor drivers are not support live migration. This means to me that we should discuss more on using live migration in Trove as a default.\n\n---\n[1]: https://review.opendev.org/c/openstack/trove/+/823632\n[2]: https://docs.openstack.org/nova/latest/admin/configuring-migrations.html","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"daedc92229a47f79bf6cb655ebcef2339fcf29f1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"00432df5_20ff3dc3","in_reply_to":"999d5a9c_73b69dd0","updated":"2022-04-04 18:30:21.000000000","message":"Hi Wu, I have investigated the nova API and the Trove guest image. Arguments passed by the openstack server create API appear in both config drive and the metadata service.\n\nTo enable the config drive for an instance, we pass \"config-drive\u003dtrue\" to the openstack server create API. However, cloud-init behavior actually depends on cloud-init configuration in guest images. The current cloud-init configuration in Trove\u0027s guest image is:\n\n---/etc/cloud/cloud.cfg.d/91-dib-cloud-init-datasources.cfg---\n\"datasource_list: [  ConfigDrive, None ]\"\n---/etc/cloud/cloud.cfg.d/91-dib-cloud-init-datasources.cfg---\n\nThis means cloud-init still gets metadata from config drive even if we pass \"config-drive\u003dfalse\" to the openstack server create API. If we really want to disable config-drive, we have to use metadata service to get metadata. So we have to change cloud-init configuration in guest images like this:\n\n---/etc/cloud/cloud.cfg.d/91-dib-cloud-init-datasources.cfg---\n\"datasource_list: [  ConfigDrive, OpenStack, None ]\"\n---/etc/cloud/cloud.cfg.d/91-dib-cloud-init-datasources.cfg---\n\nFor a Trove user, we currently have no reason to change the \"config-drive\" value because nova\u0027s config_drive is not relevant with files deprecation. I think we should put the config_drive parameter value back to True. Changing the existing guest images for no sufficient reasons is not welcome to normal users.","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"8347871ccc9e90ae063c9a0c15903a05ea9b0477","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"20a74e42_65567e7f","updated":"2022-04-25 17:31:34.000000000","message":"Hi Wu, I have investigated the reason why the \"use_nova_server_config_drive\" directive was introduced[1]. The commit log says:\n```\nFix broken instance provisioning with disabled volume support\n\nReasons:\n - in certain deployments that has disabled volume support, different volume types\n   (iSCSI instead of virtio) Trove doesn\u0027t inject trove-guestagent.conf, userdata,\n   disables \"config-drive\"-based injection\nChanges:\n - refactoring code to use one common function to prepare files and usedata\n - adding to Nova call:\n   - config_drive parameter;\n   - userdata\n```\n\nI think changing the default value of the directive to \"False\" means Trove doesn\u0027t inject trove-guestagent.conf. So Trove users have to choose either A or B to avoid the problem.\n\nA. Change \"use_nova_server_config_drive\" in trove.conf to True explicitly and then restart Trove.\nB. Change their guest images to make cloud-init inject user-data by using metadata service.\n\nI don\u0027t understand the reason to have changed the default value to \"False\" well. As I commented previously changing the default value  is not necessary to adapt nova\u0027s file deprecation.\n\nThanks in advance,\nHirotaka\n \n---\n[1]: https://opendev.org/openstack/trove/commit/3e618f316da4903571c4e4af8243fb70b372f78d\n","commit_id":"00ef3b7fb5356daa74763dd33f84dc1505d0ed38"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"fad27c522f126cb4e836da70363a5fc8c73fa1c0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"0a64a9b6_fc0fef79","updated":"2022-05-11 12:46:29.000000000","message":"because we can not merge the parent patch. Could you abandon this, and re-submit a change? thanks ","commit_id":"563f352df1e6513b3302a980a40ec424e3ef5c13"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"64c1d9d2d1efc0cb99133e43d1f92eaf78b4a6fb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"e8c14617_dba3eb81","in_reply_to":"0a64a9b6_fc0fef79","updated":"2022-05-11 21:34:55.000000000","message":"Hi Wu! Thanks a lot for your comment. I will abandon this and re-submit a change!","commit_id":"563f352df1e6513b3302a980a40ec424e3ef5c13"}],"trove/instance/models.py":[{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"43f5a6b8b175274cc90de91ef03a13fe5599f0b6","unresolved":true,"context_lines":[{"line_number":988,"context_line":"                )"},{"line_number":989,"context_line":"                userdata \u003d userdata + body_userdata"},{"line_number":990,"context_line":""},{"line_number":991,"context_line":"        return userdata if userdata else \"\""},{"line_number":992,"context_line":""},{"line_number":993,"context_line":"    def get_injected_files(self, datastore_manager, datastore_version):"},{"line_number":994,"context_line":"        injected_config_location \u003d CONF.get(\u0027injected_config_location\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"e1315982_cc08fdc0","line":991,"updated":"2022-04-05 14:23:14.000000000","message":"if not files ,userdata is undefined, this should cause syntax error. In which case the files is None ?","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"de54d381b5f828ce6737b2b0a2ed801d2e86ea2d","unresolved":true,"context_lines":[{"line_number":988,"context_line":"                )"},{"line_number":989,"context_line":"                userdata \u003d userdata + body_userdata"},{"line_number":990,"context_line":""},{"line_number":991,"context_line":"        return userdata if userdata else \"\""},{"line_number":992,"context_line":""},{"line_number":993,"context_line":"    def get_injected_files(self, datastore_manager, datastore_version):"},{"line_number":994,"context_line":"        injected_config_location \u003d CONF.get(\u0027injected_config_location\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"d107a693_70ab5953","line":991,"in_reply_to":"e1315982_cc08fdc0","updated":"2022-04-07 06:30:40.000000000","message":"Hi Wu, Thanks for your comment! \n\n\u003e if not files ,userdata is undefined, this should cause syntax error\n\nI have fixed it. I got \"UnboundLocalError: local variable \u0027userdata\u0027 referenced before assignment\" when files is None. \n\n\u003e  In which case the files is None ?\n\nCurrently no such a case exist, but prepare_cloud_config is a public method. So I check the files arguments and return empty if files is None in case for future use case.","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"}],"trove/taskmanager/models.py":[{"author":{"_account_id":28691,"name":"Bo Tran","email":"ministry.96.nd@gmail.com","username":"ministry"},"change_message_id":"093203a7b374dc75dcc8d4c5994221442875d455","unresolved":true,"context_lines":[{"line_number":988,"context_line":""},{"line_number":989,"context_line":"        # Use config_drive instead by userdata"},{"line_number":990,"context_line":"        # We will inject guest config by cloud-config"},{"line_number":991,"context_line":"        if files:"},{"line_number":992,"context_line":"            if not userdata:"},{"line_number":993,"context_line":"                userdata \u003d self.prepare_cloud_config(files)"},{"line_number":994,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"4fd82c25_c6d840eb","line":991,"range":{"start_line":991,"start_character":11,"end_line":991,"end_character":16},"updated":"2022-03-22 03:21:29.000000000","message":"When files haven\u0027t value? I really don\u0027t know why you need check like this. Anw, if you pass config_drive \u003d True when create server, you can\u0027t do live migrate nova instances with backend volume is ceph.\n\nWith patch. I can\u0027t reach my goal.","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"14316222cf8cb431fa24053307e7d863c3e31f7d","unresolved":true,"context_lines":[{"line_number":988,"context_line":""},{"line_number":989,"context_line":"        # Use config_drive instead by userdata"},{"line_number":990,"context_line":"        # We will inject guest config by cloud-config"},{"line_number":991,"context_line":"        if files:"},{"line_number":992,"context_line":"            if not userdata:"},{"line_number":993,"context_line":"                userdata \u003d self.prepare_cloud_config(files)"},{"line_number":994,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a175b3f_bede5986","line":991,"range":{"start_line":991,"start_character":11,"end_line":991,"end_character":16},"in_reply_to":"0f2debef_50d94e87","updated":"2022-04-07 07:35:37.000000000","message":"Hi, Wu! I appreciate your comments!\n\n\u003e config_driver is not relevant with files deprecation. \n\nOK! Thanks a lot for your understanding. That is one thing what I want to tell.\n\n\u003e is it not better to use nova matedata service than config driver? \n\nWe can use metadata service as well as config driver when Trove users make a cloud-init configuration file to use proper datasource when creating their guest images. For users who use config driver only, the cloud-init configuration is like this:\n```\ndatasource_list: [  ConfigDrive, None ]\n```\n\nand For users who use metadata service as well as config driver:\n```\ndatasource_list: [  ConfigDrive, OpenStack, None ]\n```\n\nI have tested both settings above in my local environment and both settings correctly works for me.\n\n\u003e what\u0027s effect with config_drvier \u003dfalse(As known issue ssh-key can not inject )?\n\nAs I commentted previously, I\u0027m a little worried that changing config-driver setting possibly causes a negative influence and some users have to change their configuration to avoid that. To be specific, some Trove users have to change cloud-init settings in their guest images to read user-data from metadata service if config_drvier value has changed False. I would like to know why we need to change the default value. I think nova\u0027s files deprecation is not a reason for that.","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"43f5a6b8b175274cc90de91ef03a13fe5599f0b6","unresolved":true,"context_lines":[{"line_number":988,"context_line":""},{"line_number":989,"context_line":"        # Use config_drive instead by userdata"},{"line_number":990,"context_line":"        # We will inject guest config by cloud-config"},{"line_number":991,"context_line":"        if files:"},{"line_number":992,"context_line":"            if not userdata:"},{"line_number":993,"context_line":"                userdata \u003d self.prepare_cloud_config(files)"},{"line_number":994,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"0f2debef_50d94e87","line":991,"range":{"start_line":991,"start_character":11,"end_line":991,"end_character":16},"in_reply_to":"11799b02_875fa77f","updated":"2022-04-05 14:23:14.000000000","message":"I don\u0027t think we should consider the block storage such as ceph, It doesn\u0027t make sense to Trove. \nconfig_driver is not relevant with files deprecation.  yes, I total agree with you. This should done in another ps.  but is it not better to use nova matedata service than config driver? And what\u0027s effect   with config_drvier \u003dfalse (As known issue ssh-key can not inject ) ?thanks.","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"094f4b6f3d9b59a893a99426da00cbc66d8185d4","unresolved":true,"context_lines":[{"line_number":988,"context_line":""},{"line_number":989,"context_line":"        # Use config_drive instead by userdata"},{"line_number":990,"context_line":"        # We will inject guest config by cloud-config"},{"line_number":991,"context_line":"        if files:"},{"line_number":992,"context_line":"            if not userdata:"},{"line_number":993,"context_line":"                userdata \u003d self.prepare_cloud_config(files)"},{"line_number":994,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"526b4b19_c8be8397","line":991,"range":{"start_line":991,"start_character":11,"end_line":991,"end_character":16},"in_reply_to":"4fd82c25_c6d840eb","updated":"2022-03-31 14:10:42.000000000","message":"Hi Wu, Thank you for your comment! I will check the relation between config_drive and the injection of ssh-key for ubuntu user in this weekend. \n\nFrom yoga, Trove has changed the default value of cloud_driver, but I think we should make the config_drive\u0027s default value back to the xena\u0027s one because I think this change is not a must to adapt to file injection deprecation in Nova because Nova API doesn\u0027t seem to change the code around config_drive and the default value.\n\nXena\thttps://github.com/openstack/trove/blob/stable/xena/trove/common/cfg.py#L248\nWallaby\thttps://github.com/openstack/trove/blob/stable/wallaby/trove/common/cfg.py#L245\nYoga\thttps://github.com/openstack/trove/blob/stable/yoga/trove/common/cfg.py#L248","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"1bb7408b67b451e855d02bd1c8a7519c5e5cd781","unresolved":true,"context_lines":[{"line_number":988,"context_line":""},{"line_number":989,"context_line":"        # Use config_drive instead by userdata"},{"line_number":990,"context_line":"        # We will inject guest config by cloud-config"},{"line_number":991,"context_line":"        if files:"},{"line_number":992,"context_line":"            if not userdata:"},{"line_number":993,"context_line":"                userdata \u003d self.prepare_cloud_config(files)"},{"line_number":994,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f80c4c1_072c78a6","line":991,"range":{"start_line":991,"start_character":11,"end_line":991,"end_character":16},"in_reply_to":"4fd82c25_c6d840eb","updated":"2022-03-30 14:11:05.000000000","message":"hi, if cloud_driver \u003d false, this will cause that cloud-init doesn\u0027t inject ssh-key for ubuntu user. Is this really we expected ?","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"b1110853a722b916da394755f7e97eb9ab3e7166","unresolved":true,"context_lines":[{"line_number":988,"context_line":""},{"line_number":989,"context_line":"        # Use config_drive instead by userdata"},{"line_number":990,"context_line":"        # We will inject guest config by cloud-config"},{"line_number":991,"context_line":"        if files:"},{"line_number":992,"context_line":"            if not userdata:"},{"line_number":993,"context_line":"                userdata \u003d self.prepare_cloud_config(files)"},{"line_number":994,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"8bdf2730_34543123","line":991,"range":{"start_line":991,"start_character":11,"end_line":991,"end_character":16},"in_reply_to":"526b4b19_c8be8397","updated":"2022-03-31 14:21:42.000000000","message":"Hi Bo! Sorry for my late reply! I missed your reply. I remember that your patch changes \"config_drive\" value when calling Nova API, but　I would like to know what relevance does that have to the Nova API\u0027s deprecation of personality files? I think Nova API[1] deprecates the \"files\" parameter, but doesn\u0027t deprecate the \"config_drive\" parameter.\n\n---\n[1]: https://docs.openstack.org/python-novaclient/latest/reference/api/novaclient.v2.servers.html#novaclient.v2.servers.ServerManager.create","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"653c9bf3b11423c4e44d2f8f2fc6e08b8b370372","unresolved":true,"context_lines":[{"line_number":988,"context_line":""},{"line_number":989,"context_line":"        # Use config_drive instead by userdata"},{"line_number":990,"context_line":"        # We will inject guest config by cloud-config"},{"line_number":991,"context_line":"        if files:"},{"line_number":992,"context_line":"            if not userdata:"},{"line_number":993,"context_line":"                userdata \u003d self.prepare_cloud_config(files)"},{"line_number":994,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"a5e97dcc_515e322d","line":991,"range":{"start_line":991,"start_character":11,"end_line":991,"end_character":16},"in_reply_to":"6e7fef4e_a3215647","updated":"2022-04-28 11:52:46.000000000","message":"Sorry for the reply so late.  yes, this makes sense to me. currently， there is no way for trove users to update the code in guest images. Change the config_driver \u003d false looks good for me. but from yoga, we should change the default to true in documents for the new user.","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"b6cf00d23e3a2752e45f025558265ebe340ddff7","unresolved":true,"context_lines":[{"line_number":988,"context_line":""},{"line_number":989,"context_line":"        # Use config_drive instead by userdata"},{"line_number":990,"context_line":"        # We will inject guest config by cloud-config"},{"line_number":991,"context_line":"        if files:"},{"line_number":992,"context_line":"            if not userdata:"},{"line_number":993,"context_line":"                userdata \u003d self.prepare_cloud_config(files)"},{"line_number":994,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"11799b02_875fa77f","line":991,"range":{"start_line":991,"start_character":11,"end_line":991,"end_character":16},"in_reply_to":"7103e5e1_68ec8dde","updated":"2022-04-04 17:03:05.000000000","message":"\u003e why you need check if files?\n\nI think \"files\" should convert to \"userdata\" because nova deprecates \"files\". \nIf \"files\" value is defined, we should change the \"files\" value to \"userdata\".\nAfter changing the \"files\" value, we should set \"files\" value empty, we pass empty \"files\" to nova api.\n\n\u003e I thinks we should always pass files\u003d{} and config_drive\u003dFalse. What do you think about this?\n\nMy idea as code:\n```\n    if use_nova_live_migration_ceph is True:\n        server \u003d self.nova_client.servers.create(\n            self.name, \n            image_id,\n            flavor_id,\n            key_name\u003dkey_name,\n            nics\u003dnics,\n            block_device_mapping_v2\u003dbdmap_v2,\n            files\u003d{},                                    # set files\u003d{}\n            userdata\u003duserdata,\n            availability_zone\u003davailability_zone,\n            config_drive\u003dFalse,                          # set config_drive\u003dFalse\n            scheduler_hints\u003dscheduler_hints,\n            meta\u003dmetadata,\n        )\n    else:\n        server \u003d self.nova_client.servers.create(\n            self.name, \n            image_id,\n            flavor_id,\n            key_name\u003dkey_name,\n            nics\u003dnics,\n            block_device_mapping_v2\u003dbdmap_v2,\n            files\u003dfiles,\n            userdata\u003duserdata,\n            availability_zone\u003davailability_zone,\n            config_drive\u003dconfig_drive,\n            scheduler_hints\u003dscheduler_hints,\n            meta\u003dmetadata,\n        )\n```\n\nNova\u0027s config_drive is not relevant with files deprecation. I think we should put the config_drive parameter value back to True.","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":28691,"name":"Bo Tran","email":"ministry.96.nd@gmail.com","username":"ministry"},"change_message_id":"b97a444651102ea4cd1ddd03a9f8e5640c586912","unresolved":true,"context_lines":[{"line_number":988,"context_line":""},{"line_number":989,"context_line":"        # Use config_drive instead by userdata"},{"line_number":990,"context_line":"        # We will inject guest config by cloud-config"},{"line_number":991,"context_line":"        if files:"},{"line_number":992,"context_line":"            if not userdata:"},{"line_number":993,"context_line":"                userdata \u003d self.prepare_cloud_config(files)"},{"line_number":994,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"dabac6e7_7f3a7f2a","line":991,"range":{"start_line":991,"start_character":11,"end_line":991,"end_character":16},"in_reply_to":"8bdf2730_34543123","updated":"2022-04-01 07:30:30.000000000","message":"If you pass config_drive\u003dTrue as param in function. My nova instance can\u0027t live migrate, because my instance use ceph as volume backend. I just want know about when your files variable is None (empty) because i notice files alway have values so why you need check if files?","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"3a0ed8acbd73389554f19e5053d712ed2390bb59","unresolved":true,"context_lines":[{"line_number":988,"context_line":""},{"line_number":989,"context_line":"        # Use config_drive instead by userdata"},{"line_number":990,"context_line":"        # We will inject guest config by cloud-config"},{"line_number":991,"context_line":"        if files:"},{"line_number":992,"context_line":"            if not userdata:"},{"line_number":993,"context_line":"                userdata \u003d self.prepare_cloud_config(files)"},{"line_number":994,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"6e7fef4e_a3215647","line":991,"range":{"start_line":991,"start_character":11,"end_line":991,"end_character":16},"in_reply_to":"9a175b3f_bede5986","updated":"2022-04-26 04:26:54.000000000","message":"Hi Bo and Wu, does my explanation make sense to you? Please let me know if you have any further questions.","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"d651d6889b0c50ce751c24fc1a5efef08a8af203","unresolved":true,"context_lines":[{"line_number":988,"context_line":""},{"line_number":989,"context_line":"        # Use config_drive instead by userdata"},{"line_number":990,"context_line":"        # We will inject guest config by cloud-config"},{"line_number":991,"context_line":"        if files:"},{"line_number":992,"context_line":"            if not userdata:"},{"line_number":993,"context_line":"                userdata \u003d self.prepare_cloud_config(files)"},{"line_number":994,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a085915_f1b0141b","line":991,"range":{"start_line":991,"start_character":11,"end_line":991,"end_character":16},"in_reply_to":"a5e97dcc_515e322d","updated":"2022-05-01 16:15:59.000000000","message":"Hi Wu, Thanks a lot for your comment!\n\n\u003e Change the config_driver \u003d false looks good for me.\n\nOK. I undestand your mind but, I don\u0027t understand why that patch has changed config_driver default value. Actually the config_driver\u0027s default value is nothing to with files deprecation.\n\n\u003e but from yoga, we should change the default to true in documents for the new user.\n\nYes, I agree with you. Applying \"config_driver \u003d False\" will start failing instance provisioning because \"config_driver\" directive itself was introduced in Trove to fix broken instance provisioning with disabled volume support.\n\n---\n[1]: https://opendev.org/openstack/trove/commit/3e618f316da4903571c4e4af8243fb70b372f78d","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":28691,"name":"Bo Tran","email":"ministry.96.nd@gmail.com","username":"ministry"},"change_message_id":"bdb9899fb0f357081c9f8ff58c3b78a20b7b4f1f","unresolved":true,"context_lines":[{"line_number":988,"context_line":""},{"line_number":989,"context_line":"        # Use config_drive instead by userdata"},{"line_number":990,"context_line":"        # We will inject guest config by cloud-config"},{"line_number":991,"context_line":"        if files:"},{"line_number":992,"context_line":"            if not userdata:"},{"line_number":993,"context_line":"                userdata \u003d self.prepare_cloud_config(files)"},{"line_number":994,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7103e5e1_68ec8dde","line":991,"range":{"start_line":991,"start_character":11,"end_line":991,"end_character":16},"in_reply_to":"c5fc85e6_7de7f566","updated":"2022-04-02 01:41:07.000000000","message":"Yep. I think I known about your mind. But we can\u0027t define a config specifically \"use_nova_live_migration_ceph\" because config_drive\u003dTrue will make can\u0027t live migrate with \"Block live migration\" - it included ceph and others, you can read more in [1].\n\nI thinks we should always pass files\u003d{} and config_drive\u003dFalse. What do you think about this?\n\n\n---\n[1]: https://docs.openstack.org/nova/wallaby/admin/configuring-migrations.html","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"956a48f17f8ce02c098c265bb2d6e69bd186a312","unresolved":true,"context_lines":[{"line_number":988,"context_line":""},{"line_number":989,"context_line":"        # Use config_drive instead by userdata"},{"line_number":990,"context_line":"        # We will inject guest config by cloud-config"},{"line_number":991,"context_line":"        if files:"},{"line_number":992,"context_line":"            if not userdata:"},{"line_number":993,"context_line":"                userdata \u003d self.prepare_cloud_config(files)"},{"line_number":994,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"c5fc85e6_7de7f566","line":991,"range":{"start_line":991,"start_character":11,"end_line":991,"end_character":16},"in_reply_to":"dabac6e7_7f3a7f2a","updated":"2022-04-01 14:09:45.000000000","message":"Hi Bo, Thank you very much for explaining your code change to me! Let me explain my code change. Firstly we must prevent trove from using –personality to inject files while booting an instance via Nova api. As nova api says[1], let\u0027s use the configuration drive, because it is the standard way for users to inject user data into their server instance.\n```\nif personality_files_found; then\n    convert_the_personality_files_to_user_data\nfi\n```\nAs as result, my code is like this:\n```\nif files:\n    userdata \u003d self.prepare_cloud_config(files)\n```\n\nMy understanding is that your patch achieves two things, but is it correct? Firstly trove stops using –personality to inject files while booting an instance via Nova api. Secondarily, trove starts using \u0027config_drive\u003dFalse\u0027 as default while booting an instance via Nova api.\n\nThe first goal is what we must achieve and I totally agree with it, but I think the secondary one is currently not for everyone\u0027s goal. I understand live migration is very important and ceph is sometimes a necessary for that, but we need more discussion about live migration before changing the current way to create an instance. Let\u0027s think about deprecating file injection and live migration separately.\n\nI would like to make a suggestion. Let\u0027s add CONF.use_nova_live_migration_ceph and code like:\n```\nif CONF.use_nova_server_config_drive:\n    server \u003d self.nova_client.servers.create(config_drive\u003dFalse, ...)\n```\nIf we approach the goal this way, current users can update the OpenStack version without changing their trove.conf.\n\n---\n[1]: https://specs.openstack.org/openstack/nova-specs/specs/queens/implemented/deprecate-file-injection.html","commit_id":"d185a1239b04cbce5fc3eaca507df7a3e3ff594d"}]}
