)]}'
{"tempest/common/utils/linux/remote_client.py":[{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"077412b5f28e42abe4190ac368965c471148693f","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        # don\u0027t support that format. Using python superiority to deal with it."},{"line_number":87,"context_line":"        boot_secs \u003d self.ssh_client.exec_command(cmd)"},{"line_number":88,"context_line":"        try:"},{"line_number":89,"context_line":"            boot_secs \u003d int(boot_secs)"},{"line_number":90,"context_line":"        except ValueError:"},{"line_number":91,"context_line":"            # NOTE(bhuvan): The command return empty string, when it is"},{"line_number":92,"context_line":"            # executed immediately after the VM is up. If that\u0027s the case,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FTOU%3D","line":89,"updated":"2014-01-15 10:13:09.000000000","message":"For me this looks like a workaround for a bug in ssh_client.exec_command()? So far I see you should get the output or an exception must be raised. I think it would be much better to find a general solution for it.","commit_id":"652a40b557f17edcb07b192c87301cc58150672f"},{"author":{"_account_id":2934,"name":"Bhuvan Arumugam","email":"bhuvan@apache.org","username":"bhuvan"},"change_message_id":"89017b06305e38f45579dc93d6d992c4bbbf7e67","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        # don\u0027t support that format. Using python superiority to deal with it."},{"line_number":87,"context_line":"        boot_secs \u003d self.ssh_client.exec_command(cmd)"},{"line_number":88,"context_line":"        try:"},{"line_number":89,"context_line":"            boot_secs \u003d int(boot_secs)"},{"line_number":90,"context_line":"        except ValueError:"},{"line_number":91,"context_line":"            # NOTE(bhuvan): The command return empty string, when it is"},{"line_number":92,"context_line":"            # executed immediately after the VM is up. If that\u0027s the case,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2B3zE%3D","line":89,"in_reply_to":"AAAAUH%2F%2FB98%3D","updated":"2014-01-21 08:39:16.000000000","message":"it happen immediately after the server is up (same second). we retry to get real seconds.","commit_id":"652a40b557f17edcb07b192c87301cc58150672f"},{"author":{"_account_id":4460,"name":"Vincent Untz","email":"vuntz@opensuse.org","username":"vuntz"},"change_message_id":"ef26f331b6e9759dedcb6104d80332df0532d43e","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        # don\u0027t support that format. Using python superiority to deal with it."},{"line_number":87,"context_line":"        boot_secs \u003d self.ssh_client.exec_command(cmd)"},{"line_number":88,"context_line":"        try:"},{"line_number":89,"context_line":"            boot_secs \u003d int(boot_secs)"},{"line_number":90,"context_line":"        except ValueError:"},{"line_number":91,"context_line":"            # NOTE(bhuvan): The command return empty string, when it is"},{"line_number":92,"context_line":"            # executed immediately after the VM is up. If that\u0027s the case,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FB98%3D","line":89,"in_reply_to":"AAAAUH%2F%2FHNk%3D","updated":"2014-01-21 07:55:55.000000000","message":"An empty /proc/uptime? That sounds really weird. Even if it\u0027s possible, I doubt you can ssh in when that\u0027s true.","commit_id":"652a40b557f17edcb07b192c87301cc58150672f"},{"author":{"_account_id":2934,"name":"Bhuvan Arumugam","email":"bhuvan@apache.org","username":"bhuvan"},"change_message_id":"41ee025557cfeaeb3013fe5fe88090d552c93428","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        # don\u0027t support that format. Using python superiority to deal with it."},{"line_number":87,"context_line":"        boot_secs \u003d self.ssh_client.exec_command(cmd)"},{"line_number":88,"context_line":"        try:"},{"line_number":89,"context_line":"            boot_secs \u003d int(boot_secs)"},{"line_number":90,"context_line":"        except ValueError:"},{"line_number":91,"context_line":"            # NOTE(bhuvan): The command return empty string, when it is"},{"line_number":92,"context_line":"            # executed immediately after the VM is up. If that\u0027s the case,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FHNk%3D","line":89,"in_reply_to":"AAAAUH%2F%2FTOU%3D","updated":"2014-01-17 16:15:04.000000000","message":"Marc, it\u0027s not a bug in ssh_client.exec_command(). as per below inline comment /proc/uptime exist but empty when it\u0027s read immediately after it\u0027s up, perhaps at the same second. int() raises ValueError, as boot_secs will be empty.\n\nThe work around is to run the command again.","commit_id":"652a40b557f17edcb07b192c87301cc58150672f"},{"author":{"_account_id":4460,"name":"Vincent Untz","email":"vuntz@opensuse.org","username":"vuntz"},"change_message_id":"ef26f331b6e9759dedcb6104d80332df0532d43e","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            boot_secs \u003d self.ssh_client.exec_command(cmd)"},{"line_number":95,"context_line":"        boot_time \u003d datetime.now() - timedelta(seconds\u003dint(boot_secs))"},{"line_number":96,"context_line":"        boot_time_string \u003d boot_time.strftime(utils.LAST_REBOOT_TIME_FORMAT)"},{"line_number":97,"context_line":"        return time.strptime(boot_time_string, utils.LAST_REBOOT_TIME_FORMAT)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def write_to_console(self, message):"},{"line_number":100,"context_line":"        message \u003d re.sub(\"([$\\\\`])\", \"\\\\\\\\\\\\\\\\\\\\1\", message)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FB94%3D","line":97,"updated":"2014-01-21 07:55:55.000000000","message":"This looks like a double conversion. Why not just return boot_time.timetuple()?","commit_id":"652a40b557f17edcb07b192c87301cc58150672f"},{"author":{"_account_id":2934,"name":"Bhuvan Arumugam","email":"bhuvan@apache.org","username":"bhuvan"},"change_message_id":"89017b06305e38f45579dc93d6d992c4bbbf7e67","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            boot_secs \u003d self.ssh_client.exec_command(cmd)"},{"line_number":95,"context_line":"        boot_time \u003d datetime.now() - timedelta(seconds\u003dint(boot_secs))"},{"line_number":96,"context_line":"        boot_time_string \u003d boot_time.strftime(utils.LAST_REBOOT_TIME_FORMAT)"},{"line_number":97,"context_line":"        return time.strptime(boot_time_string, utils.LAST_REBOOT_TIME_FORMAT)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def write_to_console(self, message):"},{"line_number":100,"context_line":"        message \u003d re.sub(\"([$\\\\`])\", \"\\\\\\\\\\\\\\\\\\\\1\", message)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2B30I%3D","line":97,"in_reply_to":"AAAAUH%2F%2FB94%3D","updated":"2014-01-21 08:39:16.000000000","message":"Done. thank you!","commit_id":"652a40b557f17edcb07b192c87301cc58150672f"},{"author":{"_account_id":4460,"name":"Vincent Untz","email":"vuntz@opensuse.org","username":"vuntz"},"change_message_id":"01793398e69e7d77bdce48e9c9aa6109061b0f91","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            # NOTE(bhuvan): The command return empty string, when it is"},{"line_number":90,"context_line":"            # executed immediately after the VM is up. If that\u0027s the case,"},{"line_number":91,"context_line":"            # re-try."},{"line_number":92,"context_line":"            boot_secs \u003d self.ssh_client.exec_command(cmd)"},{"line_number":93,"context_line":"        boot_time \u003d datetime.now() - timedelta(seconds\u003dint(boot_secs))"},{"line_number":94,"context_line":"        return boot_time.timetuple()"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2B3wg%3D","line":92,"updated":"2014-01-21 08:50:23.000000000","message":"Again, I still don\u0027t understand how this case can be reached. If you can ssh in, then what you get from /proc/uptime is valid.\n\nIf you have a case where this is not true, then please show me the output of /proc/uptime :-)","commit_id":"77fa418917087fd1957dea1a3607ce4ef01106ea"},{"author":{"_account_id":2934,"name":"Bhuvan Arumugam","email":"bhuvan@apache.org","username":"bhuvan"},"change_message_id":"68d45bfe9d00784c0f376299f0b339e406b39a43","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            # NOTE(bhuvan): The command return empty string, when it is"},{"line_number":90,"context_line":"            # executed immediately after the VM is up. If that\u0027s the case,"},{"line_number":91,"context_line":"            # re-try."},{"line_number":92,"context_line":"            boot_secs \u003d self.ssh_client.exec_command(cmd)"},{"line_number":93,"context_line":"        boot_time \u003d datetime.now() - timedelta(seconds\u003dint(boot_secs))"},{"line_number":94,"context_line":"        return boot_time.timetuple()"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2B3PI%3D","line":92,"in_reply_to":"AAAAUH%2F%2B3Sk%3D","updated":"2014-01-21 10:27:41.000000000","message":"i can\u0027t get you the failure from real tempest, as i already explained, it occur 1 in 1000 times, or less.\n\nhere\u0027s the actual problem we solve with try/except here. boot_secs is \u0027\u0027 (empty; not None), when /proc/uptime is empty:\nIn [1]: boot_secs \u003d \u0027\u0027\n\nIn [2]: int(boot_secs)\n---------------------------------------------------------------------------\nValueError                                Traceback (most recent call last)\n\u003cipython-input-2-9c6d568cc11c\u003e in \u003cmodule\u003e()\n----\u003e 1 int(boot_secs)\n\nValueError: invalid literal for int() with base 10: \u0027\u0027","commit_id":"77fa418917087fd1957dea1a3607ce4ef01106ea"},{"author":{"_account_id":4460,"name":"Vincent Untz","email":"vuntz@opensuse.org","username":"vuntz"},"change_message_id":"04cabab1e586fc5b31bc12d43ee696de7e7257b1","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            # NOTE(bhuvan): The command return empty string, when it is"},{"line_number":90,"context_line":"            # executed immediately after the VM is up. If that\u0027s the case,"},{"line_number":91,"context_line":"            # re-try."},{"line_number":92,"context_line":"            boot_secs \u003d self.ssh_client.exec_command(cmd)"},{"line_number":93,"context_line":"        boot_time \u003d datetime.now() - timedelta(seconds\u003dint(boot_secs))"},{"line_number":94,"context_line":"        return boot_time.timetuple()"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2B3Sk%3D","line":92,"in_reply_to":"AAAAUH%2F%2B3aY%3D","updated":"2014-01-21 10:15:47.000000000","message":"My €0.02: I\u0027d prefer to see the failure before getting the try/except in, because it\u0027s definitely not normal to have something like what you describe.","commit_id":"77fa418917087fd1957dea1a3607ce4ef01106ea"},{"author":{"_account_id":2934,"name":"Bhuvan Arumugam","email":"bhuvan@apache.org","username":"bhuvan"},"change_message_id":"9a435b12a9a95aa9459077f2f40daf7e0f0b30b0","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            # NOTE(bhuvan): The command return empty string, when it is"},{"line_number":90,"context_line":"            # executed immediately after the VM is up. If that\u0027s the case,"},{"line_number":91,"context_line":"            # re-try."},{"line_number":92,"context_line":"            boot_secs \u003d self.ssh_client.exec_command(cmd)"},{"line_number":93,"context_line":"        boot_time \u003d datetime.now() - timedelta(seconds\u003dint(boot_secs))"},{"line_number":94,"context_line":"        return boot_time.timetuple()"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2B3aY%3D","line":92,"in_reply_to":"AAAAUH%2F%2B3wg%3D","updated":"2014-01-21 10:00:23.000000000","message":"I am using this patch for over 3months in my environment. /proc/uptime is empty immediately after boot. I can\u0027t prove it, as it don\u0027t occur frequently, as you may understand. Reading the file again, helps.\n\nWithout this patch, tempest fail with ssh enabled and when it can ssh, but can\u0027t read /proc/uptime. this part of patch is to handle that edge case, may be 1 in 1000, or even less! It\u0027s not wise to fail tempest when it can ssh, but can\u0027t read /proc/uptime. In this situation, retrying is wiser!","commit_id":"77fa418917087fd1957dea1a3607ce4ef01106ea"},{"author":{"_account_id":4460,"name":"Vincent Untz","email":"vuntz@opensuse.org","username":"vuntz"},"change_message_id":"01793398e69e7d77bdce48e9c9aa6109061b0f91","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            # executed immediately after the VM is up. If that\u0027s the case,"},{"line_number":91,"context_line":"            # re-try."},{"line_number":92,"context_line":"            boot_secs \u003d self.ssh_client.exec_command(cmd)"},{"line_number":93,"context_line":"        boot_time \u003d datetime.now() - timedelta(seconds\u003dint(boot_secs))"},{"line_number":94,"context_line":"        return boot_time.timetuple()"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def write_to_console(self, message):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2B3wU%3D","line":93,"updated":"2014-01-21 08:50:23.000000000","message":"You don\u0027t need datetime for that. Just do time.time() - int(boot_secs)\n\n(and really, we end up with the same patch as in https://review.openstack.org/#/c/67771/ ;-))","commit_id":"77fa418917087fd1957dea1a3607ce4ef01106ea"},{"author":{"_account_id":2934,"name":"Bhuvan Arumugam","email":"bhuvan@apache.org","username":"bhuvan"},"change_message_id":"68d45bfe9d00784c0f376299f0b339e406b39a43","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            # executed immediately after the VM is up. If that\u0027s the case,"},{"line_number":91,"context_line":"            # re-try."},{"line_number":92,"context_line":"            boot_secs \u003d self.ssh_client.exec_command(cmd)"},{"line_number":93,"context_line":"        boot_time \u003d datetime.now() - timedelta(seconds\u003dint(boot_secs))"},{"line_number":94,"context_line":"        return boot_time.timetuple()"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def write_to_console(self, message):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2B3OU%3D","line":93,"in_reply_to":"AAAAUH%2F%2B3S8%3D","updated":"2014-01-21 10:27:41.000000000","message":"sure i can fix this, no big deal, if you are convinced about try/except :)","commit_id":"77fa418917087fd1957dea1a3607ce4ef01106ea"},{"author":{"_account_id":4460,"name":"Vincent Untz","email":"vuntz@opensuse.org","username":"vuntz"},"change_message_id":"04cabab1e586fc5b31bc12d43ee696de7e7257b1","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            # executed immediately after the VM is up. If that\u0027s the case,"},{"line_number":91,"context_line":"            # re-try."},{"line_number":92,"context_line":"            boot_secs \u003d self.ssh_client.exec_command(cmd)"},{"line_number":93,"context_line":"        boot_time \u003d datetime.now() - timedelta(seconds\u003dint(boot_secs))"},{"line_number":94,"context_line":"        return boot_time.timetuple()"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def write_to_console(self, message):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2B3S8%3D","line":93,"in_reply_to":"AAAAUH%2F%2B3ZQ%3D","updated":"2014-01-21 10:15:47.000000000","message":"Sure, but that means adding two imports in this case. Admittedly not a big deal, but if there\u0027s a simpler solution...","commit_id":"77fa418917087fd1957dea1a3607ce4ef01106ea"},{"author":{"_account_id":2934,"name":"Bhuvan Arumugam","email":"bhuvan@apache.org","username":"bhuvan"},"change_message_id":"9a435b12a9a95aa9459077f2f40daf7e0f0b30b0","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            # executed immediately after the VM is up. If that\u0027s the case,"},{"line_number":91,"context_line":"            # re-try."},{"line_number":92,"context_line":"            boot_secs \u003d self.ssh_client.exec_command(cmd)"},{"line_number":93,"context_line":"        boot_time \u003d datetime.now() - timedelta(seconds\u003dint(boot_secs))"},{"line_number":94,"context_line":"        return boot_time.timetuple()"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def write_to_console(self, message):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2B3ZQ%3D","line":93,"in_reply_to":"AAAAUH%2F%2B3wU%3D","updated":"2014-01-21 10:00:23.000000000","message":"time vs. datetime is individual preference.","commit_id":"77fa418917087fd1957dea1a3607ce4ef01106ea"}]}
