)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"87cd303d4866629f89f22aa26e5dff848d9b8a60","unresolved":true,"context_lines":[{"line_number":7,"context_line":"DC api-proxy to store load on vault location"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"As part of the changes to improve disk usage during load import"},{"line_number":10,"context_line":"operation for SystemController, dc-api-proxy iwas changed to"},{"line_number":11,"context_line":"store the iso and sig files under vault."},{"line_number":12,"context_line":"Also, dc-api-proxy needs to intercept the original multipart"},{"line_number":13,"context_line":"form data request and relays to sysinv a application/json"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"afc033f5_a1caf81e","line":10,"range":{"start_line":10,"start_character":45,"end_line":10,"end_character":50},"updated":"2021-09-01 12:55:10.000000000","message":"nit: was","commit_id":"dee43e0724553d6da49ddb2a04a32f61e0bc5ff9"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"87cd303d4866629f89f22aa26e5dff848d9b8a60","unresolved":true,"context_lines":[{"line_number":12,"context_line":"Also, dc-api-proxy needs to intercept the original multipart"},{"line_number":13,"context_line":"form data request and relays to sysinv a application/json"},{"line_number":14,"context_line":"request containing the iso and sig files location under vault."},{"line_number":15,"context_line":"Further processing, with regard to proper handling upon successfull"},{"line_number":16,"context_line":"and error responses from sysinv has been added."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Basic --os-region-name SystemController load-import test has been"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"211b66c3_9e482d6e","line":15,"range":{"start_line":15,"start_character":56,"end_line":15,"end_character":67},"updated":"2021-09-01 12:55:10.000000000","message":"nit: successful","commit_id":"dee43e0724553d6da49ddb2a04a32f61e0bc5ff9"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"87cd303d4866629f89f22aa26e5dff848d9b8a60","unresolved":true,"context_lines":[{"line_number":15,"context_line":"Further processing, with regard to proper handling upon successfull"},{"line_number":16,"context_line":"and error responses from sysinv has been added."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Basic --os-region-name SystemController load-import test has been"},{"line_number":19,"context_line":"done."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Story: 2009158"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"d709576a_92669d59","line":18,"updated":"2021-09-01 12:55:10.000000000","message":"Please list the negative/error condition testcases performed. \n ( should be in the format as per draft:\nhttps://review.opendev.org/c/starlingx/docs/+/805055 )","commit_id":"dee43e0724553d6da49ddb2a04a32f61e0bc5ff9"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"16b1eead96b6515fb67560cc419560e9e7949165","unresolved":true,"context_lines":[{"line_number":15,"context_line":"Further processing, with regard to proper handling upon successful"},{"line_number":16,"context_line":"and error responses from sysinv has been added."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"The /scratch space usage improved 2x ISO size, also the"},{"line_number":19,"context_line":"time to process the load-import command improved from"},{"line_number":20,"context_line":"around 420 to around 120 seconds on a virtualized environment."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Test Plan: load-import via dc-api-proxy (SystemController)"},{"line_number":23,"context_line":"PASS: Verify with no load previous (N+1 version)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"e39d7fb8_100c85f4","line":20,"range":{"start_line":18,"start_character":0,"end_line":20,"end_character":62},"updated":"2021-09-22 13:32:56.000000000","message":"Is this accurate with the latest patchset?","commit_id":"b8d60e8a82d629b0a24b2568335f2f8d8d50bc0f"},{"author":{"_account_id":32870,"name":"Adriano Oliveira","email":"adriano.oliveira@windriver.com","username":"aoliveir"},"change_message_id":"7904d926c3aa0b3b0c8f602bab436cd1a7b5f61f","unresolved":true,"context_lines":[{"line_number":15,"context_line":"Further processing, with regard to proper handling upon successful"},{"line_number":16,"context_line":"and error responses from sysinv has been added."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"The /scratch space usage improved 2x ISO size, also the"},{"line_number":19,"context_line":"time to process the load-import command improved from"},{"line_number":20,"context_line":"around 420 to around 120 seconds on a virtualized environment."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Test Plan: load-import via dc-api-proxy (SystemController)"},{"line_number":23,"context_line":"PASS: Verify with no load previous (N+1 version)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"4fa65bb5_ef937238","line":20,"range":{"start_line":18,"start_character":0,"end_line":20,"end_character":62},"in_reply_to":"e39d7fb8_100c85f4","updated":"2021-09-22 13:46:58.000000000","message":"Yes, the load-import time varies a bit, mainly when testing on vbox since with the DC env there are 4 VMs with 16G each, but it is around 80-130 seconds, the space is the same, this change does not add any additional temporary copy, the space save comes from not generating a multiform request from proxy to sysinv, which would generate 2 additional temporary copies on webob","commit_id":"b8d60e8a82d629b0a24b2568335f2f8d8d50bc0f"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"fc5103dc86a8792fc34a54c4b91663e0371e58bb","unresolved":true,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Regression: load-import via dcmanager (via upgrade-strategy)"},{"line_number":32,"context_line":"PASS: upgrade-strategy applied (load imported to subcloud DX)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Story: 2009158"},{"line_number":35,"context_line":"Task: 43141"},{"line_number":36,"context_line":"Depends-On: https://review.opendev.org/c/starlingx/config/+/806823"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"f30b6fb2_90970092","line":33,"updated":"2021-09-22 21:32:54.000000000","message":"As noted in the corresponding config review, subcloud SX is also recommended for test of the load-metadata pathway.","commit_id":"f2e6b4e54dc77843e8ad82036016bfaa31a48afe"},{"author":{"_account_id":32870,"name":"Adriano Oliveira","email":"adriano.oliveira@windriver.com","username":"aoliveir"},"change_message_id":"d44f8d67a632c4529cd791a26dd00f8f5ecc2332","unresolved":true,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Regression: load-import via dcmanager (via upgrade-strategy)"},{"line_number":32,"context_line":"PASS: upgrade-strategy applied (load imported to subcloud DX)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Story: 2009158"},{"line_number":35,"context_line":"Task: 43141"},{"line_number":36,"context_line":"Depends-On: https://review.opendev.org/c/starlingx/config/+/806823"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"2a5d1273_38fdeb8e","line":33,"in_reply_to":"f30b6fb2_90970092","updated":"2021-09-22 21:40:16.000000000","message":"Ok","commit_id":"f2e6b4e54dc77843e8ad82036016bfaa31a48afe"}],"distributedcloud/dcorch/api/proxy/apps/controller.py":[{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"87cd303d4866629f89f22aa26e5dff848d9b8a60","unresolved":true,"context_lines":[{"line_number":406,"context_line":"        # The request is changed to pass only the file location"},{"line_number":407,"context_line":"        if self._is_load_import(request.path):"},{"line_number":408,"context_line":"            req_body \u003d self._store_load_to_vault(req)"},{"line_number":409,"context_line":"            req_body[\u0027active\u0027] \u003d request.POST[\u0027active\u0027]"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"            # sysinv will handle a simple application/json request"},{"line_number":412,"context_line":"            # with the vault location"}],"source_content_type":"text/x-python","patch_set":3,"id":"093d13fc_c8da9a0c","line":409,"range":{"start_line":409,"start_character":45,"end_line":409,"end_character":55},"updated":"2021-09-01 12:55:10.000000000","message":"This \u0027active\u0027 field is not guaranteed to exist in a REST API call (not via cgtsclient).","commit_id":"dee43e0724553d6da49ddb2a04a32f61e0bc5ff9"},{"author":{"_account_id":32870,"name":"Adriano Oliveira","email":"adriano.oliveira@windriver.com","username":"aoliveir"},"change_message_id":"b76576d8396db6960b790014094c6d7ac4198e57","unresolved":true,"context_lines":[{"line_number":406,"context_line":"        # The request is changed to pass only the file location"},{"line_number":407,"context_line":"        if self._is_load_import(request.path):"},{"line_number":408,"context_line":"            req_body \u003d self._store_load_to_vault(req)"},{"line_number":409,"context_line":"            req_body[\u0027active\u0027] \u003d request.POST[\u0027active\u0027]"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"            # sysinv will handle a simple application/json request"},{"line_number":412,"context_line":"            # with the vault location"}],"source_content_type":"text/x-python","patch_set":3,"id":"d23426f6_4f8b8c45","line":409,"range":{"start_line":409,"start_character":45,"end_line":409,"end_character":55},"in_reply_to":"093d13fc_c8da9a0c","updated":"2021-09-01 21:13:45.000000000","message":"Ok, I created a task to add the /v1/loads REST API reference","commit_id":"dee43e0724553d6da49ddb2a04a32f61e0bc5ff9"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"87cd303d4866629f89f22aa26e5dff848d9b8a60","unresolved":true,"context_lines":[{"line_number":492,"context_line":"            self._remove_load_from_vault(sw_version)"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"            if not os.path.isdir(versioned_vault):"},{"line_number":495,"context_line":"                # Check if the temporary folder exists"},{"line_number":496,"context_line":"                if not os.path.isdir(proxy_consts.LOAD_VAULT_TMP_DIR):"},{"line_number":497,"context_line":"                    msg \u003d _(\"Failed to store load in vault. Please check \""},{"line_number":498,"context_line":"                            \"dcorch log for details.\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"a622c223_2655b67e","line":495,"updated":"2021-09-01 12:55:10.000000000","message":"it could be a valid case that neither the versioned_vault nor temp directory exists yet at the time of the first load-import.  It can be simulated for this scenario on initial load-import or by deleting the /opt/dc-vault/loads/\u003cversion\u003e","commit_id":"dee43e0724553d6da49ddb2a04a32f61e0bc5ff9"},{"author":{"_account_id":32870,"name":"Adriano Oliveira","email":"adriano.oliveira@windriver.com","username":"aoliveir"},"change_message_id":"05dbdcd5ad16acbda84152db32586974ce257814","unresolved":true,"context_lines":[{"line_number":492,"context_line":"            self._remove_load_from_vault(sw_version)"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"            if not os.path.isdir(versioned_vault):"},{"line_number":495,"context_line":"                # Check if the temporary folder exists"},{"line_number":496,"context_line":"                if not os.path.isdir(proxy_consts.LOAD_VAULT_TMP_DIR):"},{"line_number":497,"context_line":"                    msg \u003d _(\"Failed to store load in vault. Please check \""},{"line_number":498,"context_line":"                            \"dcorch log for details.\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"d8bffccc_c9dd0510","line":495,"in_reply_to":"a622c223_2655b67e","updated":"2021-09-01 23:41:19.000000000","message":"The temporary folder should never exist, only the versioned one. The test was actually performed this way, as temporary should only exists while the request did not return yet.","commit_id":"dee43e0724553d6da49ddb2a04a32f61e0bc5ff9"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"87cd303d4866629f89f22aa26e5dff848d9b8a60","unresolved":true,"context_lines":[{"line_number":493,"context_line":""},{"line_number":494,"context_line":"            if not os.path.isdir(versioned_vault):"},{"line_number":495,"context_line":"                # Check if the temporary folder exists"},{"line_number":496,"context_line":"                if not os.path.isdir(proxy_consts.LOAD_VAULT_TMP_DIR):"},{"line_number":497,"context_line":"                    msg \u003d _(\"Failed to store load in vault. Please check \""},{"line_number":498,"context_line":"                            \"dcorch log for details.\")"},{"line_number":499,"context_line":"                    LOG.error(\"_save_load_to_vault failed: %s does not exist.\""}],"source_content_type":"text/x-python","patch_set":3,"id":"918f9f96_33b0d3e8","line":496,"range":{"start_line":496,"start_character":50,"end_line":496,"end_character":68},"updated":"2021-09-01 12:55:10.000000000","message":"does this need to be appended with versioned also? In case the async load-import isnt complete and a load-import --active is started.","commit_id":"dee43e0724553d6da49ddb2a04a32f61e0bc5ff9"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"4337fe4a0d7ad3bb529c07c81e5208973d6c005c","unresolved":true,"context_lines":[{"line_number":493,"context_line":""},{"line_number":494,"context_line":"            if not os.path.isdir(versioned_vault):"},{"line_number":495,"context_line":"                # Check if the temporary folder exists"},{"line_number":496,"context_line":"                if not os.path.isdir(proxy_consts.LOAD_VAULT_TMP_DIR):"},{"line_number":497,"context_line":"                    msg \u003d _(\"Failed to store load in vault. Please check \""},{"line_number":498,"context_line":"                            \"dcorch log for details.\")"},{"line_number":499,"context_line":"                    LOG.error(\"_save_load_to_vault failed: %s does not exist.\""}],"source_content_type":"text/x-python","patch_set":3,"id":"619b8c15_abdc4afc","line":496,"range":{"start_line":496,"start_character":50,"end_line":496,"end_character":68},"in_reply_to":"2e895493_68f5add1","updated":"2021-09-02 12:47:05.000000000","message":"yes, though should be a rare boundary condition to perform these in parallel:\nsystem load-import\nsystem load-import --active","commit_id":"dee43e0724553d6da49ddb2a04a32f61e0bc5ff9"},{"author":{"_account_id":32870,"name":"Adriano Oliveira","email":"adriano.oliveira@windriver.com","username":"aoliveir"},"change_message_id":"05dbdcd5ad16acbda84152db32586974ce257814","unresolved":true,"context_lines":[{"line_number":493,"context_line":""},{"line_number":494,"context_line":"            if not os.path.isdir(versioned_vault):"},{"line_number":495,"context_line":"                # Check if the temporary folder exists"},{"line_number":496,"context_line":"                if not os.path.isdir(proxy_consts.LOAD_VAULT_TMP_DIR):"},{"line_number":497,"context_line":"                    msg \u003d _(\"Failed to store load in vault. Please check \""},{"line_number":498,"context_line":"                            \"dcorch log for details.\")"},{"line_number":499,"context_line":"                    LOG.error(\"_save_load_to_vault failed: %s does not exist.\""}],"source_content_type":"text/x-python","patch_set":3,"id":"2e895493_68f5add1","line":496,"range":{"start_line":496,"start_character":50,"end_line":496,"end_character":68},"in_reply_to":"918f9f96_33b0d3e8","updated":"2021-09-01 23:41:19.000000000","message":"You meant if there is another load-import started while the first is being executed?","commit_id":"dee43e0724553d6da49ddb2a04a32f61e0bc5ff9"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"87cd303d4866629f89f22aa26e5dff848d9b8a60","unresolved":true,"context_lines":[{"line_number":510,"context_line":"                    LOG.error(\"_save_load_to_vault failed to store load in vault\")"},{"line_number":511,"context_line":"                    raise webob.exc.HTTPInsufficientStorage(explanation\u003dmsg)"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":"                # Move the folder with to the final location"},{"line_number":514,"context_line":"                shutil.move(proxy_consts.LOAD_VAULT_TMP_DIR, versioned_vault)"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"            LOG.info(\"Load (%s) saved to vault.\" % sw_version)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7c065d5d_34f07d04","line":513,"range":{"start_line":513,"start_character":34,"end_line":513,"end_character":39},"updated":"2021-09-01 12:55:10.000000000","message":"nit: extra word","commit_id":"dee43e0724553d6da49ddb2a04a32f61e0bc5ff9"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"87cd303d4866629f89f22aa26e5dff848d9b8a60","unresolved":true,"context_lines":[{"line_number":511,"context_line":"                    raise webob.exc.HTTPInsufficientStorage(explanation\u003dmsg)"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":"                # Move the folder with to the final location"},{"line_number":514,"context_line":"                shutil.move(proxy_consts.LOAD_VAULT_TMP_DIR, versioned_vault)"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"            LOG.info(\"Load (%s) saved to vault.\" % sw_version)"},{"line_number":517,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"2ad38496_1d7b565c","line":514,"updated":"2021-09-01 12:55:10.000000000","message":"if the versioned_vault directory already exists will this put it in subdirectory of it or overwrite it?","commit_id":"dee43e0724553d6da49ddb2a04a32f61e0bc5ff9"},{"author":{"_account_id":32870,"name":"Adriano Oliveira","email":"adriano.oliveira@windriver.com","username":"aoliveir"},"change_message_id":"8ebac588f08c5c5826781ad36f972655acfe2878","unresolved":true,"context_lines":[{"line_number":511,"context_line":"                    raise webob.exc.HTTPInsufficientStorage(explanation\u003dmsg)"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":"                # Move the folder with to the final location"},{"line_number":514,"context_line":"                shutil.move(proxy_consts.LOAD_VAULT_TMP_DIR, versioned_vault)"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"            LOG.info(\"Load (%s) saved to vault.\" % sw_version)"},{"line_number":517,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"4bf8f7b2_5437f8af","line":514,"in_reply_to":"2ad38496_1d7b565c","updated":"2021-09-02 00:10:31.000000000","message":"In my tests the files have just been overwritten, but I will re-check.","commit_id":"dee43e0724553d6da49ddb2a04a32f61e0bc5ff9"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"87cd303d4866629f89f22aa26e5dff848d9b8a60","unresolved":true,"context_lines":[{"line_number":626,"context_line":"        except subprocess.CalledProcessError as e:"},{"line_number":627,"context_line":"            LOG.error(\"Failed to upload load file %s, /usr/bin/fallocate error: %s \""},{"line_number":628,"context_line":"                      % (fn, e.output))"},{"line_number":629,"context_line":"            if dst:"},{"line_number":630,"context_line":"                os.close(dst)"},{"line_number":631,"context_line":"                os.remove(fn)"},{"line_number":632,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"08c46de1_5a81ed64","line":629,"range":{"start_line":629,"start_character":2,"end_line":629,"end_character":19},"updated":"2021-09-01 12:55:10.000000000","message":"this condition differs from the one at sysinv/api/controllers/v1/load.py::_upload_file()","commit_id":"dee43e0724553d6da49ddb2a04a32f61e0bc5ff9"},{"author":{"_account_id":32870,"name":"Adriano Oliveira","email":"adriano.oliveira@windriver.com","username":"aoliveir"},"change_message_id":"8ebac588f08c5c5826781ad36f972655acfe2878","unresolved":true,"context_lines":[{"line_number":626,"context_line":"        except subprocess.CalledProcessError as e:"},{"line_number":627,"context_line":"            LOG.error(\"Failed to upload load file %s, /usr/bin/fallocate error: %s \""},{"line_number":628,"context_line":"                      % (fn, e.output))"},{"line_number":629,"context_line":"            if dst:"},{"line_number":630,"context_line":"                os.close(dst)"},{"line_number":631,"context_line":"                os.remove(fn)"},{"line_number":632,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"92f3b7af_62ce0756","line":629,"range":{"start_line":629,"start_character":2,"end_line":629,"end_character":19},"in_reply_to":"08c46de1_5a81ed64","updated":"2021-09-02 00:10:31.000000000","message":"Yes, I will change here","commit_id":"dee43e0724553d6da49ddb2a04a32f61e0bc5ff9"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"87cd303d4866629f89f22aa26e5dff848d9b8a60","unresolved":true,"context_lines":[{"line_number":644,"context_line":"        try:"},{"line_number":645,"context_line":"            for f in proxy_consts.IMPORT_LOAD_FILES:"},{"line_number":646,"context_line":"                if f not in request.POST:"},{"line_number":647,"context_line":"                    raise wsme.exc.ClientSideError(_(\"Missing required file for %s\") % f)"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"                file_item \u003d request.POST[f]"},{"line_number":650,"context_line":"                if not file_item.filename:"}],"source_content_type":"text/x-python","patch_set":3,"id":"d9c701ca_64c1c312","line":647,"range":{"start_line":647,"start_character":26,"end_line":647,"end_character":30},"updated":"2021-09-01 12:55:10.000000000","message":"This service has been referencing pecan.abort()","commit_id":"dee43e0724553d6da49ddb2a04a32f61e0bc5ff9"},{"author":{"_account_id":32870,"name":"Adriano Oliveira","email":"adriano.oliveira@windriver.com","username":"aoliveir"},"change_message_id":"352285cb958d02a2cbbf097a803f8e7a24be3317","unresolved":true,"context_lines":[{"line_number":644,"context_line":"        try:"},{"line_number":645,"context_line":"            for f in proxy_consts.IMPORT_LOAD_FILES:"},{"line_number":646,"context_line":"                if f not in request.POST:"},{"line_number":647,"context_line":"                    raise wsme.exc.ClientSideError(_(\"Missing required file for %s\") % f)"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"                file_item \u003d request.POST[f]"},{"line_number":650,"context_line":"                if not file_item.filename:"}],"source_content_type":"text/x-python","patch_set":3,"id":"57d5886b_99b5a8af","line":647,"range":{"start_line":647,"start_character":26,"end_line":647,"end_character":30},"in_reply_to":"d9c701ca_64c1c312","updated":"2021-09-02 13:49:57.000000000","message":"replaced by webob.exec","commit_id":"dee43e0724553d6da49ddb2a04a32f61e0bc5ff9"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"87cd303d4866629f89f22aa26e5dff848d9b8a60","unresolved":true,"context_lines":[{"line_number":674,"context_line":"                self._copy_device_image_to_vault(fn, dst_filename)"},{"line_number":675,"context_line":"            else:"},{"line_number":676,"context_line":"                raise wsme.exc.ClientSideError(_(\"Failed to save file %s to disk. Please check\""},{"line_number":677,"context_line":"                                                 \"sysinv logs for details.\""},{"line_number":678,"context_line":"                                                 % file_item.filename))"},{"line_number":679,"context_line":"        finally:"},{"line_number":680,"context_line":"            shutil.rmtree(proxy_consts.LOAD_FILES_STAGING_DIR)"}],"source_content_type":"text/x-python","patch_set":3,"id":"29cfdc95_1d20fb27","line":677,"range":{"start_line":677,"start_character":50,"end_line":677,"end_character":57},"updated":"2021-09-01 12:55:10.000000000","message":"are the expected error logs in dcorch ?","commit_id":"dee43e0724553d6da49ddb2a04a32f61e0bc5ff9"},{"author":{"_account_id":32870,"name":"Adriano Oliveira","email":"adriano.oliveira@windriver.com","username":"aoliveir"},"change_message_id":"8ebac588f08c5c5826781ad36f972655acfe2878","unresolved":true,"context_lines":[{"line_number":674,"context_line":"                self._copy_device_image_to_vault(fn, dst_filename)"},{"line_number":675,"context_line":"            else:"},{"line_number":676,"context_line":"                raise wsme.exc.ClientSideError(_(\"Failed to save file %s to disk. Please check\""},{"line_number":677,"context_line":"                                                 \"sysinv logs for details.\""},{"line_number":678,"context_line":"                                                 % file_item.filename))"},{"line_number":679,"context_line":"        finally:"},{"line_number":680,"context_line":"            shutil.rmtree(proxy_consts.LOAD_FILES_STAGING_DIR)"}],"source_content_type":"text/x-python","patch_set":3,"id":"96ad5d70_e8c9e9d3","line":677,"range":{"start_line":677,"start_character":50,"end_line":677,"end_character":57},"in_reply_to":"29cfdc95_1d20fb27","updated":"2021-09-02 00:10:31.000000000","message":"Yes","commit_id":"dee43e0724553d6da49ddb2a04a32f61e0bc5ff9"},{"author":{"_account_id":15435,"name":"Al Bailey","email":"albailey1974@gmail.com","username":"albailey"},"change_message_id":"a191c97a8cd53d01b53529454751e7f1e02a91b1","unresolved":true,"context_lines":[{"line_number":491,"context_line":"            LOG.info(\"_save_load_to_vault remove prior %s\" % sw_version)"},{"line_number":492,"context_line":"            self._remove_load_from_vault(sw_version)"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"            if not os.path.isdir(versioned_vault):"},{"line_number":495,"context_line":"                # Check if the temporary folder exists"},{"line_number":496,"context_line":"                if not os.path.isdir(proxy_consts.LOAD_VAULT_TMP_DIR):"},{"line_number":497,"context_line":"                    msg \u003d _(\"Failed to store load in vault. Please check \""},{"line_number":498,"context_line":"                            \"dcorch log for details.\")"},{"line_number":499,"context_line":"                    LOG.error(\"_save_load_to_vault failed: %s does not exist.\""},{"line_number":500,"context_line":"                              % proxy_consts.LOAD_VAULT_TMP_DIR)"},{"line_number":501,"context_line":"                    raise webob.exc.HTTPInternalServerError(explanation\u003dmsg)"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"                # Check the number of files in the temp folder"},{"line_number":504,"context_line":"                load_path \u003d proxy_consts.LOAD_VAULT_TMP_DIR"},{"line_number":505,"context_line":"                load_files \u003d [f for f in os.listdir(load_path)"},{"line_number":506,"context_line":"                              if os.path.isfile(os.path.join(load_path, f))]"},{"line_number":507,"context_line":"                if len(load_files) !\u003d len(proxy_consts.IMPORT_LOAD_FILES):"},{"line_number":508,"context_line":"                    msg \u003d _(\"Failed to store load in vault. Please check \""},{"line_number":509,"context_line":"                            \"dcorch log for details.\")"},{"line_number":510,"context_line":"                    LOG.error(\"_save_load_to_vault failed to store load in vault\")"},{"line_number":511,"context_line":"                    raise webob.exc.HTTPInsufficientStorage(explanation\u003dmsg)"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":"                # Move the folder to the final location"},{"line_number":514,"context_line":"                shutil.move(proxy_consts.LOAD_VAULT_TMP_DIR, versioned_vault)"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"            LOG.info(\"Load (%s) saved to vault.\" % sw_version)"},{"line_number":517,"context_line":"        except Exception:"},{"line_number":518,"context_line":"            msg \u003d _(\"Failed to store load in vault. Please check \""}],"source_content_type":"text/x-python","patch_set":7,"id":"d32b4ff4_e4b2271d","line":515,"range":{"start_line":494,"start_character":12,"end_line":515,"end_character":0},"updated":"2021-09-15 14:11:23.000000000","message":"this entire block is indented.\nWhat would happen if we import a second time (I dont know if we support a re-import, or a delete/import, or a person manually removing files, etc..)","commit_id":"7ce55a5968d547ccc7d5edcd6c9b744e8bf69174"},{"author":{"_account_id":15435,"name":"Al Bailey","email":"albailey1974@gmail.com","username":"albailey"},"change_message_id":"ee5a006868af9bd226124517015ee8ce49b8638d","unresolved":true,"context_lines":[{"line_number":491,"context_line":"            LOG.info(\"_save_load_to_vault remove prior %s\" % sw_version)"},{"line_number":492,"context_line":"            self._remove_load_from_vault(sw_version)"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"            if not os.path.isdir(versioned_vault):"},{"line_number":495,"context_line":"                # Check if the temporary folder exists"},{"line_number":496,"context_line":"                if not os.path.isdir(proxy_consts.LOAD_VAULT_TMP_DIR):"},{"line_number":497,"context_line":"                    msg \u003d _(\"Failed to store load in vault. Please check \""},{"line_number":498,"context_line":"                            \"dcorch log for details.\")"},{"line_number":499,"context_line":"                    LOG.error(\"_save_load_to_vault failed: %s does not exist.\""},{"line_number":500,"context_line":"                              % proxy_consts.LOAD_VAULT_TMP_DIR)"},{"line_number":501,"context_line":"                    raise webob.exc.HTTPInternalServerError(explanation\u003dmsg)"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"                # Check the number of files in the temp folder"},{"line_number":504,"context_line":"                load_path \u003d proxy_consts.LOAD_VAULT_TMP_DIR"},{"line_number":505,"context_line":"                load_files \u003d [f for f in os.listdir(load_path)"},{"line_number":506,"context_line":"                              if os.path.isfile(os.path.join(load_path, f))]"},{"line_number":507,"context_line":"                if len(load_files) !\u003d len(proxy_consts.IMPORT_LOAD_FILES):"},{"line_number":508,"context_line":"                    msg \u003d _(\"Failed to store load in vault. Please check \""},{"line_number":509,"context_line":"                            \"dcorch log for details.\")"},{"line_number":510,"context_line":"                    LOG.error(\"_save_load_to_vault failed to store load in vault\")"},{"line_number":511,"context_line":"                    raise webob.exc.HTTPInsufficientStorage(explanation\u003dmsg)"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":"                # Move the folder to the final location"},{"line_number":514,"context_line":"                shutil.move(proxy_consts.LOAD_VAULT_TMP_DIR, versioned_vault)"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"            LOG.info(\"Load (%s) saved to vault.\" % sw_version)"},{"line_number":517,"context_line":"        except Exception:"},{"line_number":518,"context_line":"            msg \u003d _(\"Failed to store load in vault. Please check \""}],"source_content_type":"text/x-python","patch_set":7,"id":"af75567d_e111ad9e","line":515,"range":{"start_line":494,"start_character":12,"end_line":515,"end_character":0},"in_reply_to":"8eb57ddc_95c5450c","updated":"2021-09-15 15:19:57.000000000","message":"No, I was thinking if old files were being lost, but line 492 explicitly removes them anyways The new code (line 494) is just going to skip this entire block if the vault directory already exists.","commit_id":"7ce55a5968d547ccc7d5edcd6c9b744e8bf69174"},{"author":{"_account_id":32870,"name":"Adriano Oliveira","email":"adriano.oliveira@windriver.com","username":"aoliveir"},"change_message_id":"ee321816622714695f19c67944e268a5c4030795","unresolved":true,"context_lines":[{"line_number":491,"context_line":"            LOG.info(\"_save_load_to_vault remove prior %s\" % sw_version)"},{"line_number":492,"context_line":"            self._remove_load_from_vault(sw_version)"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"            if not os.path.isdir(versioned_vault):"},{"line_number":495,"context_line":"                # Check if the temporary folder exists"},{"line_number":496,"context_line":"                if not os.path.isdir(proxy_consts.LOAD_VAULT_TMP_DIR):"},{"line_number":497,"context_line":"                    msg \u003d _(\"Failed to store load in vault. Please check \""},{"line_number":498,"context_line":"                            \"dcorch log for details.\")"},{"line_number":499,"context_line":"                    LOG.error(\"_save_load_to_vault failed: %s does not exist.\""},{"line_number":500,"context_line":"                              % proxy_consts.LOAD_VAULT_TMP_DIR)"},{"line_number":501,"context_line":"                    raise webob.exc.HTTPInternalServerError(explanation\u003dmsg)"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"                # Check the number of files in the temp folder"},{"line_number":504,"context_line":"                load_path \u003d proxy_consts.LOAD_VAULT_TMP_DIR"},{"line_number":505,"context_line":"                load_files \u003d [f for f in os.listdir(load_path)"},{"line_number":506,"context_line":"                              if os.path.isfile(os.path.join(load_path, f))]"},{"line_number":507,"context_line":"                if len(load_files) !\u003d len(proxy_consts.IMPORT_LOAD_FILES):"},{"line_number":508,"context_line":"                    msg \u003d _(\"Failed to store load in vault. Please check \""},{"line_number":509,"context_line":"                            \"dcorch log for details.\")"},{"line_number":510,"context_line":"                    LOG.error(\"_save_load_to_vault failed to store load in vault\")"},{"line_number":511,"context_line":"                    raise webob.exc.HTTPInsufficientStorage(explanation\u003dmsg)"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":"                # Move the folder to the final location"},{"line_number":514,"context_line":"                shutil.move(proxy_consts.LOAD_VAULT_TMP_DIR, versioned_vault)"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"            LOG.info(\"Load (%s) saved to vault.\" % sw_version)"},{"line_number":517,"context_line":"        except Exception:"},{"line_number":518,"context_line":"            msg \u003d _(\"Failed to store load in vault. Please check \""}],"source_content_type":"text/x-python","patch_set":7,"id":"e03ea552_f4c39c1b","line":515,"range":{"start_line":494,"start_character":12,"end_line":515,"end_character":0},"in_reply_to":"af75567d_e111ad9e","updated":"2021-09-15 15:59:25.000000000","message":"At this point the load has already been validated so the current version folder should be removed anyway, would you prefer to remove the check on 494 since the file shall not exist at that point? maybe that way would be more clear, not sure if we would need a \"guard\" check here.","commit_id":"7ce55a5968d547ccc7d5edcd6c9b744e8bf69174"},{"author":{"_account_id":32870,"name":"Adriano Oliveira","email":"adriano.oliveira@windriver.com","username":"aoliveir"},"change_message_id":"da6bf766062fba77664f8b8ccdc6f5370ceb5d87","unresolved":true,"context_lines":[{"line_number":491,"context_line":"            LOG.info(\"_save_load_to_vault remove prior %s\" % sw_version)"},{"line_number":492,"context_line":"            self._remove_load_from_vault(sw_version)"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"            if not os.path.isdir(versioned_vault):"},{"line_number":495,"context_line":"                # Check if the temporary folder exists"},{"line_number":496,"context_line":"                if not os.path.isdir(proxy_consts.LOAD_VAULT_TMP_DIR):"},{"line_number":497,"context_line":"                    msg \u003d _(\"Failed to store load in vault. Please check \""},{"line_number":498,"context_line":"                            \"dcorch log for details.\")"},{"line_number":499,"context_line":"                    LOG.error(\"_save_load_to_vault failed: %s does not exist.\""},{"line_number":500,"context_line":"                              % proxy_consts.LOAD_VAULT_TMP_DIR)"},{"line_number":501,"context_line":"                    raise webob.exc.HTTPInternalServerError(explanation\u003dmsg)"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"                # Check the number of files in the temp folder"},{"line_number":504,"context_line":"                load_path \u003d proxy_consts.LOAD_VAULT_TMP_DIR"},{"line_number":505,"context_line":"                load_files \u003d [f for f in os.listdir(load_path)"},{"line_number":506,"context_line":"                              if os.path.isfile(os.path.join(load_path, f))]"},{"line_number":507,"context_line":"                if len(load_files) !\u003d len(proxy_consts.IMPORT_LOAD_FILES):"},{"line_number":508,"context_line":"                    msg \u003d _(\"Failed to store load in vault. Please check \""},{"line_number":509,"context_line":"                            \"dcorch log for details.\")"},{"line_number":510,"context_line":"                    LOG.error(\"_save_load_to_vault failed to store load in vault\")"},{"line_number":511,"context_line":"                    raise webob.exc.HTTPInsufficientStorage(explanation\u003dmsg)"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":"                # Move the folder to the final location"},{"line_number":514,"context_line":"                shutil.move(proxy_consts.LOAD_VAULT_TMP_DIR, versioned_vault)"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"            LOG.info(\"Load (%s) saved to vault.\" % sw_version)"},{"line_number":517,"context_line":"        except Exception:"},{"line_number":518,"context_line":"            msg \u003d _(\"Failed to store load in vault. Please check \""}],"source_content_type":"text/x-python","patch_set":7,"id":"8eb57ddc_95c5450c","line":515,"range":{"start_line":494,"start_character":12,"end_line":515,"end_character":0},"in_reply_to":"d32b4ff4_e4b2271d","updated":"2021-09-15 14:53:49.000000000","message":"You mean doing a second load-import while still processing the first?","commit_id":"7ce55a5968d547ccc7d5edcd6c9b744e8bf69174"},{"author":{"_account_id":15435,"name":"Al Bailey","email":"albailey1974@gmail.com","username":"albailey"},"change_message_id":"255220ac09538821b53e38826e6f8a56b7732ec1","unresolved":true,"context_lines":[{"line_number":491,"context_line":"            LOG.info(\"_save_load_to_vault remove prior %s\" % sw_version)"},{"line_number":492,"context_line":"            self._remove_load_from_vault(sw_version)"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"            if not os.path.isdir(versioned_vault):"},{"line_number":495,"context_line":"                # Check if the temporary folder exists"},{"line_number":496,"context_line":"                if not os.path.isdir(proxy_consts.LOAD_VAULT_TMP_DIR):"},{"line_number":497,"context_line":"                    msg \u003d _(\"Failed to store load in vault. Please check \""},{"line_number":498,"context_line":"                            \"dcorch log for details.\")"},{"line_number":499,"context_line":"                    LOG.error(\"_save_load_to_vault failed: %s does not exist.\""},{"line_number":500,"context_line":"                              % proxy_consts.LOAD_VAULT_TMP_DIR)"},{"line_number":501,"context_line":"                    raise webob.exc.HTTPInternalServerError(explanation\u003dmsg)"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"                # Check the number of files in the temp folder"},{"line_number":504,"context_line":"                load_path \u003d proxy_consts.LOAD_VAULT_TMP_DIR"},{"line_number":505,"context_line":"                load_files \u003d [f for f in os.listdir(load_path)"},{"line_number":506,"context_line":"                              if os.path.isfile(os.path.join(load_path, f))]"},{"line_number":507,"context_line":"                if len(load_files) !\u003d len(proxy_consts.IMPORT_LOAD_FILES):"},{"line_number":508,"context_line":"                    msg \u003d _(\"Failed to store load in vault. Please check \""},{"line_number":509,"context_line":"                            \"dcorch log for details.\")"},{"line_number":510,"context_line":"                    LOG.error(\"_save_load_to_vault failed to store load in vault\")"},{"line_number":511,"context_line":"                    raise webob.exc.HTTPInsufficientStorage(explanation\u003dmsg)"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":"                # Move the folder to the final location"},{"line_number":514,"context_line":"                shutil.move(proxy_consts.LOAD_VAULT_TMP_DIR, versioned_vault)"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"            LOG.info(\"Load (%s) saved to vault.\" % sw_version)"},{"line_number":517,"context_line":"        except Exception:"},{"line_number":518,"context_line":"            msg \u003d _(\"Failed to store load in vault. Please check \""}],"source_content_type":"text/x-python","patch_set":7,"id":"eb73e80c_71c3b780","line":515,"range":{"start_line":494,"start_character":12,"end_line":515,"end_character":0},"in_reply_to":"e03ea552_f4c39c1b","updated":"2021-09-15 16:19:07.000000000","message":"Maybe my confusion is what would you expect to happen if the check on 494 returned false.\n\nLine 549 suggests the versioned_vault folder can have multiple loads imported\nLine 516 logs that we saved a file to vault even though lines 495-514  may not have run\n\nIf David is happy with the code, I have no problem with it","commit_id":"7ce55a5968d547ccc7d5edcd6c9b744e8bf69174"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"16b1eead96b6515fb67560cc419560e9e7949165","unresolved":true,"context_lines":[{"line_number":401,"context_line":"        request \u003d req"},{"line_number":402,"context_line":"        request.body \u003d req.body"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"        # load-import is stored in dc-vault for sysinv processing"},{"line_number":405,"context_line":"        # The request is changed to pass only the file location"},{"line_number":406,"context_line":"        if self._is_load_import(request.path):"},{"line_number":407,"context_line":"            req_body \u003d self._store_load_to_vault(req)"},{"line_number":408,"context_line":"            if \u0027active\u0027 in request.POST:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1cfb431c_5dd8782c","line":405,"range":{"start_line":404,"start_character":1,"end_line":405,"end_character":21},"updated":"2021-09-22 13:32:56.000000000","message":"as per discussion, is the intent to keep the copy at /scratch for sysinv to process and create a copy over to dc-vault. (So that sysinv does not need to process the potentially moving dc-vault load file) ?  In such case, sysinv would be responsible for deleting the version under /scratch.","commit_id":"b8d60e8a82d629b0a24b2568335f2f8d8d50bc0f"},{"author":{"_account_id":32870,"name":"Adriano Oliveira","email":"adriano.oliveira@windriver.com","username":"aoliveir"},"change_message_id":"7904d926c3aa0b3b0c8f602bab436cd1a7b5f61f","unresolved":true,"context_lines":[{"line_number":401,"context_line":"        request \u003d req"},{"line_number":402,"context_line":"        request.body \u003d req.body"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"        # load-import is stored in dc-vault for sysinv processing"},{"line_number":405,"context_line":"        # The request is changed to pass only the file location"},{"line_number":406,"context_line":"        if self._is_load_import(request.path):"},{"line_number":407,"context_line":"            req_body \u003d self._store_load_to_vault(req)"},{"line_number":408,"context_line":"            if \u0027active\u0027 in request.POST:"}],"source_content_type":"text/x-python","patch_set":10,"id":"59cad4a2_7bdc859d","line":405,"range":{"start_line":404,"start_character":1,"end_line":405,"end_character":21},"in_reply_to":"1cfb431c_5dd8782c","updated":"2021-09-22 13:46:58.000000000","message":"Yes, I need to change this comment since the sysinv is now working over the temporary copy to /scratch that was created by dcorch-api-proxy","commit_id":"b8d60e8a82d629b0a24b2568335f2f8d8d50bc0f"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"54e1be12f05dffd155a1c9735ad2c23b65145988","unresolved":true,"context_lines":[{"line_number":411,"context_line":"                req_body[\u0027active\u0027] \u003d request.POST[\u0027active\u0027]"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"            # sysinv will handle a simple application/json request"},{"line_number":414,"context_line":"            # with the vault location"},{"line_number":415,"context_line":"            req.content_type \u003d \"application/json\""},{"line_number":416,"context_line":"            req.body \u003d json.dumps(req_body)"},{"line_number":417,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"d9fb639e_d662856a","line":414,"range":{"start_line":414,"start_character":23,"end_line":414,"end_character":29},"updated":"2021-09-22 19:41:46.000000000","message":"LOAD_FILES_STAGING_DIR (or /scratch) ?","commit_id":"d4b9dde7fbbd1fb3e90870bef73adc42b8082596"},{"author":{"_account_id":32870,"name":"Adriano Oliveira","email":"adriano.oliveira@windriver.com","username":"aoliveir"},"change_message_id":"cea4a5ca071cc719c2c485153ca04a054bca50c5","unresolved":true,"context_lines":[{"line_number":411,"context_line":"                req_body[\u0027active\u0027] \u003d request.POST[\u0027active\u0027]"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"            # sysinv will handle a simple application/json request"},{"line_number":414,"context_line":"            # with the vault location"},{"line_number":415,"context_line":"            req.content_type \u003d \"application/json\""},{"line_number":416,"context_line":"            req.body \u003d json.dumps(req_body)"},{"line_number":417,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"42cba0d8_3274c82c","line":414,"range":{"start_line":414,"start_character":23,"end_line":414,"end_character":29},"in_reply_to":"d9fb639e_d662856a","updated":"2021-09-22 19:50:10.000000000","message":"That passed","commit_id":"d4b9dde7fbbd1fb3e90870bef73adc42b8082596"},{"author":{"_account_id":32870,"name":"Adriano Oliveira","email":"adriano.oliveira@windriver.com","username":"aoliveir"},"change_message_id":"0c094dbd0c9deda4f3bc700d258bb44aa86c9203","unresolved":true,"context_lines":[{"line_number":591,"context_line":"    def _upload_file(self, file_item):"},{"line_number":592,"context_line":"        try:"},{"line_number":593,"context_line":"            staging_dir \u003d proxy_consts.LOAD_FILES_STAGING_DIR"},{"line_number":594,"context_line":"            # Need to change the permission on temporary folder to sysinvi,"},{"line_number":595,"context_line":"            # sysinv might need to remove the temporary folder"},{"line_number":596,"context_line":"            sysinv_user_id \u003d pwd.getpwnam(\u0027sysinv\u0027).pw_uid"},{"line_number":597,"context_line":"            sysinv_group_id \u003d grp.getgrnam(\u0027sysinv\u0027).gr_gid"}],"source_content_type":"text/x-python","patch_set":12,"id":"aa0b961b_58a6345a","line":594,"updated":"2021-09-22 19:00:06.000000000","message":"Also changing the owner for store image path, maybe it is ok since similar change might be required in the future, and dcorch is under root ownership so will not have permission problems","commit_id":"d4b9dde7fbbd1fb3e90870bef73adc42b8082596"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"54e1be12f05dffd155a1c9735ad2c23b65145988","unresolved":true,"context_lines":[{"line_number":591,"context_line":"    def _upload_file(self, file_item):"},{"line_number":592,"context_line":"        try:"},{"line_number":593,"context_line":"            staging_dir \u003d proxy_consts.LOAD_FILES_STAGING_DIR"},{"line_number":594,"context_line":"            # Need to change the permission on temporary folder to sysinvi,"},{"line_number":595,"context_line":"            # sysinv might need to remove the temporary folder"},{"line_number":596,"context_line":"            sysinv_user_id \u003d pwd.getpwnam(\u0027sysinv\u0027).pw_uid"},{"line_number":597,"context_line":"            sysinv_group_id \u003d grp.getgrnam(\u0027sysinv\u0027).gr_gid"}],"source_content_type":"text/x-python","patch_set":12,"id":"4f1b97cb_7de1c497","line":594,"range":{"start_line":594,"start_character":67,"end_line":594,"end_character":74},"updated":"2021-09-22 19:41:46.000000000","message":"nit: sysinv\n\nSince this proxy is for sysinv, should be ok. and this is to allow sysinv to process the file created under /scratch","commit_id":"d4b9dde7fbbd1fb3e90870bef73adc42b8082596"},{"author":{"_account_id":32870,"name":"Adriano Oliveira","email":"adriano.oliveira@windriver.com","username":"aoliveir"},"change_message_id":"cea4a5ca071cc719c2c485153ca04a054bca50c5","unresolved":false,"context_lines":[{"line_number":591,"context_line":"    def _upload_file(self, file_item):"},{"line_number":592,"context_line":"        try:"},{"line_number":593,"context_line":"            staging_dir \u003d proxy_consts.LOAD_FILES_STAGING_DIR"},{"line_number":594,"context_line":"            # Need to change the permission on temporary folder to sysinvi,"},{"line_number":595,"context_line":"            # sysinv might need to remove the temporary folder"},{"line_number":596,"context_line":"            sysinv_user_id \u003d pwd.getpwnam(\u0027sysinv\u0027).pw_uid"},{"line_number":597,"context_line":"            sysinv_group_id \u003d grp.getgrnam(\u0027sysinv\u0027).gr_gid"}],"source_content_type":"text/x-python","patch_set":12,"id":"19ae86d9_ff858338","line":594,"range":{"start_line":594,"start_character":67,"end_line":594,"end_character":74},"in_reply_to":"4f1b97cb_7de1c497","updated":"2021-09-22 19:50:10.000000000","message":"Done","commit_id":"d4b9dde7fbbd1fb3e90870bef73adc42b8082596"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"aee41b006e00c656b54d4a808ae05f4b86259ce6","unresolved":true,"context_lines":[{"line_number":618,"context_line":""},{"line_number":619,"context_line":"            if source_file is None:"},{"line_number":620,"context_line":"                LOG.error(\"Failed to upload load file %s, invalid file object\""},{"line_number":621,"context_line":"                          % staging_file)"},{"line_number":622,"context_line":"                return None"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"            with open(staging_file, \u0027wb\u0027) as destination_file:"}],"source_content_type":"text/x-python","patch_set":16,"id":"61e0dafb_50c987f4","line":621,"updated":"2021-09-23 12:16:35.000000000","message":"does staging_file need to be removed here, if it exists, in case it was just fallocate ?","commit_id":"36b441340fb35f2efc005ec75623e554601a03af"},{"author":{"_account_id":32870,"name":"Adriano Oliveira","email":"adriano.oliveira@windriver.com","username":"aoliveir"},"change_message_id":"284426aa3a551126af1cfd77840ac7fb7ad6ded9","unresolved":true,"context_lines":[{"line_number":618,"context_line":""},{"line_number":619,"context_line":"            if source_file is None:"},{"line_number":620,"context_line":"                LOG.error(\"Failed to upload load file %s, invalid file object\""},{"line_number":621,"context_line":"                          % staging_file)"},{"line_number":622,"context_line":"                return None"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"            with open(staging_file, \u0027wb\u0027) as destination_file:"}],"source_content_type":"text/x-python","patch_set":16,"id":"8cfcff94_3e894a44","line":621,"in_reply_to":"61e0dafb_50c987f4","updated":"2021-09-23 13:33:59.000000000","message":"Should not, since if got this mean the file was not in the request, so should not be removed, and also was not opened yet. Also, in this part, the fallocate should not have been called","commit_id":"36b441340fb35f2efc005ec75623e554601a03af"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"778133da5d0c06776f6afdba9f5a0d60ade1b9c9","unresolved":true,"context_lines":[{"line_number":618,"context_line":""},{"line_number":619,"context_line":"            if source_file is None:"},{"line_number":620,"context_line":"                LOG.error(\"Failed to upload load file %s, invalid file object\""},{"line_number":621,"context_line":"                          % staging_file)"},{"line_number":622,"context_line":"                return None"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"            with open(staging_file, \u0027wb\u0027) as destination_file:"}],"source_content_type":"text/x-python","patch_set":16,"id":"f2281e23_ff31775d","line":621,"in_reply_to":"8cfcff94_3e894a44","updated":"2021-09-23 17:21:11.000000000","message":"In such case, would it be better to have this \"if source_file is None:\" check before line 605 (as line 607 dereferences source_file.fileno) ?","commit_id":"36b441340fb35f2efc005ec75623e554601a03af"},{"author":{"_account_id":32870,"name":"Adriano Oliveira","email":"adriano.oliveira@windriver.com","username":"aoliveir"},"change_message_id":"72e136615bb389862fc7d2dc5de8a2230a87c50f","unresolved":true,"context_lines":[{"line_number":618,"context_line":""},{"line_number":619,"context_line":"            if source_file is None:"},{"line_number":620,"context_line":"                LOG.error(\"Failed to upload load file %s, invalid file object\""},{"line_number":621,"context_line":"                          % staging_file)"},{"line_number":622,"context_line":"                return None"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"            with open(staging_file, \u0027wb\u0027) as destination_file:"}],"source_content_type":"text/x-python","patch_set":16,"id":"d8ed62f7_0e47b752","line":621,"in_reply_to":"f2281e23_ff31775d","updated":"2021-09-23 18:34:47.000000000","message":"Yes, that would be better","commit_id":"36b441340fb35f2efc005ec75623e554601a03af"}],"distributedcloud/requirements.txt":[{"author":{"_account_id":15435,"name":"Al Bailey","email":"albailey1974@gmail.com","username":"albailey"},"change_message_id":"efc9f79da4e4c3f769a0e300bc3323d5466c391a","unresolved":true,"context_lines":[{"line_number":50,"context_line":"requests_toolbelt"},{"line_number":51,"context_line":"keyring"},{"line_number":52,"context_line":"kubernetes  # Apache-2.0"},{"line_number":53,"context_line":"psutil"}],"source_content_type":"text/plain","patch_set":17,"id":"99ca6ff9_cb7d888d","line":53,"updated":"2021-09-23 21:00:42.000000000","message":"You will also need to update the spec file and add:\n\nRequires: python-psutil","commit_id":"d3469a1824fb57edb7f8c05860f624e78c079ae4"},{"author":{"_account_id":32870,"name":"Adriano Oliveira","email":"adriano.oliveira@windriver.com","username":"aoliveir"},"change_message_id":"914f84bbd8ee9dfc8f4c2f7954828ad8700503a9","unresolved":true,"context_lines":[{"line_number":50,"context_line":"requests_toolbelt"},{"line_number":51,"context_line":"keyring"},{"line_number":52,"context_line":"kubernetes  # Apache-2.0"},{"line_number":53,"context_line":"psutil"}],"source_content_type":"text/plain","patch_set":17,"id":"45971fe4_1e73e66c","line":53,"in_reply_to":"99ca6ff9_cb7d888d","updated":"2021-09-23 21:04:23.000000000","message":"Good catch Al! Thanks!","commit_id":"d3469a1824fb57edb7f8c05860f624e78c079ae4"}]}
