)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"2b3fb5611e027e7bece0483287fbfc9ae7667937","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add OS::TripleO::UndercloudUpgradeEphemeralHeat"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"A new service, OS::TripleO::Services::UndercloudUpgradeEphemeralHeat is"},{"line_number":10,"context_line":"added to the Undercloud role. The service is mapped to OS::Heat::None by"},{"line_number":11,"context_line":"default, but when environments/lifecycle/undercloud-upgrade-prepare.yaml"},{"line_number":12,"context_line":"is included, the service will be enabled and will migrate any already"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"7e0a0e81_0f7f1ca8","line":9,"range":{"start_line":9,"start_character":2,"end_line":9,"end_character":13},"updated":"2021-05-17 01:24:00.000000000","message":"Any reason we want to add a new service and not using existing UndercloudUpgrade service? AFAIU we plan to make ephemeral heat the default, right?","commit_id":"104b2abf0acb86308e66a54d959a89778d10572f"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"603b2c762676e629828cea4a563f16c5bdb0759d","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add OS::TripleO::UndercloudUpgradeEphemeralHeat"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"A new service, OS::TripleO::Services::UndercloudUpgradeEphemeralHeat is"},{"line_number":10,"context_line":"added to the Undercloud role. The service is mapped to OS::Heat::None by"},{"line_number":11,"context_line":"default, but when environments/lifecycle/undercloud-upgrade-prepare.yaml"},{"line_number":12,"context_line":"is included, the service will be enabled and will migrate any already"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"ed6954e6_90f3d143","line":9,"range":{"start_line":9,"start_character":2,"end_line":9,"end_character":13},"in_reply_to":"7e0a0e81_0f7f1ca8","updated":"2021-05-18 13:16:55.000000000","message":"yes, we do. i can do it either way. i thought the separate service might be appealing to some so it can be disabled.","commit_id":"104b2abf0acb86308e66a54d959a89778d10572f"}],"deployment/undercloud/undercloud-upgrade-ephemeral-heat.yaml":[{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"93ebb6c9baf752d81a678609ac1a0b274b74cb12","unresolved":true,"context_lines":[{"line_number":38,"context_line":"          file:"},{"line_number":39,"context_line":"            path: /var/lib/tripleo-config/scripts"},{"line_number":40,"context_line":"            state: directory"},{"line_number":41,"context_line":"            recurse: yes"},{"line_number":42,"context_line":"          when:"},{"line_number":43,"context_line":"            - step|int \u003d\u003d 3"},{"line_number":44,"context_line":"        - name: Copy undercloud-upgrade-ephemeral-heat.py to /var/lib/tripleo-config/scripts"}],"source_content_type":"text/x-yaml","patch_set":6,"id":"939a6672_63a0515e","line":41,"range":{"start_line":41,"start_character":21,"end_line":41,"end_character":24},"updated":"2021-04-29 15:57:38.000000000","message":"this should be \"true\"","commit_id":"3363d9927b1612d5d4d493c71f9204b65a821354"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"b0ea36d603bdaa15bfd0c2909471ae49d18ec604","unresolved":true,"context_lines":[{"line_number":52,"context_line":"          shell: /var/lib/tripleo-config/scripts/undercloud-upgrade-ephemeral-heat.py"},{"line_number":53,"context_line":"          when:"},{"line_number":54,"context_line":"            - step|int \u003d\u003d 3"},{"line_number":55,"context_line":"          become: false"}],"source_content_type":"text/x-yaml","patch_set":12,"id":"64b133a5_841f5eab","line":55,"range":{"start_line":55,"start_character":10,"end_line":55,"end_character":16},"updated":"2021-06-02 06:58:49.000000000","message":"why do we need to explicitly add become: false here?\n\nconversely don\u0027t we need become: true for the creation of /var/lib/tripleo-config and the copy task?","commit_id":"7b46ea7fabd15883bbd5aa041138772014be69bf"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"865dbcd3820a616e7bfe4cdae5760566d9207358","unresolved":true,"context_lines":[{"line_number":52,"context_line":"          shell: /var/lib/tripleo-config/scripts/undercloud-upgrade-ephemeral-heat.py"},{"line_number":53,"context_line":"          when:"},{"line_number":54,"context_line":"            - step|int \u003d\u003d 3"},{"line_number":55,"context_line":"          become: false"}],"source_content_type":"text/x-yaml","patch_set":12,"id":"d1feaf90_fb5ad50b","line":55,"range":{"start_line":55,"start_character":10,"end_line":55,"end_character":16},"in_reply_to":"64b133a5_841f5eab","updated":"2021-06-03 01:39:15.000000000","message":"it\u0027s not needed. i fixed that","commit_id":"7b46ea7fabd15883bbd5aa041138772014be69bf"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"c561033796e59ca5e516213486f134410be56099","unresolved":true,"context_lines":[{"line_number":40,"context_line":"            state: directory"},{"line_number":41,"context_line":"            recurse: true"},{"line_number":42,"context_line":"          when:"},{"line_number":43,"context_line":"            - step|int \u003d\u003d 1"},{"line_number":44,"context_line":"        - name: Copy undercloud-upgrade-ephemeral-heat.py to /var/lib/tripleo-config/scripts"},{"line_number":45,"context_line":"          copy:"},{"line_number":46,"context_line":"            dest: /var/lib/tripleo-config/scripts/undercloud-upgrade-ephemeral-heat.py"}],"source_content_type":"text/x-yaml","patch_set":13,"id":"d6948f70_14330c6f","line":43,"range":{"start_line":43,"start_character":26,"end_line":43,"end_character":27},"updated":"2021-06-03 07:46:51.000000000","message":"heh that\u0027s a pretty big change from my last visit ;) \nso if we want/need this to happen really early then why not go step 0 even?","commit_id":"7d59c0ce0b199993e7aa6434adeddd062a1887eb"}],"scripts/undercloud-upgrade-ephemeral-heat.py":[{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"4437d9e6c24c76cf07385266105c26b00c5da6c4","unresolved":true,"context_lines":[{"line_number":61,"context_line":"    heat_dir \u003d os.path.join(backup_dir, \u0027heat-launcher\u0027)"},{"line_number":62,"context_line":"    if not os.path.isdir(heat_dir):"},{"line_number":63,"context_line":"        os.makedirs(heat_dir)"},{"line_number":64,"context_line":"    db_path \u003d os.path.join(heat_dir, \u0027heat-db-dump-{}.sql\u0027.format("},{"line_number":65,"context_line":"        datetime.datetime.utcnow().isoformat()))"},{"line_number":66,"context_line":"    LOG.info(\"Backing up heat database to {}\".format(db_path))"},{"line_number":67,"context_line":"    with open(db_path, \u0027w\u0027) as out:"}],"source_content_type":"text/x-python","patch_set":5,"id":"96732c8d_6d309994","line":64,"updated":"2021-04-28 07:18:17.000000000","message":"it might be good ensuring correct rights on that DB - it\u0027s full of sensitive data, unencrypted, so we can\u0027t really afford seeing it with the default 0644 mode.","commit_id":"3d9994a3257217efbf5f3027065a811499ec5939"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"a80689a64c4bb11bca5a360ecff1729108639131","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    heat_dir \u003d os.path.join(backup_dir, \u0027heat-launcher\u0027)"},{"line_number":62,"context_line":"    if not os.path.isdir(heat_dir):"},{"line_number":63,"context_line":"        os.makedirs(heat_dir)"},{"line_number":64,"context_line":"    db_path \u003d os.path.join(heat_dir, \u0027heat-db-dump-{}.sql\u0027.format("},{"line_number":65,"context_line":"        datetime.datetime.utcnow().isoformat()))"},{"line_number":66,"context_line":"    LOG.info(\"Backing up heat database to {}\".format(db_path))"},{"line_number":67,"context_line":"    with open(db_path, \u0027w\u0027) as out:"}],"source_content_type":"text/x-python","patch_set":5,"id":"280d7b5d_3599de12","line":64,"in_reply_to":"96732c8d_6d309994","updated":"2021-04-28 21:42:27.000000000","message":"Done","commit_id":"3d9994a3257217efbf5f3027065a811499ec5939"},{"author":{"_account_id":11090,"name":"Sergii Golovatiuk","email":"sgolovat@redhat.com","username":"holser"},"change_message_id":"69b1a2d745fde4295d5790a8fd92f5ebbdc9584e","unresolved":true,"context_lines":[{"line_number":68,"context_line":"        subprocess.run(["},{"line_number":69,"context_line":"            \u0027sudo\u0027, \u0027podman\u0027, \u0027exec\u0027, \u0027-it\u0027, \u0027-u\u0027, \u0027root\u0027,"},{"line_number":70,"context_line":"            \u0027mysql\u0027, \u0027mysqldump\u0027, \u0027heat\u0027], stdout\u003dout,"},{"line_number":71,"context_line":"            check\u003dTrue)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"def drop_db():"}],"source_content_type":"text/x-python","patch_set":5,"id":"7cc5a014_c8d519dc","line":71,"updated":"2021-04-21 22:24:29.000000000","message":"Do we check any error? What do we do if no space or process was interrupted?","commit_id":"3d9994a3257217efbf5f3027065a811499ec5939"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"a80689a64c4bb11bca5a360ecff1729108639131","unresolved":true,"context_lines":[{"line_number":68,"context_line":"        subprocess.run(["},{"line_number":69,"context_line":"            \u0027sudo\u0027, \u0027podman\u0027, \u0027exec\u0027, \u0027-it\u0027, \u0027-u\u0027, \u0027root\u0027,"},{"line_number":70,"context_line":"            \u0027mysql\u0027, \u0027mysqldump\u0027, \u0027heat\u0027], stdout\u003dout,"},{"line_number":71,"context_line":"            check\u003dTrue)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"def drop_db():"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f4348c0_374fdc90","line":71,"in_reply_to":"7cc5a014_c8d519dc","updated":"2021-04-28 21:42:27.000000000","message":"Yes, with check\u003dTrue, an exception will be raised if the command exits non-zero. I could capture that and re-raise it, but I think we would still want to see the original exception. Do you want to hide the original exception?","commit_id":"3d9994a3257217efbf5f3027065a811499ec5939"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"4437d9e6c24c76cf07385266105c26b00c5da6c4","unresolved":true,"context_lines":[{"line_number":87,"context_line":"    passwords \u003d export.export_passwords(heat, stack)"},{"line_number":88,"context_line":"    password_params \u003d dict(parameter_defaults\u003dpasswords)"},{"line_number":89,"context_line":"    with open(passwords_path, \u0027w\u0027) as f:"},{"line_number":90,"context_line":"        f.write(yaml.safe_dump(password_params))"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":5,"id":"1413ad2d_ae5821ad","line":90,"updated":"2021-04-28 07:18:17.000000000","message":"care to ensure 0600 on that file?","commit_id":"3d9994a3257217efbf5f3027065a811499ec5939"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"a80689a64c4bb11bca5a360ecff1729108639131","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    passwords \u003d export.export_passwords(heat, stack)"},{"line_number":88,"context_line":"    password_params \u003d dict(parameter_defaults\u003dpasswords)"},{"line_number":89,"context_line":"    with open(passwords_path, \u0027w\u0027) as f:"},{"line_number":90,"context_line":"        f.write(yaml.safe_dump(password_params))"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":5,"id":"c6f402ea_a5a1ae07","line":90,"in_reply_to":"1413ad2d_ae5821ad","updated":"2021-04-28 21:42:27.000000000","message":"Done","commit_id":"3d9994a3257217efbf5f3027065a811499ec5939"},{"author":{"_account_id":26343,"name":"Jose Luis Franco","email":"jfrancoa@redhat.com","username":"jfrancoa"},"change_message_id":"58c399c39ce8b87aead2e59e58160a8f91f61ff4","unresolved":true,"context_lines":[{"line_number":126,"context_line":"        if not os.path.exists(stack_dir):"},{"line_number":127,"context_line":"            os.makedirs(stack_dir)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        backup_db(stack_dir)"},{"line_number":130,"context_line":"        export_passwords(_heatclient, stack, stack_dir)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    if database_exists():"}],"source_content_type":"text/x-python","patch_set":5,"id":"774c89e4_af85440b","line":129,"updated":"2021-04-22 09:32:31.000000000","message":"aren\u0027t we dumping here the very same DB content over and over in the case multiple stacks are being passed in stacks variable? As the stack isn\u0027t a parameter for the backup_db command, we are doing a mysqldump each time in a different file but with the same content (unless I\u0027m missing something)","commit_id":"3d9994a3257217efbf5f3027065a811499ec5939"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"4437d9e6c24c76cf07385266105c26b00c5da6c4","unresolved":true,"context_lines":[{"line_number":126,"context_line":"        if not os.path.exists(stack_dir):"},{"line_number":127,"context_line":"            os.makedirs(stack_dir)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        backup_db(stack_dir)"},{"line_number":130,"context_line":"        export_passwords(_heatclient, stack, stack_dir)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    if database_exists():"}],"source_content_type":"text/x-python","patch_set":5,"id":"dc609f4b_8762ec74","line":129,"in_reply_to":"774c89e4_af85440b","updated":"2021-04-28 07:18:17.000000000","message":"I think you\u0027re right. I can understand why each stack needs to access the dump, but we might push that dump in the parent dir (working_dir then, or working_dir/db_dump ?) and reload that dump on-demand.","commit_id":"3d9994a3257217efbf5f3027065a811499ec5939"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"a80689a64c4bb11bca5a360ecff1729108639131","unresolved":true,"context_lines":[{"line_number":126,"context_line":"        if not os.path.exists(stack_dir):"},{"line_number":127,"context_line":"            os.makedirs(stack_dir)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        backup_db(stack_dir)"},{"line_number":130,"context_line":"        export_passwords(_heatclient, stack, stack_dir)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    if database_exists():"}],"source_content_type":"text/x-python","patch_set":5,"id":"293a0994_efb20756","line":129,"in_reply_to":"dc609f4b_8762ec74","updated":"2021-04-28 21:42:27.000000000","message":"Yes, exactly. I\u0027m backing it up multiple times in the case of multiple stacks. This is so that we end up with a consistent directory layout per stack.\n\nI can change it to backup only once if that is desired. Personally, I\u0027d prefer to see the stack isolation in each dir with it\u0027s own backup, but it doesn\u0027t really matter.\n\nI\u0027m happy to change it if that\u0027s more agreeable.","commit_id":"3d9994a3257217efbf5f3027065a811499ec5939"},{"author":{"_account_id":11090,"name":"Sergii Golovatiuk","email":"sgolovat@redhat.com","username":"holser"},"change_message_id":"69b1a2d745fde4295d5790a8fd92f5ebbdc9584e","unresolved":true,"context_lines":[{"line_number":133,"context_line":"        backup_dir \u003d os.path.join("},{"line_number":134,"context_line":"            working_dir,"},{"line_number":135,"context_line":"            \u0027undercloud-upgrade-ephemeral-heat\u0027)"},{"line_number":136,"context_line":"        backup_db(backup_dir)"},{"line_number":137,"context_line":"        drop_db()"},{"line_number":138,"context_line":"    else:"},{"line_number":139,"context_line":"        LOG.warning(\"No database found to backup.\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"9cb1831c_4e2b0328","line":136,"updated":"2021-04-21 22:24:29.000000000","message":"I would be very careful here as we don\u0027t check exceptions.","commit_id":"3d9994a3257217efbf5f3027065a811499ec5939"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"a80689a64c4bb11bca5a360ecff1729108639131","unresolved":true,"context_lines":[{"line_number":133,"context_line":"        backup_dir \u003d os.path.join("},{"line_number":134,"context_line":"            working_dir,"},{"line_number":135,"context_line":"            \u0027undercloud-upgrade-ephemeral-heat\u0027)"},{"line_number":136,"context_line":"        backup_db(backup_dir)"},{"line_number":137,"context_line":"        drop_db()"},{"line_number":138,"context_line":"    else:"},{"line_number":139,"context_line":"        LOG.warning(\"No database found to backup.\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"01a1302b_59816839","line":136,"in_reply_to":"9cb1831c_4e2b0328","updated":"2021-04-28 21:42:27.000000000","message":"There aren\u0027t any exceptions that we want handled or ignored. I\u0027d rather have the real exception stop execution and we show that exceptions message and traceback instead of wrapping it.\n\nIf we handled exceptions, would you still want to see the original exception and traceback, or are you saying you\u0027d rather hide that behind a more abstract exception such as UndercloudUpgradeEphemeralHeatException?","commit_id":"3d9994a3257217efbf5f3027065a811499ec5939"},{"author":{"_account_id":26343,"name":"Jose Luis Franco","email":"jfrancoa@redhat.com","username":"jfrancoa"},"change_message_id":"58c399c39ce8b87aead2e59e58160a8f91f61ff4","unresolved":true,"context_lines":[{"line_number":136,"context_line":"        backup_db(backup_dir)"},{"line_number":137,"context_line":"        drop_db()"},{"line_number":138,"context_line":"    else:"},{"line_number":139,"context_line":"        LOG.warning(\"No database found to backup.\")"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3df0fae3_1220d956","line":139,"updated":"2021-04-22 09:32:31.000000000","message":"Just for my understanding, if I\u0027m not mistaken, this script will backup the \"installed\" heat service and drop the heat db. I can\u0027t see any linking to the ephimeral Heat service, so I wonder how does the ephemeral heat reuse the DB content? Or there is no need as we will be running de deployment from scratch and everything will handled by the ephemeral heat service from that point?","commit_id":"3d9994a3257217efbf5f3027065a811499ec5939"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"a80689a64c4bb11bca5a360ecff1729108639131","unresolved":true,"context_lines":[{"line_number":136,"context_line":"        backup_db(backup_dir)"},{"line_number":137,"context_line":"        drop_db()"},{"line_number":138,"context_line":"    else:"},{"line_number":139,"context_line":"        LOG.warning(\"No database found to backup.\")"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"text/x-python","patch_set":5,"id":"ffb92e0c_f99e0c38","line":139,"in_reply_to":"3df0fae3_1220d956","updated":"2021-04-28 21:42:27.000000000","message":"There is no need to re-use it unless you want to launch ephemeral heat in isolation and restore the db for debugging purposes. Each deployment operation will start with a new blank db when using ephemeral Heat.","commit_id":"3d9994a3257217efbf5f3027065a811499ec5939"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"93ebb6c9baf752d81a678609ac1a0b274b74cb12","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":6,"id":"2291899e_877ca89e","updated":"2021-04-29 15:57:38.000000000","message":"I wish the methods had doc strings but otherwise this all looks fine.","commit_id":"3363d9927b1612d5d4d493c71f9204b65a821354"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"96ecc35013b6a0f19f0b58d89e8238c5fdc7e4b4","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":6,"id":"f6289134_487c949d","in_reply_to":"2291899e_877ca89e","updated":"2021-05-05 12:38:10.000000000","message":"as you wish.","commit_id":"3363d9927b1612d5d4d493c71f9204b65a821354"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"119180cd9772f41545564739cc784f0f7d0a2e48","unresolved":true,"context_lines":[{"line_number":128,"context_line":"        if not os.path.exists(stack_dir):"},{"line_number":129,"context_line":"            os.makedirs(stack_dir)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        backup_db(stack_dir)"},{"line_number":132,"context_line":"        export_passwords(_heatclient, stack, stack_dir)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    if database_exists():"}],"source_content_type":"text/x-python","patch_set":6,"id":"5821ae27_c5e8cc58","line":131,"range":{"start_line":131,"start_character":8,"end_line":131,"end_character":28},"updated":"2021-04-30 07:09:57.000000000","message":"Do we\u0027ve to backup the whole db for every stack? And then finally backup again in L138?","commit_id":"3363d9927b1612d5d4d493c71f9204b65a821354"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"fe0de46632472139f3a17df0af7f9c853903afd6","unresolved":true,"context_lines":[{"line_number":128,"context_line":"        if not os.path.exists(stack_dir):"},{"line_number":129,"context_line":"            os.makedirs(stack_dir)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        backup_db(stack_dir)"},{"line_number":132,"context_line":"        export_passwords(_heatclient, stack, stack_dir)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    if database_exists():"}],"source_content_type":"text/x-python","patch_set":6,"id":"a1829320_854579f9","line":131,"range":{"start_line":131,"start_character":8,"end_line":131,"end_character":28},"in_reply_to":"32b6ccf2_d919bf3d","updated":"2021-05-05 12:37:50.000000000","message":"i updated it to use a symlink. let me know about that approach. thanks.","commit_id":"3363d9927b1612d5d4d493c71f9204b65a821354"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"ee9c37deb88d65ef6b099f6dadac40bbe4d68940","unresolved":true,"context_lines":[{"line_number":128,"context_line":"        if not os.path.exists(stack_dir):"},{"line_number":129,"context_line":"            os.makedirs(stack_dir)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        backup_db(stack_dir)"},{"line_number":132,"context_line":"        export_passwords(_heatclient, stack, stack_dir)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    if database_exists():"}],"source_content_type":"text/x-python","patch_set":6,"id":"f64c2424_54562633","line":131,"range":{"start_line":131,"start_character":8,"end_line":131,"end_character":28},"in_reply_to":"5821ae27_c5e8cc58","updated":"2021-05-04 14:54:59.000000000","message":"Yes. see my earlier comment on PS5. Which approach would you prefer?","commit_id":"3363d9927b1612d5d4d493c71f9204b65a821354"},{"author":{"_account_id":26343,"name":"Jose Luis Franco","email":"jfrancoa@redhat.com","username":"jfrancoa"},"change_message_id":"ec8d35977d12e871bf78ec380f11d9290219d15c","unresolved":true,"context_lines":[{"line_number":128,"context_line":"        if not os.path.exists(stack_dir):"},{"line_number":129,"context_line":"            os.makedirs(stack_dir)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        backup_db(stack_dir)"},{"line_number":132,"context_line":"        export_passwords(_heatclient, stack, stack_dir)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    if database_exists():"}],"source_content_type":"text/x-python","patch_set":6,"id":"32b6ccf2_d919bf3d","line":131,"range":{"start_line":131,"start_character":8,"end_line":131,"end_character":28},"in_reply_to":"5ac56314_e2ae455d","updated":"2021-05-05 07:39:36.000000000","message":"Rigth, that\u0027s what called my attention. If ther would be some parameter sent to mysqldump which would build the backup for a specific stack, this would make sense to me. But as it is, it looks like it\u0027s just dumping the very same backup multiple times.","commit_id":"3363d9927b1612d5d4d493c71f9204b65a821354"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"0ebef5b49df8cbc85c2b028d925c98d638bc528d","unresolved":true,"context_lines":[{"line_number":128,"context_line":"        if not os.path.exists(stack_dir):"},{"line_number":129,"context_line":"            os.makedirs(stack_dir)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        backup_db(stack_dir)"},{"line_number":132,"context_line":"        export_passwords(_heatclient, stack, stack_dir)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    if database_exists():"}],"source_content_type":"text/x-python","patch_set":6,"id":"5ac56314_e2ae455d","line":131,"range":{"start_line":131,"start_character":8,"end_line":131,"end_character":28},"in_reply_to":"f64c2424_54562633","updated":"2021-05-04 15:14:45.000000000","message":"Right, we should copy or link, if every stack has to have a copy of the backup in it\u0027s directory. Running mysqldump again and again (when nothing has changed) seems very inefficient.","commit_id":"3363d9927b1612d5d4d493c71f9204b65a821354"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"9cb7dbc139270b92f0b909fb30e2c0def72244e0","unresolved":true,"context_lines":[{"line_number":177,"context_line":"            # Symlink to the existing db backup"},{"line_number":178,"context_line":"            os.symlink(db_path,"},{"line_number":179,"context_line":"                os.path.join(stack_dir, os.path.basename(db_path)))"},{"line_number":180,"context_line":"        export_passwords(_heatclient, stack, stack_dir)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3707f0d6_4f61459e","line":180,"range":{"start_line":180,"start_character":8,"end_line":180,"end_character":55},"updated":"2021-05-14 09:06:01.000000000","message":"Doesn\u0027t this need to happen before dropping the database in L167?","commit_id":"cb580049ec5d47b719418c3047fe65d60c1029ea"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"2b3fb5611e027e7bece0483287fbfc9ae7667937","unresolved":true,"context_lines":[{"line_number":26,"context_line":"from heatclient.client import Client"},{"line_number":27,"context_line":"import keystoneauth1"},{"line_number":28,"context_line":"import openstack"},{"line_number":29,"context_line":"from tripleoclient import export"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"LOG \u003d logging.getLogger(\u0027undercloud\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"b815c2ed_b544e8dc","line":29,"range":{"start_line":29,"start_character":0,"end_line":29,"end_character":32},"updated":"2021-05-17 01:24:00.000000000","message":"We should not use tripleoclient as library. Iis not in THT requirements too. Instead use the CLI command \u0027openstack overcloud export\u0027.","commit_id":"104b2abf0acb86308e66a54d959a89778d10572f"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"603b2c762676e629828cea4a563f16c5bdb0759d","unresolved":true,"context_lines":[{"line_number":26,"context_line":"from heatclient.client import Client"},{"line_number":27,"context_line":"import keystoneauth1"},{"line_number":28,"context_line":"import openstack"},{"line_number":29,"context_line":"from tripleoclient import export"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"LOG \u003d logging.getLogger(\u0027undercloud\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"85ef2f8a_df1b0751","line":29,"range":{"start_line":29,"start_character":0,"end_line":29,"end_character":32},"in_reply_to":"b815c2ed_b544e8dc","updated":"2021-05-18 13:16:55.000000000","message":"i\u0027ll fix this","commit_id":"104b2abf0acb86308e66a54d959a89778d10572f"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"2b3fb5611e027e7bece0483287fbfc9ae7667937","unresolved":true,"context_lines":[{"line_number":61,"context_line":"    :rtype: bool"},{"line_number":62,"context_line":"    \"\"\""},{"line_number":63,"context_line":"    output \u003d subprocess.check_output(["},{"line_number":64,"context_line":"        \u0027sudo\u0027, \u0027podman\u0027, \u0027exec\u0027, \u0027-it\u0027, \u0027-u\u0027, \u0027root\u0027, \u0027mysql\u0027,"},{"line_number":65,"context_line":"        \u0027mysql\u0027, \u0027-e\u0027, \u0027show databases like \"heat\"\u0027"},{"line_number":66,"context_line":"    ])"},{"line_number":67,"context_line":"    return \u0027heat\u0027 in str(output)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ac30abb8_cfc66123","line":64,"range":{"start_line":64,"start_character":34,"end_line":64,"end_character":39},"updated":"2021-05-17 01:24:00.000000000","message":"not required","commit_id":"104b2abf0acb86308e66a54d959a89778d10572f"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"603b2c762676e629828cea4a563f16c5bdb0759d","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    :rtype: bool"},{"line_number":62,"context_line":"    \"\"\""},{"line_number":63,"context_line":"    output \u003d subprocess.check_output(["},{"line_number":64,"context_line":"        \u0027sudo\u0027, \u0027podman\u0027, \u0027exec\u0027, \u0027-it\u0027, \u0027-u\u0027, \u0027root\u0027, \u0027mysql\u0027,"},{"line_number":65,"context_line":"        \u0027mysql\u0027, \u0027-e\u0027, \u0027show databases like \"heat\"\u0027"},{"line_number":66,"context_line":"    ])"},{"line_number":67,"context_line":"    return \u0027heat\u0027 in str(output)"}],"source_content_type":"text/x-python","patch_set":10,"id":"8c4e737f_e26afda4","line":64,"range":{"start_line":64,"start_character":34,"end_line":64,"end_character":39},"in_reply_to":"ac30abb8_cfc66123","updated":"2021-05-18 13:16:55.000000000","message":"Ack","commit_id":"104b2abf0acb86308e66a54d959a89778d10572f"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"2b3fb5611e027e7bece0483287fbfc9ae7667937","unresolved":true,"context_lines":[{"line_number":83,"context_line":"    LOG.info(\"Backing up heat database to {}\".format(db_path))"},{"line_number":84,"context_line":"    with open(db_path, \u0027w\u0027) as out:"},{"line_number":85,"context_line":"        subprocess.run(["},{"line_number":86,"context_line":"            \u0027sudo\u0027, \u0027podman\u0027, \u0027exec\u0027, \u0027-it\u0027, \u0027-u\u0027, \u0027root\u0027,"},{"line_number":87,"context_line":"            \u0027mysql\u0027, \u0027mysqldump\u0027, \u0027heat\u0027], stdout\u003dout,"},{"line_number":88,"context_line":"            check\u003dTrue)"},{"line_number":89,"context_line":"    os.chmod(db_path, 0o600)"}],"source_content_type":"text/x-python","patch_set":10,"id":"b90982df_6dda15b3","line":86,"range":{"start_line":86,"start_character":37,"end_line":86,"end_character":44},"updated":"2021-05-17 01:24:00.000000000","message":"same","commit_id":"104b2abf0acb86308e66a54d959a89778d10572f"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"603b2c762676e629828cea4a563f16c5bdb0759d","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    LOG.info(\"Backing up heat database to {}\".format(db_path))"},{"line_number":84,"context_line":"    with open(db_path, \u0027w\u0027) as out:"},{"line_number":85,"context_line":"        subprocess.run(["},{"line_number":86,"context_line":"            \u0027sudo\u0027, \u0027podman\u0027, \u0027exec\u0027, \u0027-it\u0027, \u0027-u\u0027, \u0027root\u0027,"},{"line_number":87,"context_line":"            \u0027mysql\u0027, \u0027mysqldump\u0027, \u0027heat\u0027], stdout\u003dout,"},{"line_number":88,"context_line":"            check\u003dTrue)"},{"line_number":89,"context_line":"    os.chmod(db_path, 0o600)"}],"source_content_type":"text/x-python","patch_set":10,"id":"92c02ee3_daf8baec","line":86,"range":{"start_line":86,"start_character":37,"end_line":86,"end_character":44},"in_reply_to":"b90982df_6dda15b3","updated":"2021-05-18 13:16:55.000000000","message":"Ack","commit_id":"104b2abf0acb86308e66a54d959a89778d10572f"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"2b3fb5611e027e7bece0483287fbfc9ae7667937","unresolved":true,"context_lines":[{"line_number":98,"context_line":"    \"\"\""},{"line_number":99,"context_line":"    LOG.info(\"Dropping Heat database\")"},{"line_number":100,"context_line":"    subprocess.check_call(["},{"line_number":101,"context_line":"        \u0027sudo\u0027, \u0027podman\u0027, \u0027exec\u0027, \u0027-it\u0027, \u0027-u\u0027, \u0027root\u0027,"},{"line_number":102,"context_line":"        \u0027mysql\u0027, \u0027mysql\u0027, \u0027heat\u0027, \u0027-e\u0027,"},{"line_number":103,"context_line":"        \u0027drop database heat\u0027])"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"de0dd5c7_3128c065","line":101,"range":{"start_line":101,"start_character":33,"end_line":101,"end_character":39},"updated":"2021-05-17 01:24:00.000000000","message":"same","commit_id":"104b2abf0acb86308e66a54d959a89778d10572f"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"603b2c762676e629828cea4a563f16c5bdb0759d","unresolved":false,"context_lines":[{"line_number":98,"context_line":"    \"\"\""},{"line_number":99,"context_line":"    LOG.info(\"Dropping Heat database\")"},{"line_number":100,"context_line":"    subprocess.check_call(["},{"line_number":101,"context_line":"        \u0027sudo\u0027, \u0027podman\u0027, \u0027exec\u0027, \u0027-it\u0027, \u0027-u\u0027, \u0027root\u0027,"},{"line_number":102,"context_line":"        \u0027mysql\u0027, \u0027mysql\u0027, \u0027heat\u0027, \u0027-e\u0027,"},{"line_number":103,"context_line":"        \u0027drop database heat\u0027])"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"2dccdd01_93e42b08","line":101,"range":{"start_line":101,"start_character":33,"end_line":101,"end_character":39},"in_reply_to":"de0dd5c7_3128c065","updated":"2021-05-18 13:16:55.000000000","message":"Ack","commit_id":"104b2abf0acb86308e66a54d959a89778d10572f"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"2b3fb5611e027e7bece0483287fbfc9ae7667937","unresolved":true,"context_lines":[{"line_number":177,"context_line":"            # Symlink to the existing db backup"},{"line_number":178,"context_line":"            os.symlink(db_path,"},{"line_number":179,"context_line":"                os.path.join(stack_dir, os.path.basename(db_path)))"},{"line_number":180,"context_line":"        export_passwords(_heatclient, stack, stack_dir)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"text/x-python","patch_set":10,"id":"25b0fc59_ea14d80e","line":180,"range":{"start_line":180,"start_character":8,"end_line":180,"end_character":55},"updated":"2021-05-17 01:24:00.000000000","message":"Yeah this won\u0027t work without heat database.","commit_id":"104b2abf0acb86308e66a54d959a89778d10572f"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"603b2c762676e629828cea4a563f16c5bdb0759d","unresolved":true,"context_lines":[{"line_number":177,"context_line":"            # Symlink to the existing db backup"},{"line_number":178,"context_line":"            os.symlink(db_path,"},{"line_number":179,"context_line":"                os.path.join(stack_dir, os.path.basename(db_path)))"},{"line_number":180,"context_line":"        export_passwords(_heatclient, stack, stack_dir)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"text/x-python","patch_set":10,"id":"49e81db4_cfcd5757","line":180,"range":{"start_line":180,"start_character":8,"end_line":180,"end_character":55},"in_reply_to":"25b0fc59_ea14d80e","updated":"2021-05-18 13:16:55.000000000","message":"you\u0027re right. not sure how that happened :)","commit_id":"104b2abf0acb86308e66a54d959a89778d10572f"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"b0ea36d603bdaa15bfd0c2909471ae49d18ec604","unresolved":true,"context_lines":[{"line_number":150,"context_line":"    except keystoneauth1.exceptions.catalog.EndpointNotFound:"},{"line_number":151,"context_line":"        LOG.warning(\"No Heat endpoint found, won\u0027t migrate any \""},{"line_number":152,"context_line":"                    \"existing stack data.\")"},{"line_number":153,"context_line":"        return"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    try:"},{"line_number":156,"context_line":"        stacks \u003d args.stack or [s.name for s in heat.stacks()]"}],"source_content_type":"text/x-python","patch_set":12,"id":"c3752d4a_c55508d8","line":153,"range":{"start_line":153,"start_character":8,"end_line":153,"end_character":14},"updated":"2021-06-02 06:58:49.000000000","message":"k good so this guards against it running when we are already with ephemeral heat i.e. someone forgets this wired up during the *next* upgrade","commit_id":"7b46ea7fabd15883bbd5aa041138772014be69bf"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"8cbd13e7424997f1c403c26df3f6fb858b98135a","unresolved":true,"context_lines":[{"line_number":78,"context_line":"    heat_dir \u003d os.path.join(backup_dir, \u0027heat-launcher\u0027)"},{"line_number":79,"context_line":"    if not os.path.isdir(heat_dir):"},{"line_number":80,"context_line":"        os.makedirs(heat_dir)"},{"line_number":81,"context_line":"    db_path \u003d os.path.join(heat_dir, \u0027heat-db-dump-{}.sql\u0027.format("},{"line_number":82,"context_line":"        datetime.datetime.utcnow().isoformat()))"},{"line_number":83,"context_line":"    LOG.info(\"Backing up heat database to {}\".format(db_path))"},{"line_number":84,"context_line":"    with open(db_path, \u0027w\u0027) as out:"}],"source_content_type":"text/x-python","patch_set":13,"id":"b38489aa_4cbe0cfe","line":81,"range":{"start_line":81,"start_character":38,"end_line":81,"end_character":53},"updated":"2021-06-03 05:51:51.000000000","message":"This looks different from what format we\u0027re using in tripleoclient[1]. They need to be consistent I guess. Also, don\u0027t we need to archive for the restore logic to work, if required(?).\n\nI had proposed a fix to make it consistent in tripleolcient[2]\n\n[1] https://github.com/openstack/python-tripleoclient/blob/master/tripleoclient/heat_launcher.py#L146\n[2] https://review.opendev.org/c/openstack/python-tripleoclient/+/793746","commit_id":"7d59c0ce0b199993e7aa6434adeddd062a1887eb"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"c561033796e59ca5e516213486f134410be56099","unresolved":true,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    if not args.working_dir:"},{"line_number":139,"context_line":"        if sudo_user:"},{"line_number":140,"context_line":"            user_home \u003d \u0027~{}\u0027.format(sudo_user)"},{"line_number":141,"context_line":"        else:"},{"line_number":142,"context_line":"            user_home \u003d \u0027~\u0027"},{"line_number":143,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"9110a6d3_a8fe43a3","line":140,"updated":"2021-06-03 07:46:51.000000000","message":"apparently we have a constant for that https://opendev.org/openstack/python-tripleoclient/src/commit/fe22d67515154f819ba6fd75d673668df04038b5/tripleoclient/constants.py#L195\n\nplease consider using it instead?","commit_id":"7d59c0ce0b199993e7aa6434adeddd062a1887eb"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"c561033796e59ca5e516213486f134410be56099","unresolved":true,"context_lines":[{"line_number":189,"context_line":"        drop_db()"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    # Chown all files to original user if running under sudo"},{"line_number":192,"context_line":"    if sudo_user:"},{"line_number":193,"context_line":"        subprocess.run(["},{"line_number":194,"context_line":"            \u0027chown\u0027, \u0027-R\u0027, \u0027{}:{}\u0027.format(sudo_user, sudo_user),"},{"line_number":195,"context_line":"            working_dir],"}],"source_content_type":"text/x-python","patch_set":13,"id":"e09b96c3_9b7b3a92","line":192,"range":{"start_line":192,"start_character":7,"end_line":192,"end_character":16},"updated":"2021-06-03 07:46:51.000000000","message":"hmm ok you may want to keep your os.environ.get for this check :/","commit_id":"7d59c0ce0b199993e7aa6434adeddd062a1887eb"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"22a311b89374abff1196e4b3bd469ba25944041b","unresolved":true,"context_lines":[{"line_number":80,"context_line":"    heat_dir \u003d os.path.join(backup_dir, \u0027heat-launcher\u0027)"},{"line_number":81,"context_line":"    if not os.path.isdir(heat_dir):"},{"line_number":82,"context_line":"        os.makedirs(heat_dir)"},{"line_number":83,"context_line":"    db_path \u003d os.path.join(heat_dir, \u0027heat-db.sql\u0027.format("},{"line_number":84,"context_line":"        datetime.datetime.utcnow().isoformat()))"},{"line_number":85,"context_line":"    LOG.info(\"Backing up heat database to {}\".format(db_path))"},{"line_number":86,"context_line":"    with open(db_path, \u0027w\u0027) as out:"},{"line_number":87,"context_line":"        subprocess.run(["}],"source_content_type":"text/x-python","patch_set":14,"id":"8fcf88b4_55f3a92b","line":84,"range":{"start_line":83,"start_character":50,"end_line":84,"end_character":47},"updated":"2021-06-04 08:18:21.000000000","message":"do we need that .format? I don\u0027t see any parameters, unless there\u0027s something in the backup_dir param, but even then, it should be on line 80.. ?","commit_id":"8dad2f25f60a12774597ca7104073843f8921101"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"a75152fb310547a7fff6c51ef554b37aca800a9c","unresolved":true,"context_lines":[{"line_number":80,"context_line":"    heat_dir \u003d os.path.join(backup_dir, \u0027heat-launcher\u0027)"},{"line_number":81,"context_line":"    if not os.path.isdir(heat_dir):"},{"line_number":82,"context_line":"        os.makedirs(heat_dir)"},{"line_number":83,"context_line":"    db_path \u003d os.path.join(heat_dir, \u0027heat-db.sql\u0027.format("},{"line_number":84,"context_line":"        datetime.datetime.utcnow().isoformat()))"},{"line_number":85,"context_line":"    LOG.info(\"Backing up heat database to {}\".format(db_path))"},{"line_number":86,"context_line":"    with open(db_path, \u0027w\u0027) as out:"},{"line_number":87,"context_line":"        subprocess.run(["}],"source_content_type":"text/x-python","patch_set":14,"id":"676af743_e5ea93b4","line":84,"range":{"start_line":83,"start_character":50,"end_line":84,"end_character":47},"in_reply_to":"8fcf88b4_55f3a92b","updated":"2021-06-04 11:33:35.000000000","message":"fixed, thanks.","commit_id":"8dad2f25f60a12774597ca7104073843f8921101"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"22a311b89374abff1196e4b3bd469ba25944041b","unresolved":true,"context_lines":[{"line_number":191,"context_line":"    LOG.setLevel(logging.INFO)"},{"line_number":192,"context_line":"    args \u003d parse_args()"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    sudo_user \u003d os.environ.get(\u0027SUDO_USER\u0027)"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    if not args.working_dir:"},{"line_number":197,"context_line":"        if sudo_user:"}],"source_content_type":"text/x-python","patch_set":14,"id":"0797faea_91f6923e","line":194,"updated":"2021-06-04 08:18:21.000000000","message":"since it\u0027s used later, this one can\u0027t be discarded indeed (line 250)","commit_id":"8dad2f25f60a12774597ca7104073843f8921101"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"22a311b89374abff1196e4b3bd469ba25944041b","unresolved":true,"context_lines":[{"line_number":194,"context_line":"    sudo_user \u003d os.environ.get(\u0027SUDO_USER\u0027)"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    if not args.working_dir:"},{"line_number":197,"context_line":"        if sudo_user:"},{"line_number":198,"context_line":"            user_home \u003d \u0027~{}\u0027.format(sudo_user)"},{"line_number":199,"context_line":"        else:"},{"line_number":200,"context_line":"            user_home \u003d \u0027~\u0027"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        working_dir \u003d os.path.join("},{"line_number":203,"context_line":"            os.path.expanduser(user_home),"}],"source_content_type":"text/x-python","patch_set":14,"id":"cd7c2091_7c6d4ba6","line":200,"range":{"start_line":197,"start_character":1,"end_line":200,"end_character":27},"updated":"2021-06-04 08:18:21.000000000","message":"Apparently, the tripleoclient.constants.CLOUD_HOME_DIR provides the value directly. Maybe better than re-inventing the wheel?","commit_id":"8dad2f25f60a12774597ca7104073843f8921101"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"a75152fb310547a7fff6c51ef554b37aca800a9c","unresolved":true,"context_lines":[{"line_number":194,"context_line":"    sudo_user \u003d os.environ.get(\u0027SUDO_USER\u0027)"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    if not args.working_dir:"},{"line_number":197,"context_line":"        if sudo_user:"},{"line_number":198,"context_line":"            user_home \u003d \u0027~{}\u0027.format(sudo_user)"},{"line_number":199,"context_line":"        else:"},{"line_number":200,"context_line":"            user_home \u003d \u0027~\u0027"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        working_dir \u003d os.path.join("},{"line_number":203,"context_line":"            os.path.expanduser(user_home),"}],"source_content_type":"text/x-python","patch_set":14,"id":"992b1c3f_2eab8351","line":200,"range":{"start_line":197,"start_character":1,"end_line":200,"end_character":27},"in_reply_to":"cd7c2091_7c6d4ba6","updated":"2021-06-04 11:33:35.000000000","message":"we can\u0027t as we don\u0027t want to depend on tripleoclient from here. i don\u0027t think these few lines are reinventing all that much :)","commit_id":"8dad2f25f60a12774597ca7104073843f8921101"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"22a311b89374abff1196e4b3bd469ba25944041b","unresolved":true,"context_lines":[{"line_number":200,"context_line":"            user_home \u003d \u0027~\u0027"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        working_dir \u003d os.path.join("},{"line_number":203,"context_line":"            os.path.expanduser(user_home),"},{"line_number":204,"context_line":"            \u0027overcloud-deploy\u0027)"},{"line_number":205,"context_line":"    else:"},{"line_number":206,"context_line":"        working_dir \u003d args.working_dir"}],"source_content_type":"text/x-python","patch_set":14,"id":"a1c05dae_b256c231","line":203,"range":{"start_line":203,"start_character":12,"end_line":203,"end_character":41},"updated":"2021-06-04 08:18:21.000000000","message":"this could then be replaced by constants.CLOUD_HOME_DIR for instance","commit_id":"8dad2f25f60a12774597ca7104073843f8921101"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"82cf1d1d5c59ef9ac00d831b86f3f97d7b67c7f8","unresolved":true,"context_lines":[{"line_number":238,"context_line":"        if db_tar_path:"},{"line_number":239,"context_line":"            # Symlink to the existing db backup"},{"line_number":240,"context_line":"            os.symlink(db_tar_path,"},{"line_number":241,"context_line":"                os.path.join(stack_dir, os.path.basename(db_tar_path)))"},{"line_number":242,"context_line":"        export_passwords(_heatclient, stack, stack_dir)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    if database_exists():"}],"source_content_type":"text/x-python","patch_set":16,"id":"6990bb73_87a4573d","line":241,"range":{"start_line":241,"start_character":16,"end_line":241,"end_character":71},"updated":"2021-06-08 10:00:34.000000000","message":"hm, does this not fail on - PEP 8: E128 continuation line under-indented for visual indent ?","commit_id":"b252d45739a9e359a005dfb911dc38d516df4675"}]}
