)]}'
{"ironic/drivers/modules/iboot.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"7135d0991606fc8a4e0bea755d7d3c4d93de4b2c","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    try:"},{"line_number":102,"context_line":"        status \u003d conn.get_relays()[relay_id - 1]"},{"line_number":103,"context_line":"    except (TypeError, IndexError):"},{"line_number":104,"context_line":"        return states.ERROR"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    if status:"},{"line_number":107,"context_line":"        return states.POWER_ON"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_22a27eae","line":104,"updated":"2014-08-19 15:30:36.000000000","message":"Ruby, there is two cases:\n1) status is False, your TypeError (socket.error for example https://github.com/darkip/python-iboot/blob/master/iboot/iboot.py#L277). I think IloOperationError should be raised with LOG.warning.\n2) IndexError -\u003e yes, better to return states.ERROR. (relay_id misconfigured?)","commit_id":"7fea52b4d107efcd4ee1570870f6b6c1a7307c10"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"baf1ac8e5a1e7b484a975cea232c75d928608624","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    try:"},{"line_number":102,"context_line":"        status \u003d conn.get_relays()[relay_id - 1]"},{"line_number":103,"context_line":"    except (TypeError, IndexError):"},{"line_number":104,"context_line":"        return states.ERROR"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    if status:"},{"line_number":107,"context_line":"        return states.POWER_ON"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_1f686ff4","line":104,"in_reply_to":"1abeadc6_0c4cd46f","updated":"2014-08-19 19:22:09.000000000","message":"Thx for noticing and opening a bug about checking the ERROR state.","commit_id":"7fea52b4d107efcd4ee1570870f6b6c1a7307c10"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"fc0ab9a4d7c150335a84afb6e3df376217ae47c3","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    try:"},{"line_number":102,"context_line":"        status \u003d conn.get_relays()[relay_id - 1]"},{"line_number":103,"context_line":"    except (TypeError, IndexError):"},{"line_number":104,"context_line":"        return states.ERROR"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    if status:"},{"line_number":107,"context_line":"        return states.POWER_ON"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_0c4cd46f","line":104,"in_reply_to":"1abeadc6_22a27eae","updated":"2014-08-19 16:12:13.000000000","message":"And I see we don\u0027t check states.ERROR at all https://bugs.launchpad.net/ironic/+bug/1358816","commit_id":"7fea52b4d107efcd4ee1570870f6b6c1a7307c10"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"baf1ac8e5a1e7b484a975cea232c75d928608624","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    try:"},{"line_number":102,"context_line":"        status \u003d conn.get_relays()[relay_id - 1]"},{"line_number":103,"context_line":"    except (TypeError, IndexError):"},{"line_number":104,"context_line":"        return states.ERROR"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    if status:"},{"line_number":107,"context_line":"        return states.POWER_ON"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_25319ea2","line":104,"in_reply_to":"1abeadc6_22a27eae","updated":"2014-08-19 19:22:09.000000000","message":"wrt 1), status could also be None from GetRelaysRequest._get_response()\n\nThis is iboot, not iLo. Do you think I should create an IBootOperationError (or IBootFailure) exception for this? Or I could use PowerStateFailure?\n\nI didn\u0027t LOG anything because I noticed that there was no logging in this file. Figured someone would add logging to this in some future patch, so I didn\u0027t bother. But I will add ;)","commit_id":"7fea52b4d107efcd4ee1570870f6b6c1a7307c10"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"658dcf17b8d102fffb4899a124cc96a347dee80f","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    try:"},{"line_number":102,"context_line":"        status \u003d conn.get_relays()[relay_id - 1]"},{"line_number":103,"context_line":"    except (TypeError, IndexError):"},{"line_number":104,"context_line":"        return states.ERROR"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    if status:"},{"line_number":107,"context_line":"        return states.POWER_ON"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_608532ac","line":104,"in_reply_to":"1abeadc6_25319ea2","updated":"2014-08-20 07:43:18.000000000","message":"Yes, I think something like IBootOperationError should be created.","commit_id":"7fea52b4d107efcd4ee1570870f6b6c1a7307c10"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"75a7030b37488666821608d9c051a51055311099","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    try:"},{"line_number":102,"context_line":"        status \u003d conn.get_relays()[relay_id - 1]"},{"line_number":103,"context_line":"    except (TypeError, IndexError):"},{"line_number":104,"context_line":"        return states.ERROR"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    if status:"},{"line_number":107,"context_line":"        return states.POWER_ON"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_3dc98f59","line":104,"in_reply_to":"1abeadc6_608532ac","updated":"2014-08-20 15:32:40.000000000","message":"Thx. Done.","commit_id":"7fea52b4d107efcd4ee1570870f6b6c1a7307c10"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"c5a350e32d49e0b0165a0ef919cc123e7ee9ff6c","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        msg \u003d (_(\"Cannot get power status for node \u0027%(node)s\u0027. iBoot \""},{"line_number":110,"context_line":"                 \"get_relays() returned \u0027%(resp)s\u0027.\")"},{"line_number":111,"context_line":"                 % {\u0027node\u0027: driver_info[\u0027uuid\u0027], \u0027resp\u0027: response})"},{"line_number":112,"context_line":"        LOG.warning(msg)"},{"line_number":113,"context_line":"        raise exception.IBootOperationError(message\u003dmsg)"},{"line_number":114,"context_line":"    except IndexError:"},{"line_number":115,"context_line":"        LOG.warning(_LW(\"Cannot get power status for node \u0027%(node)s\u0027 at relay \""}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_0c9d8659","line":112,"updated":"2014-08-20 16:14:48.000000000","message":"should this me log.error?","commit_id":"52cfde5dbefdbe619784c3302ea21a198a48be8e"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"f2197f291d4473303c24ce928ba834e776a6604a","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        msg \u003d (_(\"Cannot get power status for node \u0027%(node)s\u0027. iBoot \""},{"line_number":110,"context_line":"                 \"get_relays() returned \u0027%(resp)s\u0027.\")"},{"line_number":111,"context_line":"                 % {\u0027node\u0027: driver_info[\u0027uuid\u0027], \u0027resp\u0027: response})"},{"line_number":112,"context_line":"        LOG.warning(msg)"},{"line_number":113,"context_line":"        raise exception.IBootOperationError(message\u003dmsg)"},{"line_number":114,"context_line":"    except IndexError:"},{"line_number":115,"context_line":"        LOG.warning(_LW(\"Cannot get power status for node \u0027%(node)s\u0027 at relay \""}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_2fe954e6","line":112,"in_reply_to":"1abeadc6_0c9d8659","updated":"2014-08-20 16:35:58.000000000","message":"+1","commit_id":"52cfde5dbefdbe619784c3302ea21a198a48be8e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ddf1479e07e5be1892f969e7fedfb5f4f5235a62","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        msg \u003d (_(\"Cannot get power status for node \u0027%(node)s\u0027. iBoot \""},{"line_number":110,"context_line":"                 \"get_relays() returned \u0027%(resp)s\u0027.\")"},{"line_number":111,"context_line":"                 % {\u0027node\u0027: driver_info[\u0027uuid\u0027], \u0027resp\u0027: response})"},{"line_number":112,"context_line":"        LOG.warning(msg)"},{"line_number":113,"context_line":"        raise exception.IBootOperationError(message\u003dmsg)"},{"line_number":114,"context_line":"    except IndexError:"},{"line_number":115,"context_line":"        LOG.warning(_LW(\"Cannot get power status for node \u0027%(node)s\u0027 at relay \""}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_2f979449","line":112,"in_reply_to":"1abeadc6_0c9d8659","updated":"2014-08-20 16:48:50.000000000","message":"Yuriy suggested warning. I took a look at the existing code. ipmi* uses warning, seamicro/ssh/ilo uses error. I\u0027ll use error since there are 2 votes for it :-)","commit_id":"52cfde5dbefdbe619784c3302ea21a198a48be8e"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"f2197f291d4473303c24ce928ba834e776a6604a","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        LOG.warning(msg)"},{"line_number":113,"context_line":"        raise exception.IBootOperationError(message\u003dmsg)"},{"line_number":114,"context_line":"    except IndexError:"},{"line_number":115,"context_line":"        LOG.warning(_LW(\"Cannot get power status for node \u0027%(node)s\u0027 at relay \""},{"line_number":116,"context_line":"                        \"\u0027%(relay)s\u0027. iBoot get_relays() returned \""},{"line_number":117,"context_line":"                        \"\u0027%(resp)s\u0027.\"),"},{"line_number":118,"context_line":"                        {\u0027node\u0027: driver_info[\u0027uuid\u0027], \u0027relay\u0027: relay_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_6fefcce9","line":115,"updated":"2014-08-20 16:35:58.000000000","message":"here too?","commit_id":"52cfde5dbefdbe619784c3302ea21a198a48be8e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ddf1479e07e5be1892f969e7fedfb5f4f5235a62","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        LOG.warning(msg)"},{"line_number":113,"context_line":"        raise exception.IBootOperationError(message\u003dmsg)"},{"line_number":114,"context_line":"    except IndexError:"},{"line_number":115,"context_line":"        LOG.warning(_LW(\"Cannot get power status for node \u0027%(node)s\u0027 at relay \""},{"line_number":116,"context_line":"                        \"\u0027%(relay)s\u0027. iBoot get_relays() returned \""},{"line_number":117,"context_line":"                        \"\u0027%(resp)s\u0027.\"),"},{"line_number":118,"context_line":"                        {\u0027node\u0027: driver_info[\u0027uuid\u0027], \u0027relay\u0027: relay_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_2f607400","line":115,"in_reply_to":"1abeadc6_6fefcce9","updated":"2014-08-20 16:48:50.000000000","message":"Discussed with Lucas and Chris and decided it was fine as a warning.","commit_id":"52cfde5dbefdbe619784c3302ea21a198a48be8e"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"ab025a3fcf336456170d2ce323e532ff9c8cb0c3","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    except TypeError:"},{"line_number":109,"context_line":"        msg \u003d (_(\"Cannot get power status for node \u0027%(node)s\u0027. iBoot \""},{"line_number":110,"context_line":"                 \"get_relays() returned \u0027%(resp)s\u0027.\")"},{"line_number":111,"context_line":"                 % {\u0027node\u0027: driver_info[\u0027uuid\u0027], \u0027resp\u0027: response})"},{"line_number":112,"context_line":"        LOG.error(msg)"},{"line_number":113,"context_line":"        raise exception.IBootOperationError(message\u003dmsg)"},{"line_number":114,"context_line":"    except IndexError:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_e5b4dd83","line":111,"updated":"2014-08-20 17:47:12.000000000","message":"get_relays() returns False or None on error, this is not very informative response.","commit_id":"7c765279a4eb577d03dfa4e640d008331f67626a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c0ac98dff3ddc0e7428049bf58cdd691983846f3","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    except TypeError:"},{"line_number":109,"context_line":"        msg \u003d (_(\"Cannot get power status for node \u0027%(node)s\u0027. iBoot \""},{"line_number":110,"context_line":"                 \"get_relays() returned \u0027%(resp)s\u0027.\")"},{"line_number":111,"context_line":"                 % {\u0027node\u0027: driver_info[\u0027uuid\u0027], \u0027resp\u0027: response})"},{"line_number":112,"context_line":"        LOG.error(msg)"},{"line_number":113,"context_line":"        raise exception.IBootOperationError(message\u003dmsg)"},{"line_number":114,"context_line":"    except IndexError:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_fbb47a83","line":111,"in_reply_to":"1abeadc6_e5b4dd83","updated":"2014-08-20 18:32:49.000000000","message":"Yeah, I know. But I don\u0027t know enough about iBoot to be able to put a more meaningful string and I don\u0027t really want to learn the iBoot library code. Let me know if you have suggestions. (Whoever uses iBoot better know how it works.)\n\nMy goal here is to make sure we don\u0027t raise non-IronicExceptions ;)","commit_id":"7c765279a4eb577d03dfa4e640d008331f67626a"}]}
