)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"3a2f3bb04d6771e14c0987214a66e73e37fb552c","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"94c5159f_a909a0e5","updated":"2022-08-24 20:50:19.000000000","message":"Updating CR pending review comments","commit_id":"777a4e9d1a5da7f0742e73cfddd94b9c0b1e5b72"},{"author":{"_account_id":34895,"name":"Junfeng Li","display_name":"Junfeng (Shawn) Li","email":"junfeng.li@windriver.com","username":"junfeng-li"},"change_message_id":"d21ed1b9bff20e07f5175694161de21d35af58b2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"03aded3d_aa0f3d0a","in_reply_to":"94c5159f_a909a0e5","updated":"2022-08-25 13:41:32.000000000","message":"Ack","commit_id":"777a4e9d1a5da7f0742e73cfddd94b9c0b1e5b72"}],"sysinv/sysinv/sysinv/sysinv/api/controllers/v1/load.py":[{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"ffac03f18ed786270d7737bdc472c6fdd9ba6b32","unresolved":true,"context_lines":[{"line_number":272,"context_line":"                raise wsme.exc.ClientSideError(_(\"Failed to upload load file %s,\\"},{"line_number":273,"context_line":"                                                 invalid file object\" % staging_file))"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"            # This try block is to get only the iso file size as"},{"line_number":276,"context_line":"            # the signature file object type is different in Debian than CentOS"},{"line_number":277,"context_line":"            # and it has fileno() attribute but is not a supported operation on Debian"},{"line_number":278,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fad53035_656f8851","line":275,"range":{"start_line":275,"start_character":35,"end_line":275,"end_character":61},"updated":"2022-08-24 18:33:30.000000000","message":"on exception, the fallocate precheck will also be skipped.  Is there an alternative efficient method to determine the filesize in Debian ?","commit_id":"777a4e9d1a5da7f0742e73cfddd94b9c0b1e5b72"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"576fd8cfdc50fca88373bb78bdc9ce931670904d","unresolved":true,"context_lines":[{"line_number":272,"context_line":"                raise wsme.exc.ClientSideError(_(\"Failed to upload load file %s,\\"},{"line_number":273,"context_line":"                                                 invalid file object\" % staging_file))"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"            # This try block is to get only the iso file size as"},{"line_number":276,"context_line":"            # the signature file object type is different in Debian than CentOS"},{"line_number":277,"context_line":"            # and it has fileno() attribute but is not a supported operation on Debian"},{"line_number":278,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"864a5060_9d3e5f45","line":275,"range":{"start_line":275,"start_character":35,"end_line":275,"end_character":61},"in_reply_to":"469d3c43_fa74dd0b","updated":"2022-08-24 19:38:00.000000000","message":"On Debian though, would this st_size check and fallocate now always be skipped ? (what is \"not a supported operation on Debian\"?)","commit_id":"777a4e9d1a5da7f0742e73cfddd94b9c0b1e5b72"},{"author":{"_account_id":34895,"name":"Junfeng Li","display_name":"Junfeng (Shawn) Li","email":"junfeng.li@windriver.com","username":"junfeng-li"},"change_message_id":"4b48225d03a4cf6d772f7043476fbe79ef494547","unresolved":false,"context_lines":[{"line_number":272,"context_line":"                raise wsme.exc.ClientSideError(_(\"Failed to upload load file %s,\\"},{"line_number":273,"context_line":"                                                 invalid file object\" % staging_file))"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"            # This try block is to get only the iso file size as"},{"line_number":276,"context_line":"            # the signature file object type is different in Debian than CentOS"},{"line_number":277,"context_line":"            # and it has fileno() attribute but is not a supported operation on Debian"},{"line_number":278,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"594f3c6a_2c266053","line":275,"range":{"start_line":275,"start_character":35,"end_line":275,"end_character":61},"in_reply_to":"864a5060_9d3e5f45","updated":"2022-08-25 03:11:25.000000000","message":"This change is not OS dependent. The size check and fallocate skip are only applied to the signature file on both CentOS and Debian.\n\nOn Centos, the signature file object type is cStringio.StringO. This object type does not have fileno() attribute so the size check and fallocate are skipped.\n\nOn Debian, the signature file object type is _io.BytesIO. This object type has fileno() attribute as it inherits from IOBase object. But this object is not backed by an actual file so it doesn\u0027t have the file descriptor and the exception is UnsupportedOperation. This is why I said \"not a supported operation on Debian\".\n\nOn the other hand, the iso file size is checked on both Centos and Debian.","commit_id":"777a4e9d1a5da7f0742e73cfddd94b9c0b1e5b72"},{"author":{"_account_id":34895,"name":"Junfeng Li","display_name":"Junfeng (Shawn) Li","email":"junfeng.li@windriver.com","username":"junfeng-li"},"change_message_id":"98e0f74d76a358a39246b8965854033c26052b07","unresolved":false,"context_lines":[{"line_number":272,"context_line":"                raise wsme.exc.ClientSideError(_(\"Failed to upload load file %s,\\"},{"line_number":273,"context_line":"                                                 invalid file object\" % staging_file))"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"            # This try block is to get only the iso file size as"},{"line_number":276,"context_line":"            # the signature file object type is different in Debian than CentOS"},{"line_number":277,"context_line":"            # and it has fileno() attribute but is not a supported operation on Debian"},{"line_number":278,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"469d3c43_fa74dd0b","line":275,"range":{"start_line":275,"start_character":35,"end_line":275,"end_character":61},"in_reply_to":"fad53035_656f8851","updated":"2022-08-24 19:31:25.000000000","message":"The behaviour of this if code block is consistent, and it is to make sure only the iso file size is checked and allocated(fallocate) accordingly. \nIf the file_size is set to -1, it means it is the signature file that only has less than 1 kb, and the file size check is not required. \nTherefore, skipping the fallocate precheck for the signature file is intended.","commit_id":"777a4e9d1a5da7f0742e73cfddd94b9c0b1e5b72"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"3a2f3bb04d6771e14c0987214a66e73e37fb552c","unresolved":true,"context_lines":[{"line_number":281,"context_line":"                file_size \u003d -1"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"            if file_size \u003e\u003d 0:"},{"line_number":284,"context_line":"                # Only proceed if there is space available for copying"},{"line_number":285,"context_line":"                avail_space \u003d psutil.disk_usage(\u0027/scratch\u0027).free"},{"line_number":286,"context_line":"                if (avail_space \u003c file_size):"},{"line_number":287,"context_line":"                    raise wsme.exc.ClientSideError(_(\"Failed to upload load file %s, not enough space on /scratch\""}],"source_content_type":"text/x-python","patch_set":2,"id":"40762125_f7dc46f8","line":284,"updated":"2022-08-24 20:50:19.000000000","message":"This will also be blocked to proceed with the following checks on Debian?","commit_id":"777a4e9d1a5da7f0742e73cfddd94b9c0b1e5b72"},{"author":{"_account_id":34895,"name":"Junfeng Li","display_name":"Junfeng (Shawn) Li","email":"junfeng.li@windriver.com","username":"junfeng-li"},"change_message_id":"d2f07be54422282e2a7c72ee93b8e8744b7f7a7a","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                file_size \u003d -1"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"            if file_size \u003e\u003d 0:"},{"line_number":284,"context_line":"                # Only proceed if there is space available for copying"},{"line_number":285,"context_line":"                avail_space \u003d psutil.disk_usage(\u0027/scratch\u0027).free"},{"line_number":286,"context_line":"                if (avail_space \u003c file_size):"},{"line_number":287,"context_line":"                    raise wsme.exc.ClientSideError(_(\"Failed to upload load file %s, not enough space on /scratch\""}],"source_content_type":"text/x-python","patch_set":2,"id":"efeb94d7_7e52264b","line":284,"in_reply_to":"2551ef50_f7183f71","updated":"2022-08-25 13:41:10.000000000","message":"Done","commit_id":"777a4e9d1a5da7f0742e73cfddd94b9c0b1e5b72"},{"author":{"_account_id":34895,"name":"Junfeng Li","display_name":"Junfeng (Shawn) Li","email":"junfeng.li@windriver.com","username":"junfeng-li"},"change_message_id":"4b48225d03a4cf6d772f7043476fbe79ef494547","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                file_size \u003d -1"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"            if file_size \u003e\u003d 0:"},{"line_number":284,"context_line":"                # Only proceed if there is space available for copying"},{"line_number":285,"context_line":"                avail_space \u003d psutil.disk_usage(\u0027/scratch\u0027).free"},{"line_number":286,"context_line":"                if (avail_space \u003c file_size):"},{"line_number":287,"context_line":"                    raise wsme.exc.ClientSideError(_(\"Failed to upload load file %s, not enough space on /scratch\""}],"source_content_type":"text/x-python","patch_set":2,"id":"75a16517_7f5ae97f","line":284,"in_reply_to":"40762125_f7dc46f8","updated":"2022-08-25 03:11:25.000000000","message":"This is blocked only if it is the signature file. See the explanation above.","commit_id":"777a4e9d1a5da7f0742e73cfddd94b9c0b1e5b72"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"f19bcc187012bbccd5a6846731b14b0b416028f5","unresolved":true,"context_lines":[{"line_number":281,"context_line":"                file_size \u003d -1"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"            if file_size \u003e\u003d 0:"},{"line_number":284,"context_line":"                # Only proceed if there is space available for copying"},{"line_number":285,"context_line":"                avail_space \u003d psutil.disk_usage(\u0027/scratch\u0027).free"},{"line_number":286,"context_line":"                if (avail_space \u003c file_size):"},{"line_number":287,"context_line":"                    raise wsme.exc.ClientSideError(_(\"Failed to upload load file %s, not enough space on /scratch\""}],"source_content_type":"text/x-python","patch_set":2,"id":"2551ef50_f7183f71","line":284,"in_reply_to":"75a16517_7f5ae97f","updated":"2022-08-25 12:37:21.000000000","message":"thanks Shawn for the clarification; I see this is determining to perform further checks and reservations (i.e with fallocate) whether it\u0027s a signature file or not.\n\nIt would be more clear to preface the comment,  such as:\nThe check for st_size is required to determine the source_file size in the case of iso image; it is not applicable in the case source_file is a signature at line 275.","commit_id":"777a4e9d1a5da7f0742e73cfddd94b9c0b1e5b72"}]}
