)]}'
{"ironic/drivers/modules/agent_base_vendor.py":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"b8eb6cb437fca509a24320ed90478000177af538","unresolved":false,"context_lines":[{"line_number":532,"context_line":"            # NOTE(vmud213): If the inventory from IPA returns no interfaces,"},{"line_number":533,"context_line":"            # we may just need a warning message here instead of polluting"},{"line_number":534,"context_line":"            # the logs with exception as the subsequent calls might include"},{"line_number":535,"context_line":"            # the interfaces information."},{"line_number":536,"context_line":"            if not interfaces:"},{"line_number":537,"context_line":"                LOG.warning(_LI(\u0027Could not find interfaces \u0027"},{"line_number":538,"context_line":"                                \u0027in the node inventory\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_5aa994de","line":535,"updated":"2016-03-30 14:48:38.000000000","message":"Lookup is only called once, at IPA startup, and not repeated like a heartbeat. Furthermore, IPA won\u0027t be able to heartbeat if we return \u0027node\u0027 as {}.\n\nI think a better way to handle this is to raise NotFound if there are no interfaces, as we won\u0027t be able to look up the node properly.","commit_id":"8402a14d6a2ee775ddc1a71675d97add600db13c"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"b4306dd67574fb8ee6a8d9cf1fa9d2e7e9190afc","unresolved":false,"context_lines":[{"line_number":532,"context_line":"            # NOTE(vmud213): If the inventory from IPA returns no interfaces,"},{"line_number":533,"context_line":"            # we may just need a warning message here instead of polluting"},{"line_number":534,"context_line":"            # the logs with exception as the subsequent calls might include"},{"line_number":535,"context_line":"            # the interfaces information."},{"line_number":536,"context_line":"            if not interfaces:"},{"line_number":537,"context_line":"                LOG.warning(_LI(\u0027Could not find interfaces \u0027"},{"line_number":538,"context_line":"                                \u0027in the node inventory\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_dabac409","line":535,"in_reply_to":"ba0121b8_5aa994de","updated":"2016-03-30 14:49:46.000000000","message":"(and I guess NodeNotFound is already what happens here, so not sure how this patch could improve things - generally IPA should be able to find at least one interface, because how are you PXE booting without any NICs?)","commit_id":"8402a14d6a2ee775ddc1a71675d97add600db13c"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"d8d30c86bdeee0c46ad0633ebab9cc6b4d6f8e6b","unresolved":false,"context_lines":[{"line_number":532,"context_line":"            # NOTE(vmud213): If the inventory from IPA returns no interfaces,"},{"line_number":533,"context_line":"            # we may just need a warning message here instead of polluting"},{"line_number":534,"context_line":"            # the logs with exception as the subsequent calls might include"},{"line_number":535,"context_line":"            # the interfaces information."},{"line_number":536,"context_line":"            if not interfaces:"},{"line_number":537,"context_line":"                LOG.warning(_LI(\u0027Could not find interfaces \u0027"},{"line_number":538,"context_line":"                                \u0027in the node inventory\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_48126f0a","line":535,"in_reply_to":"ba0121b8_dabac409","updated":"2016-03-30 15:05:52.000000000","message":"Well, turns out I\u0027m wrong here. IPA will retry lookup on NodeNotFound, and re-fetch hardware info when it does so. Seems like IPA is coming up before networking in this case (or maybe before sysfs).","commit_id":"8402a14d6a2ee775ddc1a71675d97add600db13c"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"d8d30c86bdeee0c46ad0633ebab9cc6b4d6f8e6b","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                return {"},{"line_number":540,"context_line":"                    \u0027heartbeat_timeout\u0027: CONF.agent.heartbeat_timeout,"},{"line_number":541,"context_line":"                    \u0027node\u0027: {}"},{"line_number":542,"context_line":"                }"},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"            mac_addresses \u003d self._get_mac_addresses(interfaces)"},{"line_number":545,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_48b70ff5","line":542,"updated":"2016-03-30 15:05:52.000000000","message":"However, we still need to return an error of some sort here, or else IPA won\u0027t retry at all, rather just try to heartbeat and fail forever.","commit_id":"8402a14d6a2ee775ddc1a71675d97add600db13c"},{"author":{"_account_id":18781,"name":"vinay muddu","email":"vinay50muddu@yahoo.com","username":"vmud213"},"change_message_id":"3ba156238b00bf3a07e9cfec7e392c8023bffaac","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                return {"},{"line_number":540,"context_line":"                    \u0027heartbeat_timeout\u0027: CONF.agent.heartbeat_timeout,"},{"line_number":541,"context_line":"                    \u0027node\u0027: {}"},{"line_number":542,"context_line":"                }"},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"            mac_addresses \u003d self._get_mac_addresses(interfaces)"},{"line_number":545,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_87745436","line":542,"in_reply_to":"ba0121b8_48b70ff5","updated":"2016-03-31 06:57:23.000000000","message":"May be we can change it to an error message. \nHowever as per my understanding, IPA retries when the function(_do_lookup) returns false. Please refer to: https://github.com/openstack/ironic-python-agent/blob/master/ironic_python_agent/ironic_api_client.py#L126-L143\n\nHere we can see that it returns false since uuid is not in content[\u0027node\u0027]. Let me know your suggestions.","commit_id":"8402a14d6a2ee775ddc1a71675d97add600db13c"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"5fd8c0f0dd65db9e1ee0e71fe5dc3eb73734fea8","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                return {"},{"line_number":540,"context_line":"                    \u0027heartbeat_timeout\u0027: CONF.agent.heartbeat_timeout,"},{"line_number":541,"context_line":"                    \u0027node\u0027: {}"},{"line_number":542,"context_line":"                }"},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"            mac_addresses \u003d self._get_mac_addresses(interfaces)"},{"line_number":545,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_f8b20de4","line":542,"in_reply_to":"ba0121b8_87745436","updated":"2016-03-31 08:22:52.000000000","message":"I agree with Jim, we need throw some exception here. We cannot return success for lookup call without real Node data. The lookup API call should return failure to the agent.","commit_id":"8402a14d6a2ee775ddc1a71675d97add600db13c"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"b4bcedb5b1fb1ae6b5b2e702b5764785b357c060","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                return {"},{"line_number":540,"context_line":"                    \u0027heartbeat_timeout\u0027: CONF.agent.heartbeat_timeout,"},{"line_number":541,"context_line":"                    \u0027node\u0027: {}"},{"line_number":542,"context_line":"                }"},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"            mac_addresses \u003d self._get_mac_addresses(interfaces)"},{"line_number":545,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_1662263e","line":542,"in_reply_to":"ba0121b8_99a83322","updated":"2016-03-31 12:26:30.000000000","message":"Yeah, agree this code will work, I still think a 404 is the right thing to do here though.","commit_id":"8402a14d6a2ee775ddc1a71675d97add600db13c"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"be52f841d7a272556eebbede789dd1ad57c16e49","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                return {"},{"line_number":540,"context_line":"                    \u0027heartbeat_timeout\u0027: CONF.agent.heartbeat_timeout,"},{"line_number":541,"context_line":"                    \u0027node\u0027: {}"},{"line_number":542,"context_line":"                }"},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"            mac_addresses \u003d self._get_mac_addresses(interfaces)"},{"line_number":545,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_99a83322","line":542,"in_reply_to":"ba0121b8_f8b20de4","updated":"2016-03-31 09:46:14.000000000","message":"I am not expert of loopingcall, but from what I see,\nhttp://docs.openstack.org/developer/oslo.service/api/loopingcall.html#oslo_service.loopingcall.BackOffLoopingCall\nthere will be a retry even if only return an empty node.\nAnd agent should retry for a real reason, \u0027Got invalid node data from the API\u0027","commit_id":"8402a14d6a2ee775ddc1a71675d97add600db13c"}],"ironic/tests/unit/drivers/modules/test_agent_base_vendor.py":[{"author":{"_account_id":18781,"name":"vinay muddu","email":"vinay50muddu@yahoo.com","username":"vmud213"},"change_message_id":"3ba156238b00bf3a07e9cfec7e392c8023bffaac","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                                             uuid\u003dport_uuid,"},{"line_number":145,"context_line":"                                             address\u003dmac,"},{"line_number":146,"context_line":"                                             node_id\u003dself.node.id)"},{"line_number":147,"context_line":"        port.address \u003d \u0027ab:cd:ef:fe:dc:ba\u0027"},{"line_number":148,"context_line":"        kwargs \u003d {"},{"line_number":149,"context_line":"            \u0027version\u0027: \u00272\u0027,"},{"line_number":150,"context_line":"            \u0027inventory\u0027: {"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_27a2a899","line":147,"range":{"start_line":147,"start_character":8,"end_line":147,"end_character":41},"updated":"2016-03-31 06:57:23.000000000","message":"Will be removed in next patch.","commit_id":"8402a14d6a2ee775ddc1a71675d97add600db13c"}]}
