)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"4de3a1483415351181300814cfc05b7e22e18a8d","unresolved":false,"context_lines":[{"line_number":15,"context_line":"enables the endpoint communication to be better secured."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Depends-On: https://review.opendev.org/#/c/697844/"},{"line_number":18,"context_line":"Depends-On: https://review.opendev.org/#/c/698012/"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I0118007cac3d6548e9d41c5e615a819150b6ef1a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3fa7e38b_55ee21b5","line":18,"updated":"2019-12-11 17:32:49.000000000","message":"This has been abandoned","commit_id":"d57a2d226df66b3d33988979510ba0dba23e33d5"}],"ironic/api/controllers/v1/node.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"4de3a1483415351181300814cfc05b7e22e18a8d","unresolved":false,"context_lines":[{"line_number":1240,"context_line":"                self.instance_info[\u0027image_url\u0027] \u003d \"******\""},{"line_number":1241,"context_line":""},{"line_number":1242,"context_line":"        if self.driver_internal_info.get(\u0027agent_secret_token\u0027):"},{"line_number":1243,"context_line":"            self.driver_internal_info[\u0027agent_secret_token\u0027] \u003d \"******\""},{"line_number":1244,"context_line":""},{"line_number":1245,"context_line":"        update_state_in_older_versions(self)"},{"line_number":1246,"context_line":"        hide_fields_in_newer_versions(self)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_953d792d","line":1243,"range":{"start_line":1243,"start_character":12,"end_line":1243,"end_character":70},"updated":"2019-12-11 17:32:49.000000000","message":"nit: completely remove it with\n\n self.driver_internal_info.pop(\u0027agent_secret_token\u0027, None)","commit_id":"d57a2d226df66b3d33988979510ba0dba23e33d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a57e5969725a937e7c67bdd7644405404e6bf536","unresolved":false,"context_lines":[{"line_number":1240,"context_line":"                self.instance_info[\u0027image_url\u0027] \u003d \"******\""},{"line_number":1241,"context_line":""},{"line_number":1242,"context_line":"        if self.driver_internal_info.get(\u0027agent_secret_token\u0027):"},{"line_number":1243,"context_line":"            self.driver_internal_info[\u0027agent_secret_token\u0027] \u003d \"******\""},{"line_number":1244,"context_line":""},{"line_number":1245,"context_line":"        update_state_in_older_versions(self)"},{"line_number":1246,"context_line":"        hide_fields_in_newer_versions(self)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_a463a5dc","line":1243,"range":{"start_line":1243,"start_character":12,"end_line":1243,"end_character":70},"in_reply_to":"3fa7e38b_953d792d","updated":"2019-12-11 22:37:41.000000000","message":"Yeah, that would likely be better.","commit_id":"d57a2d226df66b3d33988979510ba0dba23e33d5"}],"ironic/api/controllers/v1/ramdisk.py":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"203ce336980b1aaf8503a85357f4727c24d42e66","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                   config\u003d{\u0027heartbeat_timeout\u0027: 600})"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    @classmethod"},{"line_number":76,"context_line":"    def convert_with_links(cls, node):"},{"line_number":77,"context_line":"        node \u003d node_ctl.Node.convert_with_links(node, _LOOKUP_RETURN_FIELDS)"},{"line_number":78,"context_line":"        return cls(node\u003dnode, config\u003dconfig(node))"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa7e38b_17fbdb7a","line":76,"updated":"2019-12-11 03:43:23.000000000","message":"Likely need to grab any secret token to be preserved and sent back, because the node convert with links sanitizes it and we loose ability to just return it.  Bigger question, why did unit testing not find this?!?","commit_id":"454cdfcf7800250a8bd8726666fcccca171baadd"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"4de3a1483415351181300814cfc05b7e22e18a8d","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            raise exception.InvalidParameterValue("},{"line_number":189,"context_line":"                _(\u0027Field \"agent_version\" not recognised\u0027))"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        if CONF.api.require_agent_token and agent_token is None:"},{"line_number":192,"context_line":"            raise exception.InvalidParameterValue("},{"line_number":193,"context_line":"                _(\u0027Field \"agent_token\" is required.\u0027))"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_b52195fe","line":191,"updated":"2019-12-11 17:32:49.000000000","message":"Should we version this? I guess we should..","commit_id":"d57a2d226df66b3d33988979510ba0dba23e33d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a57e5969725a937e7c67bdd7644405404e6bf536","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            raise exception.InvalidParameterValue("},{"line_number":189,"context_line":"                _(\u0027Field \"agent_version\" not recognised\u0027))"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        if CONF.api.require_agent_token and agent_token is None:"},{"line_number":192,"context_line":"            raise exception.InvalidParameterValue("},{"line_number":193,"context_line":"                _(\u0027Field \"agent_token\" is required.\u0027))"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_c40901dc","line":191,"in_reply_to":"3fa7e38b_b52195fe","updated":"2019-12-11 22:37:41.000000000","message":"Short story, this is now redundant since it is checked in the conductor now. That also means the config parameters can be combined without any headaches.\n\nLonger: As a security control, it really wouldn\u0027t be versionable because being able to specify the older version would be a bypass mechanism to effect an attack. In a sense, trust the client knows better, or that the conductor the service knows better.","commit_id":"d57a2d226df66b3d33988979510ba0dba23e33d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e070fa400f922c80e7b0f6a758da504c5726e242","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                         \u0027driver_internal_info\u0027)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"def config(node, token):"},{"line_number":43,"context_line":"    return {"},{"line_number":44,"context_line":"        \u0027metrics\u0027: {"},{"line_number":45,"context_line":"            \u0027backend\u0027: CONF.metrics.agent_backend,"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_cdcacc6d","line":42,"updated":"2020-02-10 11:51:43.000000000","message":"nit: no need for node here?","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a1aa7d38de093515165922169fc0ca462b18d604","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                         \u0027driver_internal_info\u0027)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"def config(node, token):"},{"line_number":43,"context_line":"    return {"},{"line_number":44,"context_line":"        \u0027metrics\u0027: {"},{"line_number":45,"context_line":"            \u0027backend\u0027: CONF.metrics.agent_backend,"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_ac4c2775","line":42,"in_reply_to":"3fa7e38b_cdcacc6d","updated":"2020-02-10 21:20:47.000000000","message":"Ohh, good catch!","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e070fa400f922c80e7b0f6a758da504c5726e242","unresolved":false,"context_lines":[{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        api.request.rpcapi.heartbeat("},{"line_number":222,"context_line":"            api.request.context, rpc_node.uuid, callback_url,"},{"line_number":223,"context_line":"            agent_version, agent_token, topic\u003dtopic)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_4d9c9c6f","line":223,"range":{"start_line":223,"start_character":27,"end_line":223,"end_character":39},"updated":"2020-02-10 11:51:43.000000000","message":"Cannot we validate it right here without delay? May help to reduce a potential DoS surface to only the API service.","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"c304d35e991a9b778057865932baf51d140f9ad6","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        token_required \u003d CONF.require_agent_token"},{"line_number":217,"context_line":"        if token_required:"},{"line_number":218,"context_line":"            if agent_token is None:"},{"line_number":219,"context_line":"                LOG.error(\u0027Agent heartbeat receieved for node %(node)s \u0027"},{"line_number":220,"context_line":"                          \u0027without an agent token.\u0027, {\u0027node\u0027: node_ident})"},{"line_number":221,"context_line":"                raise exception.InvalidParameterValue("},{"line_number":222,"context_line":"                    _(\u0027Agent token is required for heartbeat processing.\u0027))"}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_8e2d9846","line":219,"range":{"start_line":219,"start_character":43,"end_line":219,"end_character":52},"updated":"2020-02-11 09:52:46.000000000","message":"nit: received","commit_id":"08c2e58698547d3a5eb79728e3727eaa10204096"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dcd6abcdcfcb38a816df512292480c2b68c467a5","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        # heartbeat very early on."},{"line_number":216,"context_line":"        token_required \u003d CONF.require_agent_token"},{"line_number":217,"context_line":"        if token_required:"},{"line_number":218,"context_line":"            if agent_token is None:"},{"line_number":219,"context_line":"                LOG.error(\u0027Agent heartbeat received for node %(node)s \u0027"},{"line_number":220,"context_line":"                          \u0027without an agent token.\u0027, {\u0027node\u0027: node_ident})"},{"line_number":221,"context_line":"                raise exception.InvalidParameterValue("}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_bd44de4f","line":218,"updated":"2020-02-18 12:27:26.000000000","message":"nit: merge the conditions","commit_id":"2114c08ffff0d538ad2628fc1d017e0390c1c73b"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"79e983e68036ce8a1a7689c6c7e228df558f37c3","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        # heartbeat very early on."},{"line_number":216,"context_line":"        token_required \u003d CONF.require_agent_token"},{"line_number":217,"context_line":"        if token_required:"},{"line_number":218,"context_line":"            if agent_token is None:"},{"line_number":219,"context_line":"                LOG.error(\u0027Agent heartbeat received for node %(node)s \u0027"},{"line_number":220,"context_line":"                          \u0027without an agent token.\u0027, {\u0027node\u0027: node_ident})"},{"line_number":221,"context_line":"                raise exception.InvalidParameterValue("}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_d13dfa8d","line":218,"in_reply_to":"3fa7e38b_bd44de4f","updated":"2020-02-20 19:19:11.000000000","message":"Done","commit_id":"2114c08ffff0d538ad2628fc1d017e0390c1c73b"}],"ironic/api/controllers/v1/utils.py":[{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"20a2361582085b2f126f89837d22bed4e40dee2a","unresolved":false,"context_lines":[{"line_number":1319,"context_line":""},{"line_number":1320,"context_line":""},{"line_number":1321,"context_line":"def allow_agent_token():"},{"line_number":1322,"context_line":"    \"\"\"Check if agent token is available.\"\"\""},{"line_number":1323,"context_line":"    return api.request.version.minor \u003e\u003d versions.MINOR_62_AGENT_TOKEN"}],"source_content_type":"text/x-python","patch_set":31,"id":"3fa7e38b_e7c84a4f","line":1322,"range":{"start_line":1322,"start_character":31,"end_line":1322,"end_character":40},"updated":"2020-02-21 09:25:07.000000000","message":"nit: s/ available / allowed /","commit_id":"bb3b2349f9c044a6b51e7b425c2290c887bb4cb2"}],"ironic/api/controllers/v1/versions.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e070fa400f922c80e7b0f6a758da504c5726e242","unresolved":false,"context_lines":[{"line_number":98,"context_line":"# v1.58: Add support for backfilling allocations."},{"line_number":99,"context_line":"# v1.59: Add support vendor data in configdrives."},{"line_number":100,"context_line":"# v1.60: Add owner to the allocation object."},{"line_number":101,"context_line":"# v1.61: Add retired and retired_reason to node object."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"MINOR_0_JUNO \u003d 0"},{"line_number":104,"context_line":"MINOR_1_INITIAL_VERSION \u003d 1"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_6da158a8","line":101,"updated":"2020-02-10 11:51:43.000000000","message":"This has been added separately, but you need to add your change.","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a1aa7d38de093515165922169fc0ca462b18d604","unresolved":false,"context_lines":[{"line_number":98,"context_line":"# v1.58: Add support for backfilling allocations."},{"line_number":99,"context_line":"# v1.59: Add support vendor data in configdrives."},{"line_number":100,"context_line":"# v1.60: Add owner to the allocation object."},{"line_number":101,"context_line":"# v1.61: Add retired and retired_reason to node object."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"MINOR_0_JUNO \u003d 0"},{"line_number":104,"context_line":"MINOR_1_INITIAL_VERSION \u003d 1"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_410a1c29","line":101,"in_reply_to":"3fa7e38b_6da158a8","updated":"2020-02-10 21:20:47.000000000","message":"yup, this was the conflict \\o/ and I lost my entry at some point. \\o/ :(","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"}],"ironic/common/utils.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"4de3a1483415351181300814cfc05b7e22e18a8d","unresolved":false,"context_lines":[{"line_number":428,"context_line":"                    for key, value in cap_dict.items())"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"def is_regex_string_in_file(path, value):"},{"line_number":432,"context_line":"    with open(path, \u0027r\u0027) as inf:"},{"line_number":433,"context_line":"        return any(re.search(value, line) for line in inf.readlines())"},{"line_number":434,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_f5806dc0","line":431,"updated":"2019-12-11 17:32:49.000000000","message":"a good but seemingly unrelated change","commit_id":"d57a2d226df66b3d33988979510ba0dba23e33d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"2b4b105bd33b399b49ed57d0562ca45cb4b5591e","unresolved":false,"context_lines":[{"line_number":428,"context_line":"                    for key, value in cap_dict.items())"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"def is_regex_string_in_file(path, value):"},{"line_number":432,"context_line":"    with open(path, \u0027r\u0027) as inf:"},{"line_number":433,"context_line":"        return any(re.search(value, line) for line in inf.readlines())"},{"line_number":434,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_d270ce0b","line":431,"in_reply_to":"3fa7e38b_049ab9c3","updated":"2019-12-19 15:57:30.000000000","message":"Done","commit_id":"d57a2d226df66b3d33988979510ba0dba23e33d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a57e5969725a937e7c67bdd7644405404e6bf536","unresolved":false,"context_lines":[{"line_number":428,"context_line":"                    for key, value in cap_dict.items())"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"def is_regex_string_in_file(path, value):"},{"line_number":432,"context_line":"    with open(path, \u0027r\u0027) as inf:"},{"line_number":433,"context_line":"        return any(re.search(value, line) for line in inf.readlines())"},{"line_number":434,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_049ab9c3","line":431,"in_reply_to":"3fa7e38b_f5806dc0","updated":"2019-12-11 22:37:41.000000000","message":"oh, because I imported string... either here or elsewhere and... well... yeah. I since moved the code from this file. I can swap this back or whatever.","commit_id":"d57a2d226df66b3d33988979510ba0dba23e33d5"}],"ironic/conductor/manager.py":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"2b4b105bd33b399b49ed57d0562ca45cb4b5591e","unresolved":false,"context_lines":[{"line_number":3332,"context_line":"                        LOG.error(\u0027Invalid agent_token receieved for node \u0027"},{"line_number":3333,"context_line":"                                  \u0027%(node)s\u0027, {\u0027node\u0027: node_id})"},{"line_number":3334,"context_line":"                        raise exception.InvalidParameterValue("},{"line_number":3335,"context_line":"                            \u0027Invalid or missing agent token receieved.\u0027)"},{"line_number":3336,"context_line":"            elif utils.is_agent_token_supported(agent_version):"},{"line_number":3337,"context_line":"                LOG.warning(\u0027Suspicious activity detected for node %(node)s \u0027"},{"line_number":3338,"context_line":"                            \u0027when attempting to heartbeat. Heartbeat \u0027"}],"source_content_type":"text/x-python","patch_set":16,"id":"3fa7e38b_e13b5ac6","line":3335,"updated":"2019-12-19 15:57:30.000000000","message":"We should likely log the else from line 3318 to indicate \"We\u0027ve received a validated agent token.\"","commit_id":"d26309cb83d604b4e3f0dfa0b74770bdd07629ff"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"aba47850a2fa524b8de522aa5fbabd98e45ae7c6","unresolved":false,"context_lines":[{"line_number":3332,"context_line":"                        LOG.error(\u0027Invalid agent_token receieved for node \u0027"},{"line_number":3333,"context_line":"                                  \u0027%(node)s\u0027, {\u0027node\u0027: node_id})"},{"line_number":3334,"context_line":"                        raise exception.InvalidParameterValue("},{"line_number":3335,"context_line":"                            \u0027Invalid or missing agent token receieved.\u0027)"},{"line_number":3336,"context_line":"            elif utils.is_agent_token_supported(agent_version):"},{"line_number":3337,"context_line":"                LOG.warning(\u0027Suspicious activity detected for node %(node)s \u0027"},{"line_number":3338,"context_line":"                            \u0027when attempting to heartbeat. Heartbeat \u0027"}],"source_content_type":"text/x-python","patch_set":16,"id":"3fa7e38b_4d905ff4","line":3335,"in_reply_to":"3fa7e38b_e13b5ac6","updated":"2019-12-20 17:05:52.000000000","message":"Done","commit_id":"d26309cb83d604b4e3f0dfa0b74770bdd07629ff"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"2b4b105bd33b399b49ed57d0562ca45cb4b5591e","unresolved":false,"context_lines":[{"line_number":3705,"context_line":"        :raises: NodeLocked, if node has an exclusive lock held on it"},{"line_number":3706,"context_line":"        :raises: Invalid, if the node already has a token set."},{"line_number":3707,"context_line":"        \"\"\""},{"line_number":3708,"context_line":"        print(\u0027Generating agent token method\u0027)"},{"line_number":3709,"context_line":"        LOG.debug(\"RPC generate_agent_token called for the node %(node_id)s\","},{"line_number":3710,"context_line":"                  {\u0027node_id\u0027: node_id})"},{"line_number":3711,"context_line":"        with task_manager.acquire(context, node_id,"}],"source_content_type":"text/x-python","patch_set":16,"id":"3fa7e38b_8182a650","line":3708,"range":{"start_line":3708,"start_character":0,"end_line":3708,"end_character":46},"updated":"2019-12-19 15:57:30.000000000","message":"gah!","commit_id":"d26309cb83d604b4e3f0dfa0b74770bdd07629ff"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"aba47850a2fa524b8de522aa5fbabd98e45ae7c6","unresolved":false,"context_lines":[{"line_number":3705,"context_line":"        :raises: NodeLocked, if node has an exclusive lock held on it"},{"line_number":3706,"context_line":"        :raises: Invalid, if the node already has a token set."},{"line_number":3707,"context_line":"        \"\"\""},{"line_number":3708,"context_line":"        print(\u0027Generating agent token method\u0027)"},{"line_number":3709,"context_line":"        LOG.debug(\"RPC generate_agent_token called for the node %(node_id)s\","},{"line_number":3710,"context_line":"                  {\u0027node_id\u0027: node_id})"},{"line_number":3711,"context_line":"        with task_manager.acquire(context, node_id,"}],"source_content_type":"text/x-python","patch_set":16,"id":"3fa7e38b_adf3136d","line":3708,"range":{"start_line":3708,"start_character":0,"end_line":3708,"end_character":46},"in_reply_to":"3fa7e38b_8182a650","updated":"2019-12-20 17:05:52.000000000","message":"Done","commit_id":"d26309cb83d604b4e3f0dfa0b74770bdd07629ff"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"2b4b105bd33b399b49ed57d0562ca45cb4b5591e","unresolved":false,"context_lines":[{"line_number":3713,"context_line":"                                  shared\u003dTrue) as task:"},{"line_number":3714,"context_line":"            node \u003d task.node"},{"line_number":3715,"context_line":"            if utils.is_agent_token_present(task.node):"},{"line_number":3716,"context_line":"                LOG.info(\u0027An agent token generation request is being refused \u0027"},{"line_number":3717,"context_line":"                         \u0027as one is already present for node %(node)s\u0027,"},{"line_number":3718,"context_line":"                         {\u0027node\u0027: node_id})"},{"line_number":3719,"context_line":"                # Allow lookup to work by returning a value, it is just an"}],"source_content_type":"text/x-python","patch_set":16,"id":"3fa7e38b_01d31665","line":3716,"range":{"start_line":3716,"start_character":20,"end_line":3716,"end_character":24},"updated":"2019-12-19 15:57:30.000000000","message":"error?","commit_id":"d26309cb83d604b4e3f0dfa0b74770bdd07629ff"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"aba47850a2fa524b8de522aa5fbabd98e45ae7c6","unresolved":false,"context_lines":[{"line_number":3713,"context_line":"                                  shared\u003dTrue) as task:"},{"line_number":3714,"context_line":"            node \u003d task.node"},{"line_number":3715,"context_line":"            if utils.is_agent_token_present(task.node):"},{"line_number":3716,"context_line":"                LOG.info(\u0027An agent token generation request is being refused \u0027"},{"line_number":3717,"context_line":"                         \u0027as one is already present for node %(node)s\u0027,"},{"line_number":3718,"context_line":"                         {\u0027node\u0027: node_id})"},{"line_number":3719,"context_line":"                # Allow lookup to work by returning a value, it is just an"}],"source_content_type":"text/x-python","patch_set":16,"id":"3fa7e38b_6d93db00","line":3716,"range":{"start_line":3716,"start_character":20,"end_line":3716,"end_character":24},"in_reply_to":"3fa7e38b_01d31665","updated":"2019-12-20 17:05:52.000000000","message":"Done","commit_id":"d26309cb83d604b4e3f0dfa0b74770bdd07629ff"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"2b4b105bd33b399b49ed57d0562ca45cb4b5591e","unresolved":false,"context_lines":[{"line_number":3722,"context_line":"                # future pre-generation of."},{"line_number":3723,"context_line":"                node.driver_internal_info[\u0027agent_secret_token\u0027] \u003d \"******\""},{"line_number":3724,"context_line":"                return node"},{"line_number":3725,"context_line":"            task.upgrade_lock()"},{"line_number":3726,"context_line":"            utils.add_secret_token(task.node)"},{"line_number":3727,"context_line":"            task.node.save()"},{"line_number":3728,"context_line":"            return task.node"}],"source_content_type":"text/x-python","patch_set":16,"id":"3fa7e38b_61320ac3","line":3725,"updated":"2019-12-19 15:57:30.000000000","message":"log.debug... generating agent token for node node.uuid","commit_id":"d26309cb83d604b4e3f0dfa0b74770bdd07629ff"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"aba47850a2fa524b8de522aa5fbabd98e45ae7c6","unresolved":false,"context_lines":[{"line_number":3722,"context_line":"                # future pre-generation of."},{"line_number":3723,"context_line":"                node.driver_internal_info[\u0027agent_secret_token\u0027] \u003d \"******\""},{"line_number":3724,"context_line":"                return node"},{"line_number":3725,"context_line":"            task.upgrade_lock()"},{"line_number":3726,"context_line":"            utils.add_secret_token(task.node)"},{"line_number":3727,"context_line":"            task.node.save()"},{"line_number":3728,"context_line":"            return task.node"}],"source_content_type":"text/x-python","patch_set":16,"id":"3fa7e38b_ed7eebbe","line":3725,"in_reply_to":"3fa7e38b_61320ac3","updated":"2019-12-20 17:05:52.000000000","message":"Done","commit_id":"d26309cb83d604b4e3f0dfa0b74770bdd07629ff"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e070fa400f922c80e7b0f6a758da504c5726e242","unresolved":false,"context_lines":[{"line_number":1069,"context_line":"            node.instance_info \u003d {}"},{"line_number":1070,"context_line":"            node.instance_uuid \u003d None"},{"line_number":1071,"context_line":"            driver_internal_info \u003d node.driver_internal_info"},{"line_number":1072,"context_line":"            driver_internal_info.pop(\u0027agent_secret_token\u0027, None)"},{"line_number":1073,"context_line":"            driver_internal_info.pop(\u0027agent_secret_token_pregenerated\u0027, None)"},{"line_number":1074,"context_line":"            driver_internal_info.pop(\u0027instance\u0027, None)"},{"line_number":1075,"context_line":"            driver_internal_info.pop(\u0027clean_steps\u0027, None)"},{"line_number":1076,"context_line":"            driver_internal_info.pop(\u0027root_uuid_or_disk_id\u0027, None)"},{"line_number":1077,"context_line":"            driver_internal_info.pop(\u0027is_whole_disk_image\u0027, None)"},{"line_number":1078,"context_line":"            driver_internal_info.pop(\u0027deploy_boot_mode\u0027, None)"},{"line_number":1079,"context_line":"            node.driver_internal_info \u003d driver_internal_info"},{"line_number":1080,"context_line":"            network.remove_vifs_from_node(task)"},{"line_number":1081,"context_line":"            node.save()"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_0da224ad","line":1078,"range":{"start_line":1072,"start_character":0,"end_line":1078,"end_character":62},"updated":"2020-02-10 11:51:43.000000000","message":"I wonder if we need a helper for all this..","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a1aa7d38de093515165922169fc0ca462b18d604","unresolved":false,"context_lines":[{"line_number":1069,"context_line":"            node.instance_info \u003d {}"},{"line_number":1070,"context_line":"            node.instance_uuid \u003d None"},{"line_number":1071,"context_line":"            driver_internal_info \u003d node.driver_internal_info"},{"line_number":1072,"context_line":"            driver_internal_info.pop(\u0027agent_secret_token\u0027, None)"},{"line_number":1073,"context_line":"            driver_internal_info.pop(\u0027agent_secret_token_pregenerated\u0027, None)"},{"line_number":1074,"context_line":"            driver_internal_info.pop(\u0027instance\u0027, None)"},{"line_number":1075,"context_line":"            driver_internal_info.pop(\u0027clean_steps\u0027, None)"},{"line_number":1076,"context_line":"            driver_internal_info.pop(\u0027root_uuid_or_disk_id\u0027, None)"},{"line_number":1077,"context_line":"            driver_internal_info.pop(\u0027is_whole_disk_image\u0027, None)"},{"line_number":1078,"context_line":"            driver_internal_info.pop(\u0027deploy_boot_mode\u0027, None)"},{"line_number":1079,"context_line":"            node.driver_internal_info \u003d driver_internal_info"},{"line_number":1080,"context_line":"            network.remove_vifs_from_node(task)"},{"line_number":1081,"context_line":"            node.save()"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_4c9b33c6","line":1078,"range":{"start_line":1072,"start_character":0,"end_line":1078,"end_character":62},"in_reply_to":"3fa7e38b_0da224ad","updated":"2020-02-10 21:20:47.000000000","message":"I\u0027m starting to think the same, but definitely one of those \"separate patch cleanup\" things.","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e070fa400f922c80e7b0f6a758da504c5726e242","unresolved":false,"context_lines":[{"line_number":3004,"context_line":""},{"line_number":3005,"context_line":"        # NOTE(TheJulia): If tokens are required, lets go ahead and fail the"},{"line_number":3006,"context_line":"        # heartbeat very early on."},{"line_number":3007,"context_line":"        token_required \u003d CONF.require_agent_token"},{"line_number":3008,"context_line":"        if token_required:"},{"line_number":3009,"context_line":"            if agent_token is None:"},{"line_number":3010,"context_line":"                LOG.error(\u0027Agent heartbeat receieved for node %(node)s \u0027"},{"line_number":3011,"context_line":"                          \u0027without an agent token.\u0027, {\u0027node\u0027: node_id})"},{"line_number":3012,"context_line":"                raise exception.InvalidParameterValue("}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_ed8c683a","line":3009,"range":{"start_line":3007,"start_character":0,"end_line":3009,"end_character":35},"updated":"2020-02-10 11:51:43.000000000","message":"I\u0027d move this to API (see my comment there). Also\n\n if token_required and agent_token is None:","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a1aa7d38de093515165922169fc0ca462b18d604","unresolved":false,"context_lines":[{"line_number":3004,"context_line":""},{"line_number":3005,"context_line":"        # NOTE(TheJulia): If tokens are required, lets go ahead and fail the"},{"line_number":3006,"context_line":"        # heartbeat very early on."},{"line_number":3007,"context_line":"        token_required \u003d CONF.require_agent_token"},{"line_number":3008,"context_line":"        if token_required:"},{"line_number":3009,"context_line":"            if agent_token is None:"},{"line_number":3010,"context_line":"                LOG.error(\u0027Agent heartbeat receieved for node %(node)s \u0027"},{"line_number":3011,"context_line":"                          \u0027without an agent token.\u0027, {\u0027node\u0027: node_id})"},{"line_number":3012,"context_line":"                raise exception.InvalidParameterValue("}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_ccbba3bc","line":3009,"range":{"start_line":3007,"start_character":0,"end_line":3009,"end_character":35},"in_reply_to":"3fa7e38b_ed8c683a","updated":"2020-02-10 21:20:47.000000000","message":"Done","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e070fa400f922c80e7b0f6a758da504c5726e242","unresolved":false,"context_lines":[{"line_number":3032,"context_line":"                        # agent ramdisks that have been vmedia booted."},{"line_number":3033,"context_line":"                        LOG.warning(\u0027Out of date agent detected for node \u0027"},{"line_number":3034,"context_line":"                                    \u0027%(node)s. Agent version %(version) \u0027"},{"line_number":3035,"context_line":"                                    \u0027reported.\u0027,"},{"line_number":3036,"context_line":"                                    {\u0027node\u0027: task.node.uuid,"},{"line_number":3037,"context_line":"                                     \u0027version\u0027: agent_version})"},{"line_number":3038,"context_line":"                    else:"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_cd788c2d","line":3035,"updated":"2020-02-10 11:51:43.000000000","message":"nit: Add an explicit deprecation warning?","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a1aa7d38de093515165922169fc0ca462b18d604","unresolved":false,"context_lines":[{"line_number":3032,"context_line":"                        # agent ramdisks that have been vmedia booted."},{"line_number":3033,"context_line":"                        LOG.warning(\u0027Out of date agent detected for node \u0027"},{"line_number":3034,"context_line":"                                    \u0027%(node)s. Agent version %(version) \u0027"},{"line_number":3035,"context_line":"                                    \u0027reported.\u0027,"},{"line_number":3036,"context_line":"                                    {\u0027node\u0027: task.node.uuid,"},{"line_number":3037,"context_line":"                                     \u0027version\u0027: agent_version})"},{"line_number":3038,"context_line":"                    else:"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_ccd083f8","line":3035,"in_reply_to":"3fa7e38b_cd788c2d","updated":"2020-02-10 21:20:47.000000000","message":"Done","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e070fa400f922c80e7b0f6a758da504c5726e242","unresolved":false,"context_lines":[{"line_number":3041,"context_line":"                        raise exception.InvalidParameterValue("},{"line_number":3042,"context_line":"                            \u0027Invalid or missing agent token receieved.\u0027)"},{"line_number":3043,"context_line":"                else:"},{"line_number":3044,"context_line":"                    LOG.debug(\u0027Valid agent token received for node %(node)s \u0027"},{"line_number":3045,"context_line":"                              \u0027heartbeat.\u0027,"},{"line_number":3046,"context_line":"                              {\u0027node\u0027: task.node.uuid})"},{"line_number":3047,"context_line":"            elif utils.is_agent_token_supported(agent_version):"},{"line_number":3048,"context_line":"                LOG.warning(\u0027Suspicious activity detected for node %(node)s \u0027"},{"line_number":3049,"context_line":"                            \u0027when attempting to heartbeat. Heartbeat \u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_ed754834","line":3046,"range":{"start_line":3044,"start_character":0,"end_line":3046,"end_character":55},"updated":"2020-02-10 11:51:43.000000000","message":"I\u0027d remove this, it doesn\u0027t seem overly useful (you can judge by absence of other messages).","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a1aa7d38de093515165922169fc0ca462b18d604","unresolved":false,"context_lines":[{"line_number":3041,"context_line":"                        raise exception.InvalidParameterValue("},{"line_number":3042,"context_line":"                            \u0027Invalid or missing agent token receieved.\u0027)"},{"line_number":3043,"context_line":"                else:"},{"line_number":3044,"context_line":"                    LOG.debug(\u0027Valid agent token received for node %(node)s \u0027"},{"line_number":3045,"context_line":"                              \u0027heartbeat.\u0027,"},{"line_number":3046,"context_line":"                              {\u0027node\u0027: task.node.uuid})"},{"line_number":3047,"context_line":"            elif utils.is_agent_token_supported(agent_version):"},{"line_number":3048,"context_line":"                LOG.warning(\u0027Suspicious activity detected for node %(node)s \u0027"},{"line_number":3049,"context_line":"                            \u0027when attempting to heartbeat. Heartbeat \u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_4c74938a","line":3046,"range":{"start_line":3044,"start_character":0,"end_line":3046,"end_character":55},"in_reply_to":"3fa7e38b_ed754834","updated":"2020-02-10 21:20:47.000000000","message":"Maybe lets add a todo for after the stack of patches. This actually helped me verify that the code was working in CI.","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e070fa400f922c80e7b0f6a758da504c5726e242","unresolved":false,"context_lines":[{"line_number":3045,"context_line":"                              \u0027heartbeat.\u0027,"},{"line_number":3046,"context_line":"                              {\u0027node\u0027: task.node.uuid})"},{"line_number":3047,"context_line":"            elif utils.is_agent_token_supported(agent_version):"},{"line_number":3048,"context_line":"                LOG.warning(\u0027Suspicious activity detected for node %(node)s \u0027"},{"line_number":3049,"context_line":"                            \u0027when attempting to heartbeat. Heartbeat \u0027"},{"line_number":3050,"context_line":"                            \u0027request has been rejected.\u0027,"},{"line_number":3051,"context_line":"                            {\u0027node\u0027: task.node.uuid})"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_8d6e1463","line":3048,"range":{"start_line":3048,"start_character":20,"end_line":3048,"end_character":27},"updated":"2020-02-10 11:51:43.000000000","message":"s/warning/error/","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a1aa7d38de093515165922169fc0ca462b18d604","unresolved":false,"context_lines":[{"line_number":3045,"context_line":"                              \u0027heartbeat.\u0027,"},{"line_number":3046,"context_line":"                              {\u0027node\u0027: task.node.uuid})"},{"line_number":3047,"context_line":"            elif utils.is_agent_token_supported(agent_version):"},{"line_number":3048,"context_line":"                LOG.warning(\u0027Suspicious activity detected for node %(node)s \u0027"},{"line_number":3049,"context_line":"                            \u0027when attempting to heartbeat. Heartbeat \u0027"},{"line_number":3050,"context_line":"                            \u0027request has been rejected.\u0027,"},{"line_number":3051,"context_line":"                            {\u0027node\u0027: task.node.uuid})"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_ac05077b","line":3048,"range":{"start_line":3048,"start_character":20,"end_line":3048,"end_character":27},"in_reply_to":"3fa7e38b_8d6e1463","updated":"2020-02-10 21:20:47.000000000","message":"Done","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e070fa400f922c80e7b0f6a758da504c5726e242","unresolved":false,"context_lines":[{"line_number":3421,"context_line":"        with task_manager.acquire(context, node_id,"},{"line_number":3422,"context_line":"                                  purpose\u003d\u0027generate_token\u0027,"},{"line_number":3423,"context_line":"                                  shared\u003dTrue) as task:"},{"line_number":3424,"context_line":"            node \u003d task.node"},{"line_number":3425,"context_line":"            if utils.is_agent_token_present(task.node):"},{"line_number":3426,"context_line":"                LOG.error(\u0027An agent token generation request is being refused \u0027"},{"line_number":3427,"context_line":"                          \u0027as one is already present for node %(node)s\u0027,"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_ed1f88b5","line":3424,"updated":"2020-02-10 11:51:43.000000000","message":"nit: this is mostly unused, and I\u0027d remove it to avoid confusion with task.node after upgrade_lock.","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e070fa400f922c80e7b0f6a758da504c5726e242","unresolved":false,"context_lines":[{"line_number":3423,"context_line":"                                  shared\u003dTrue) as task:"},{"line_number":3424,"context_line":"            node \u003d task.node"},{"line_number":3425,"context_line":"            if utils.is_agent_token_present(task.node):"},{"line_number":3426,"context_line":"                LOG.error(\u0027An agent token generation request is being refused \u0027"},{"line_number":3427,"context_line":"                          \u0027as one is already present for node %(node)s\u0027,"},{"line_number":3428,"context_line":"                          {\u0027node\u0027: node_id})"},{"line_number":3429,"context_line":"                # Allow lookup to work by returning a value, it is just an"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_ad6bd051","line":3426,"range":{"start_line":3426,"start_character":20,"end_line":3426,"end_character":25},"updated":"2020-02-10 11:51:43.000000000","message":"s/error/warning/ (it\u0027s not fatal)","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e070fa400f922c80e7b0f6a758da504c5726e242","unresolved":false,"context_lines":[{"line_number":3426,"context_line":"                LOG.error(\u0027An agent token generation request is being refused \u0027"},{"line_number":3427,"context_line":"                          \u0027as one is already present for node %(node)s\u0027,"},{"line_number":3428,"context_line":"                          {\u0027node\u0027: node_id})"},{"line_number":3429,"context_line":"                # Allow lookup to work by returning a value, it is just an"},{"line_number":3430,"context_line":"                # unusable value that can\u0027t be verified against."},{"line_number":3431,"context_line":"                # This is important if the agent lookup has occured with"},{"line_number":3432,"context_line":"                # future pre-generation of."},{"line_number":3433,"context_line":"                node.driver_internal_info[\u0027agent_secret_token\u0027] \u003d \"******\""},{"line_number":3434,"context_line":"                return node"},{"line_number":3435,"context_line":"            task.upgrade_lock()"},{"line_number":3436,"context_line":"            LOG.debug(\u0027Generating agent token for node %(node)s\u0027,"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_2d95a031","line":3433,"range":{"start_line":3429,"start_character":0,"end_line":3433,"end_character":74},"updated":"2020-02-10 11:51:43.000000000","message":"I don\u0027t quite get this bit, are we purging the correct token? Or do you rely on the fact that nobody is going to call save() afterwards?","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dcd6abcdcfcb38a816df512292480c2b68c467a5","unresolved":false,"context_lines":[{"line_number":3024,"context_line":"                        # agent ramdisks that have been vmedia booted."},{"line_number":3025,"context_line":"                        # DEPRECATED(TheJulia): Support for the agent without"},{"line_number":3026,"context_line":"                        # the token should be removed in the W cycle."},{"line_number":3027,"context_line":"                        LOG.warning(\u0027Out of date agent detected for node \u0027"},{"line_number":3028,"context_line":"                                    \u0027%(node)s. Agent version %(version) \u0027"},{"line_number":3029,"context_line":"                                    \u0027reported. Support for this version is \u0027"},{"line_number":3030,"context_line":"                                    \u0027deprecated.\u0027,"}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_bd1ffe5b","line":3027,"updated":"2020-02-18 12:27:26.000000000","message":"This line can be reached when the token is required by an explicit operator\u0027s decision, I think we must reject the request in this case. As an operator, I\u0027d see the token_required option this way. Otherwise a man-in-the-middle can hijack the version.\n\nThe way I\u0027d lay down this logic is:\n\n 1) Token required and not valid? Reject.\n 2) Token provided and not valid? Reject.\n 3) Token not provided at all:\n 3.1) IPA version is new enough? Reject.\n 3.2) Log a deprecation warning.\n\nRe #2, I don\u0027t think we should accept invalid tokens from older IPA. We know that old IPA cannot send them, so something fishy is going on.","commit_id":"2114c08ffff0d538ad2628fc1d017e0390c1c73b"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"79e983e68036ce8a1a7689c6c7e228df558f37c3","unresolved":false,"context_lines":[{"line_number":3024,"context_line":"                        # agent ramdisks that have been vmedia booted."},{"line_number":3025,"context_line":"                        # DEPRECATED(TheJulia): Support for the agent without"},{"line_number":3026,"context_line":"                        # the token should be removed in the W cycle."},{"line_number":3027,"context_line":"                        LOG.warning(\u0027Out of date agent detected for node \u0027"},{"line_number":3028,"context_line":"                                    \u0027%(node)s. Agent version %(version) \u0027"},{"line_number":3029,"context_line":"                                    \u0027reported. Support for this version is \u0027"},{"line_number":3030,"context_line":"                                    \u0027deprecated.\u0027,"}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_7cbdfd02","line":3027,"in_reply_to":"3fa7e38b_bd1ffe5b","updated":"2020-02-20 19:19:11.000000000","message":"I think the updated code I\u0027ve got locally does this as highlighted by moving the warning down from 3027.","commit_id":"2114c08ffff0d538ad2628fc1d017e0390c1c73b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dcd6abcdcfcb38a816df512292480c2b68c467a5","unresolved":false,"context_lines":[{"line_number":3037,"context_line":"                            \u0027Invalid or missing agent token receieved.\u0027)"},{"line_number":3038,"context_line":"                else:"},{"line_number":3039,"context_line":"                    LOG.debug(\u0027Valid agent token received for node %(node)s \u0027"},{"line_number":3040,"context_line":"                              \u0027heartbeat.\u0027,"},{"line_number":3041,"context_line":"                              {\u0027node\u0027: task.node.uuid})"},{"line_number":3042,"context_line":"            elif utils.is_agent_token_supported(agent_version):"},{"line_number":3043,"context_line":"                LOG.error(\u0027Suspicious activity detected for node %(node)s \u0027"}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_dd243ab4","line":3040,"updated":"2020-02-18 12:27:26.000000000","message":"nit: not sure it\u0027s helpful, absence of an error is a sign of success.","commit_id":"2114c08ffff0d538ad2628fc1d017e0390c1c73b"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"79e983e68036ce8a1a7689c6c7e228df558f37c3","unresolved":false,"context_lines":[{"line_number":3037,"context_line":"                            \u0027Invalid or missing agent token receieved.\u0027)"},{"line_number":3038,"context_line":"                else:"},{"line_number":3039,"context_line":"                    LOG.debug(\u0027Valid agent token received for node %(node)s \u0027"},{"line_number":3040,"context_line":"                              \u0027heartbeat.\u0027,"},{"line_number":3041,"context_line":"                              {\u0027node\u0027: task.node.uuid})"},{"line_number":3042,"context_line":"            elif utils.is_agent_token_supported(agent_version):"},{"line_number":3043,"context_line":"                LOG.error(\u0027Suspicious activity detected for node %(node)s \u0027"}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_31780ec1","line":3040,"in_reply_to":"3fa7e38b_dd243ab4","updated":"2020-02-20 19:19:11.000000000","message":"Given that I\u0027ve had enough iterations of this code, I feel like it is safe to remove it at this point.","commit_id":"2114c08ffff0d538ad2628fc1d017e0390c1c73b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dcd6abcdcfcb38a816df512292480c2b68c467a5","unresolved":false,"context_lines":[{"line_number":3040,"context_line":"                              \u0027heartbeat.\u0027,"},{"line_number":3041,"context_line":"                              {\u0027node\u0027: task.node.uuid})"},{"line_number":3042,"context_line":"            elif utils.is_agent_token_supported(agent_version):"},{"line_number":3043,"context_line":"                LOG.error(\u0027Suspicious activity detected for node %(node)s \u0027"},{"line_number":3044,"context_line":"                          \u0027when attempting to heartbeat. Heartbeat \u0027"},{"line_number":3045,"context_line":"                          \u0027request has been rejected.\u0027,"},{"line_number":3046,"context_line":"                          {\u0027node\u0027: task.node.uuid})"}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_7d198674","line":3043,"updated":"2020-02-18 12:27:26.000000000","message":"maybe elaborate? \"The version of ironic-python-agent supports agent tokens, but no token has been received.\"","commit_id":"2114c08ffff0d538ad2628fc1d017e0390c1c73b"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"79e983e68036ce8a1a7689c6c7e228df558f37c3","unresolved":false,"context_lines":[{"line_number":3040,"context_line":"                              \u0027heartbeat.\u0027,"},{"line_number":3041,"context_line":"                              {\u0027node\u0027: task.node.uuid})"},{"line_number":3042,"context_line":"            elif utils.is_agent_token_supported(agent_version):"},{"line_number":3043,"context_line":"                LOG.error(\u0027Suspicious activity detected for node %(node)s \u0027"},{"line_number":3044,"context_line":"                          \u0027when attempting to heartbeat. Heartbeat \u0027"},{"line_number":3045,"context_line":"                          \u0027request has been rejected.\u0027,"},{"line_number":3046,"context_line":"                          {\u0027node\u0027: task.node.uuid})"}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_7c0add1f","line":3043,"in_reply_to":"3fa7e38b_7d198674","updated":"2020-02-20 19:19:11.000000000","message":"Done","commit_id":"2114c08ffff0d538ad2628fc1d017e0390c1c73b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dcd6abcdcfcb38a816df512292480c2b68c467a5","unresolved":false,"context_lines":[{"line_number":3045,"context_line":"                          \u0027request has been rejected.\u0027,"},{"line_number":3046,"context_line":"                          {\u0027node\u0027: task.node.uuid})"},{"line_number":3047,"context_line":"                raise exception.InvalidParameterValue("},{"line_number":3048,"context_line":"                    \u0027Invalid or missing agent token received.\u0027)"},{"line_number":3049,"context_line":""},{"line_number":3050,"context_line":"            task.spawn_after("},{"line_number":3051,"context_line":"                self._spawn_worker, task.driver.deploy.heartbeat,"}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_9d1ec25c","line":3048,"updated":"2020-02-18 12:27:26.000000000","message":"I\u0027d move the warning from 3027 to a final \"else\" block here.","commit_id":"2114c08ffff0d538ad2628fc1d017e0390c1c73b"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"79e983e68036ce8a1a7689c6c7e228df558f37c3","unresolved":false,"context_lines":[{"line_number":3045,"context_line":"                          \u0027request has been rejected.\u0027,"},{"line_number":3046,"context_line":"                          {\u0027node\u0027: task.node.uuid})"},{"line_number":3047,"context_line":"                raise exception.InvalidParameterValue("},{"line_number":3048,"context_line":"                    \u0027Invalid or missing agent token received.\u0027)"},{"line_number":3049,"context_line":""},{"line_number":3050,"context_line":"            task.spawn_after("},{"line_number":3051,"context_line":"                self._spawn_worker, task.driver.deploy.heartbeat,"}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_9cd1d95d","line":3048,"in_reply_to":"3fa7e38b_9d1ec25c","updated":"2020-02-20 19:19:11.000000000","message":"Done","commit_id":"2114c08ffff0d538ad2628fc1d017e0390c1c73b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dcd6abcdcfcb38a816df512292480c2b68c467a5","unresolved":false,"context_lines":[{"line_number":3418,"context_line":"                                  shared\u003dTrue) as task:"},{"line_number":3419,"context_line":"            node \u003d task.node"},{"line_number":3420,"context_line":"            if utils.is_agent_token_present(task.node):"},{"line_number":3421,"context_line":"                LOG.error(\u0027An agent token generation request is being refused \u0027"},{"line_number":3422,"context_line":"                          \u0027as one is already present for node %(node)s\u0027,"},{"line_number":3423,"context_line":"                          {\u0027node\u0027: node_id})"},{"line_number":3424,"context_line":"                # Allow lookup to work by returning a value, it is just an"}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_3d330efb","line":3421,"updated":"2020-02-18 12:27:26.000000000","message":"s/error/warning/ since it doesn\u0027t result in a failure.","commit_id":"2114c08ffff0d538ad2628fc1d017e0390c1c73b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dcd6abcdcfcb38a816df512292480c2b68c467a5","unresolved":false,"context_lines":[{"line_number":3424,"context_line":"                # Allow lookup to work by returning a value, it is just an"},{"line_number":3425,"context_line":"                # unusable value that can\u0027t be verified against."},{"line_number":3426,"context_line":"                # This is important if the agent lookup has occured with"},{"line_number":3427,"context_line":"                # future pre-generation of."},{"line_number":3428,"context_line":"                node.driver_internal_info[\u0027agent_secret_token\u0027] \u003d \"******\""},{"line_number":3429,"context_line":"                return node"},{"line_number":3430,"context_line":"            task.upgrade_lock()"}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_5d304aeb","line":3427,"updated":"2020-02-18 12:27:26.000000000","message":"nit: unfinished sentence?","commit_id":"2114c08ffff0d538ad2628fc1d017e0390c1c73b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cb81b5d19314ea0c3ac0de1c20ea2e2035399a26","unresolved":false,"context_lines":[{"line_number":2961,"context_line":"            # validated."},{"line_number":2962,"context_line":"            if token_required or utils.is_agent_token_present(task.node):"},{"line_number":2963,"context_line":"                if utils.is_agent_token_valid(task.node, agent_token):"},{"line_number":2964,"context_line":"                    pass"},{"line_number":2965,"context_line":"                else:"},{"line_number":2966,"context_line":"                    LOG.error(\u0027Invalid agent_token receieved for node \u0027"},{"line_number":2967,"context_line":"                              \u0027%(node)s\u0027, {\u0027node\u0027: node_id})"}],"source_content_type":"text/x-python","patch_set":30,"id":"3fa7e38b_75ee5221","line":2964,"range":{"start_line":2964,"start_character":0,"end_line":2964,"end_character":23},"updated":"2020-02-20 12:49:28.000000000","message":"nit: remove the empty branch, use `if not`","commit_id":"5f867c0e481566a4fe4c92780fc0a907ffc579e7"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"79e983e68036ce8a1a7689c6c7e228df558f37c3","unresolved":false,"context_lines":[{"line_number":2961,"context_line":"            # validated."},{"line_number":2962,"context_line":"            if token_required or utils.is_agent_token_present(task.node):"},{"line_number":2963,"context_line":"                if utils.is_agent_token_valid(task.node, agent_token):"},{"line_number":2964,"context_line":"                    pass"},{"line_number":2965,"context_line":"                else:"},{"line_number":2966,"context_line":"                    LOG.error(\u0027Invalid agent_token receieved for node \u0027"},{"line_number":2967,"context_line":"                              \u0027%(node)s\u0027, {\u0027node\u0027: node_id})"}],"source_content_type":"text/x-python","patch_set":30,"id":"3fa7e38b_8c7f4415","line":2964,"range":{"start_line":2964,"start_character":0,"end_line":2964,"end_character":23},"in_reply_to":"3fa7e38b_75ee5221","updated":"2020-02-20 19:19:11.000000000","message":"ack, I\u0027ll rev it when I do the rebase on top of the current change in the pipeline.","commit_id":"5f867c0e481566a4fe4c92780fc0a907ffc579e7"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cb81b5d19314ea0c3ac0de1c20ea2e2035399a26","unresolved":false,"context_lines":[{"line_number":2963,"context_line":"                if utils.is_agent_token_valid(task.node, agent_token):"},{"line_number":2964,"context_line":"                    pass"},{"line_number":2965,"context_line":"                else:"},{"line_number":2966,"context_line":"                    LOG.error(\u0027Invalid agent_token receieved for node \u0027"},{"line_number":2967,"context_line":"                              \u0027%(node)s\u0027, {\u0027node\u0027: node_id})"},{"line_number":2968,"context_line":"                    raise exception.InvalidParameterValue("},{"line_number":2969,"context_line":"                        \u0027Invalid or missing agent token receieved.\u0027)"}],"source_content_type":"text/x-python","patch_set":30,"id":"3fa7e38b_15d59e48","line":2966,"range":{"start_line":2966,"start_character":51,"end_line":2966,"end_character":60},"updated":"2020-02-20 12:49:28.000000000","message":"\"received\"","commit_id":"5f867c0e481566a4fe4c92780fc0a907ffc579e7"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"20a2361582085b2f126f89837d22bed4e40dee2a","unresolved":false,"context_lines":[{"line_number":3355,"context_line":"                                  purpose\u003d\u0027generate_token\u0027,"},{"line_number":3356,"context_line":"                                  shared\u003dTrue) as task:"},{"line_number":3357,"context_line":"            node \u003d task.node"},{"line_number":3358,"context_line":"            if utils.is_agent_token_present(task.node):"},{"line_number":3359,"context_line":"                LOG.warning(\u0027An agent token generation request is being \u0027"},{"line_number":3360,"context_line":"                            \u0027refused as one is already present for \u0027"},{"line_number":3361,"context_line":"                            \u0027node %(node)s\u0027,"}],"source_content_type":"text/x-python","patch_set":31,"id":"3fa7e38b_47235e58","line":3358,"range":{"start_line":3358,"start_character":44,"end_line":3358,"end_character":53},"updated":"2020-02-21 09:25:07.000000000","message":"s/ task.node / node /","commit_id":"bb3b2349f9c044a6b51e7b425c2290c887bb4cb2"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"20a2361582085b2f126f89837d22bed4e40dee2a","unresolved":false,"context_lines":[{"line_number":3368,"context_line":"                return node"},{"line_number":3369,"context_line":"            task.upgrade_lock()"},{"line_number":3370,"context_line":"            LOG.debug(\u0027Generating agent token for node %(node)s\u0027,"},{"line_number":3371,"context_line":"                      {\u0027node\u0027: task.node.uuid})"},{"line_number":3372,"context_line":"            utils.add_secret_token(task.node)"},{"line_number":3373,"context_line":"            task.node.save()"},{"line_number":3374,"context_line":"            return task.node"}],"source_content_type":"text/x-python","patch_set":31,"id":"3fa7e38b_a7fa52b8","line":3371,"range":{"start_line":3371,"start_character":31,"end_line":3371,"end_character":45},"updated":"2020-02-21 09:25:07.000000000","message":"s/ task.node.uuid / node.uuid /","commit_id":"bb3b2349f9c044a6b51e7b425c2290c887bb4cb2"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"20a2361582085b2f126f89837d22bed4e40dee2a","unresolved":false,"context_lines":[{"line_number":3369,"context_line":"            task.upgrade_lock()"},{"line_number":3370,"context_line":"            LOG.debug(\u0027Generating agent token for node %(node)s\u0027,"},{"line_number":3371,"context_line":"                      {\u0027node\u0027: task.node.uuid})"},{"line_number":3372,"context_line":"            utils.add_secret_token(task.node)"},{"line_number":3373,"context_line":"            task.node.save()"},{"line_number":3374,"context_line":"            return task.node"},{"line_number":3375,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"3fa7e38b_8729563a","line":3372,"range":{"start_line":3372,"start_character":35,"end_line":3372,"end_character":44},"updated":"2020-02-21 09:25:07.000000000","message":"s/ task.node / node /","commit_id":"bb3b2349f9c044a6b51e7b425c2290c887bb4cb2"}],"ironic/conductor/rpcapi.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e070fa400f922c80e7b0f6a758da504c5726e242","unresolved":false,"context_lines":[{"line_number":1139,"context_line":"        cctxt \u003d self.client.prepare(topic\u003dtopic or self.topic, version\u003d\u00271.48\u0027)"},{"line_number":1140,"context_line":"        return cctxt.call(context, \u0027destroy_allocation\u0027, allocation\u003dallocation)"},{"line_number":1141,"context_line":""},{"line_number":1142,"context_line":"    def generate_agent_token(self, context, node_id, topic\u003dNone):"},{"line_number":1143,"context_line":"        \"\"\"Set an agent token."},{"line_number":1144,"context_line":""},{"line_number":1145,"context_line":"        :param context: request context."}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_ed64684f","line":1142,"range":{"start_line":1142,"start_character":8,"end_line":1142,"end_character":28},"updated":"2020-02-10 11:51:43.000000000","message":"This call actually retrieves a node, so let\u0027s call it get_node_with_token or something.","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a1aa7d38de093515165922169fc0ca462b18d604","unresolved":false,"context_lines":[{"line_number":1139,"context_line":"        cctxt \u003d self.client.prepare(topic\u003dtopic or self.topic, version\u003d\u00271.48\u0027)"},{"line_number":1140,"context_line":"        return cctxt.call(context, \u0027destroy_allocation\u0027, allocation\u003dallocation)"},{"line_number":1141,"context_line":""},{"line_number":1142,"context_line":"    def generate_agent_token(self, context, node_id, topic\u003dNone):"},{"line_number":1143,"context_line":"        \"\"\"Set an agent token."},{"line_number":1144,"context_line":""},{"line_number":1145,"context_line":"        :param context: request context."}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_2cf11797","line":1142,"range":{"start_line":1142,"start_character":8,"end_line":1142,"end_character":28},"in_reply_to":"3fa7e38b_ed64684f","updated":"2020-02-10 21:20:47.000000000","message":"ack","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e070fa400f922c80e7b0f6a758da504c5726e242","unresolved":false,"context_lines":[{"line_number":1144,"context_line":""},{"line_number":1145,"context_line":"        :param context: request context."},{"line_number":1146,"context_line":"        :param node_id: node ID or UUID."},{"line_number":1147,"context_line":"        :param topic: RPC topic. Defaults to self.topic."},{"line_number":1148,"context_line":"        :raises: NodeLocked if node is locked by another conductor."},{"line_number":1149,"context_line":"        \"\"\""},{"line_number":1150,"context_line":"        cctxt \u003d self.client.prepare(topic\u003dtopic or self.topic, version\u003d\u00271.49\u0027)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_ad6af014","line":1147,"updated":"2020-02-10 11:51:43.000000000","message":":return: A Node object","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a1aa7d38de093515165922169fc0ca462b18d604","unresolved":false,"context_lines":[{"line_number":1144,"context_line":""},{"line_number":1145,"context_line":"        :param context: request context."},{"line_number":1146,"context_line":"        :param node_id: node ID or UUID."},{"line_number":1147,"context_line":"        :param topic: RPC topic. Defaults to self.topic."},{"line_number":1148,"context_line":"        :raises: NodeLocked if node is locked by another conductor."},{"line_number":1149,"context_line":"        \"\"\""},{"line_number":1150,"context_line":"        cctxt \u003d self.client.prepare(topic\u003dtopic or self.topic, version\u003d\u00271.49\u0027)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_2c1fd7b8","line":1147,"in_reply_to":"3fa7e38b_ad6af014","updated":"2020-02-10 21:20:47.000000000","message":"Done","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"c304d35e991a9b778057865932baf51d140f9ad6","unresolved":false,"context_lines":[{"line_number":1140,"context_line":"        return cctxt.call(context, \u0027destroy_allocation\u0027, allocation\u003dallocation)"},{"line_number":1141,"context_line":""},{"line_number":1142,"context_line":"    def get_node_with_token(self, context, node_id, topic\u003dNone):"},{"line_number":1143,"context_line":"        \"\"\"Set an agent token."},{"line_number":1144,"context_line":""},{"line_number":1145,"context_line":"        :param context: request context."},{"line_number":1146,"context_line":"        :param node_id: node ID or UUID."}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_0ede883b","line":1143,"range":{"start_line":1143,"start_character":11,"end_line":1143,"end_character":29},"updated":"2020-02-11 09:52:46.000000000","message":"this doesn\u0027t look correct","commit_id":"08c2e58698547d3a5eb79728e3727eaa10204096"}],"ironic/conductor/utils.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"4de3a1483415351181300814cfc05b7e22e18a8d","unresolved":false,"context_lines":[{"line_number":947,"context_line":"    \"\"\"Deletes the IPA agent secret token.\"\"\""},{"line_number":948,"context_line":"    i_info \u003d node.driver_internal_info"},{"line_number":949,"context_line":"    i_info.pop(\u0027agent_secret_token\u0027, None)"},{"line_number":950,"context_line":"    node.driver_internal_info \u003d i_info"},{"line_number":951,"context_line":""},{"line_number":952,"context_line":""},{"line_number":953,"context_line":"def is_agent_token_present(node):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_3564c548","line":950,"updated":"2019-12-11 17:32:49.000000000","message":"nit: I\u0027m pretty sure I\u0027ve created a helper function for this somewhere..","commit_id":"d57a2d226df66b3d33988979510ba0dba23e33d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"4de3a1483415351181300814cfc05b7e22e18a8d","unresolved":false,"context_lines":[{"line_number":966,"context_line":""},{"line_number":967,"context_line":""},{"line_number":968,"context_line":"def is_agent_token_supported(agent_version):"},{"line_number":969,"context_line":"    # NOTE(TheJulia): This is hoped that 5.1.x or 6.x supports"},{"line_number":970,"context_line":"    # agent token capabilities and realistically needs to be updated"},{"line_number":971,"context_line":"    # once that version of IPA is out there in some shape or form."},{"line_number":972,"context_line":"    # This allows us to gracefully allow older agent\u0027s that were"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_f5594d8c","line":969,"updated":"2019-12-11 17:32:49.000000000","message":"1) It will be 6.0.0 because of python 2 removal\n\n2) We haven\u0027t finished IPA API versioning, have we? :(","commit_id":"d57a2d226df66b3d33988979510ba0dba23e33d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a57e5969725a937e7c67bdd7644405404e6bf536","unresolved":false,"context_lines":[{"line_number":966,"context_line":""},{"line_number":967,"context_line":""},{"line_number":968,"context_line":"def is_agent_token_supported(agent_version):"},{"line_number":969,"context_line":"    # NOTE(TheJulia): This is hoped that 5.1.x or 6.x supports"},{"line_number":970,"context_line":"    # agent token capabilities and realistically needs to be updated"},{"line_number":971,"context_line":"    # once that version of IPA is out there in some shape or form."},{"line_number":972,"context_line":"    # This allows us to gracefully allow older agent\u0027s that were"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_84ad49eb","line":969,"in_reply_to":"3fa7e38b_f5594d8c","updated":"2019-12-11 22:37:41.000000000","message":"1) Yeaaahhhh I think I typed this out back in mid-october so.. yeah.\n2) No, we transmit it, we gutted the transmission out. And we never actually transmit back what version the conductor is at. Even if we did finish it, it would actually be an insecure route because things could be able to be bypassed by beginning to just say \"I\u0027m too old to grok it\". I\u0027ve actually run into some of these things doing the IPA change separately afterwards.","commit_id":"d57a2d226df66b3d33988979510ba0dba23e33d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a57e5969725a937e7c67bdd7644405404e6bf536","unresolved":false,"context_lines":[{"line_number":973,"context_line":"    # launched via pre-generated agent_tokens, to still work"},{"line_number":974,"context_line":"    # and could likely be removed at some point down the road."},{"line_number":975,"context_line":"    version \u003d str(agent_version).replace(\u0027.dev\u0027, \u0027b\u0027, 1)"},{"line_number":976,"context_line":"    return StrictVersion(version) \u003e StrictVersion(\u00275.2.0\u0027)"},{"line_number":977,"context_line":""},{"line_number":978,"context_line":""},{"line_number":979,"context_line":"def is_agent_token_pregenerated(node):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_64ae0de5","line":976,"updated":"2019-12-11 22:37:41.000000000","message":"note to self, this needs to become 6.0 at some point and we either need to release IPA or mark the major version change flag to test it.","commit_id":"d57a2d226df66b3d33988979510ba0dba23e33d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3938fc46fb3a405071b81c8d9b1dd56e872b1908","unresolved":false,"context_lines":[{"line_number":1049,"context_line":"    # launched via pre-generated agent_tokens, to still work"},{"line_number":1050,"context_line":"    # and could likely be removed at some point down the road."},{"line_number":1051,"context_line":"    version \u003d str(agent_version).replace(\u0027.dev\u0027, \u0027b\u0027, 1)"},{"line_number":1052,"context_line":"    return StrictVersion(version) \u003e StrictVersion(\u00276.0.0\u0027)"},{"line_number":1053,"context_line":""},{"line_number":1054,"context_line":""},{"line_number":1055,"context_line":"def is_agent_token_pregenerated(node):"}],"source_content_type":"text/x-python","patch_set":25,"id":"3fa7e38b_f0a2d0ab","line":1052,"range":{"start_line":1052,"start_character":50,"end_line":1052,"end_character":57},"updated":"2020-02-12 13:11:48.000000000","message":"This probably needs updating, 6.0.0 has been released without this feature. Make it \u003e\u003d 6.1.0?","commit_id":"052a9eb6bb76c08ac3fb364fbb3954a42002f27e"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"209b238197e9d80ec32dc63d9b3053a42dae13b0","unresolved":false,"context_lines":[{"line_number":1049,"context_line":"    # launched via pre-generated agent_tokens, to still work"},{"line_number":1050,"context_line":"    # and could likely be removed at some point down the road."},{"line_number":1051,"context_line":"    version \u003d str(agent_version).replace(\u0027.dev\u0027, \u0027b\u0027, 1)"},{"line_number":1052,"context_line":"    return StrictVersion(version) \u003e StrictVersion(\u00276.0.0\u0027)"},{"line_number":1053,"context_line":""},{"line_number":1054,"context_line":""},{"line_number":1055,"context_line":"def is_agent_token_pregenerated(node):"}],"source_content_type":"text/x-python","patch_set":25,"id":"3fa7e38b_ebe18598","line":1052,"range":{"start_line":1052,"start_character":50,"end_line":1052,"end_character":57},"in_reply_to":"3fa7e38b_f0a2d0ab","updated":"2020-02-14 23:23:48.000000000","message":"drat!","commit_id":"052a9eb6bb76c08ac3fb364fbb3954a42002f27e"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"2368412f2dea4f982f3a3fef6a9bdc058622c64e","unresolved":false,"context_lines":[{"line_number":1013,"context_line":"def add_secret_token(node):"},{"line_number":1014,"context_line":"    \"\"\"Adds a secret token to driver_internal_info for IPA verification.\"\"\""},{"line_number":1015,"context_line":"    characters \u003d string.ascii_letters + string.digits"},{"line_number":1016,"context_line":"    token \u003d \u0027\u0027.join(random.choice(characters) for i in range(128))"},{"line_number":1017,"context_line":"    i_info \u003d node.driver_internal_info"},{"line_number":1018,"context_line":"    i_info[\u0027agent_secret_token\u0027] \u003d token"},{"line_number":1019,"context_line":"    node.driver_internal_info \u003d i_info"}],"source_content_type":"text/x-python","patch_set":27,"id":"3fa7e38b_7856b4fb","line":1016,"updated":"2020-02-13 12:30:00.000000000","message":"Should we bump up the entropy?\n\n    random.SystemRandom().choice(characters)\n\nOtherwise PRNG attack might be theoretically possible...\n\nIgnore me if I missed this discussion somewhere in the wall of review comments above...","commit_id":"ddb03f80f72fcacbcbf0df4629a7749e6c04b454"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"209b238197e9d80ec32dc63d9b3053a42dae13b0","unresolved":false,"context_lines":[{"line_number":1013,"context_line":"def add_secret_token(node):"},{"line_number":1014,"context_line":"    \"\"\"Adds a secret token to driver_internal_info for IPA verification.\"\"\""},{"line_number":1015,"context_line":"    characters \u003d string.ascii_letters + string.digits"},{"line_number":1016,"context_line":"    token \u003d \u0027\u0027.join(random.choice(characters) for i in range(128))"},{"line_number":1017,"context_line":"    i_info \u003d node.driver_internal_info"},{"line_number":1018,"context_line":"    i_info[\u0027agent_secret_token\u0027] \u003d token"},{"line_number":1019,"context_line":"    node.driver_internal_info \u003d i_info"}],"source_content_type":"text/x-python","patch_set":27,"id":"3fa7e38b_411f2a0a","line":1016,"in_reply_to":"3fa7e38b_7856b4fb","updated":"2020-02-14 23:23:48.000000000","message":"Good point. I thought about it, and then checked to make sure that it read from the kernel prng instead of the hardware rng. Change incoming.","commit_id":"ddb03f80f72fcacbcbf0df4629a7749e6c04b454"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dcd6abcdcfcb38a816df512292480c2b68c467a5","unresolved":false,"context_lines":[{"line_number":1029,"context_line":""},{"line_number":1030,"context_line":"def is_agent_token_present(node):"},{"line_number":1031,"context_line":"    # TODO(TheJulia): we should likely record the time when we add the token"},{"line_number":1032,"context_line":"    # and then compare if it was in the last ?hour?"},{"line_number":1033,"context_line":"    return node.driver_internal_info.get("},{"line_number":1034,"context_line":"        \u0027agent_secret_token\u0027, None) is not None"},{"line_number":1035,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_fd2c9695","line":1032,"updated":"2020-02-18 12:27:26.000000000","message":"Won\u0027t work for fast-track, I guess?","commit_id":"2114c08ffff0d538ad2628fc1d017e0390c1c73b"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"79e983e68036ce8a1a7689c6c7e228df558f37c3","unresolved":false,"context_lines":[{"line_number":1029,"context_line":""},{"line_number":1030,"context_line":"def is_agent_token_present(node):"},{"line_number":1031,"context_line":"    # TODO(TheJulia): we should likely record the time when we add the token"},{"line_number":1032,"context_line":"    # and then compare if it was in the last ?hour?"},{"line_number":1033,"context_line":"    return node.driver_internal_info.get("},{"line_number":1034,"context_line":"        \u0027agent_secret_token\u0027, None) is not None"},{"line_number":1035,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_b17b9e29","line":1032,"in_reply_to":"3fa7e38b_fd2c9695","updated":"2020-02-20 19:19:11.000000000","message":"I was thinking an extra guard rail, tbh. Added more thoughts to the comment. My comment clarifies that it is a consideration, and that last heartbeat beat likely overrides token age in such cases. Then again, maybe we just purely keep it like so and only ever think of such as valid, but.... I like simple validation logic.","commit_id":"2114c08ffff0d538ad2628fc1d017e0390c1c73b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dcd6abcdcfcb38a816df512292480c2b68c467a5","unresolved":false,"context_lines":[{"line_number":1053,"context_line":"    return StrictVersion(version) \u003e StrictVersion(\u00276.1.0\u0027)"},{"line_number":1054,"context_line":""},{"line_number":1055,"context_line":""},{"line_number":1056,"context_line":"def is_agent_token_pregenerated(node):"},{"line_number":1057,"context_line":"    return node.driver_internal_info.get("},{"line_number":1058,"context_line":"        \u0027agent_secret_token_pregenerated\u0027, False)"}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_1d2ad277","line":1056,"updated":"2020-02-18 12:27:26.000000000","message":"Let\u0027s add a docstring with an explanation what a pre-generated token means. The two of us know it, the others probably don\u0027t.","commit_id":"2114c08ffff0d538ad2628fc1d017e0390c1c73b"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"79e983e68036ce8a1a7689c6c7e228df558f37c3","unresolved":false,"context_lines":[{"line_number":1053,"context_line":"    return StrictVersion(version) \u003e StrictVersion(\u00276.1.0\u0027)"},{"line_number":1054,"context_line":""},{"line_number":1055,"context_line":""},{"line_number":1056,"context_line":"def is_agent_token_pregenerated(node):"},{"line_number":1057,"context_line":"    return node.driver_internal_info.get("},{"line_number":1058,"context_line":"        \u0027agent_secret_token_pregenerated\u0027, False)"}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_f122760e","line":1056,"in_reply_to":"3fa7e38b_1d2ad277","updated":"2020-02-20 19:19:11.000000000","message":"Super good point, done.","commit_id":"2114c08ffff0d538ad2628fc1d017e0390c1c73b"}],"ironic/conf/conductor.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"4de3a1483415351181300814cfc05b7e22e18a8d","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                      \u0027will be used by ironic when building UEFI-bootable ISO \u0027"},{"line_number":260,"context_line":"                      \u0027out of kernel and ramdisk. Required for UEFI boot from \u0027"},{"line_number":261,"context_line":"                      \u0027partition images.\u0027)),"},{"line_number":262,"context_line":"    cfg.BoolOpt(\u0027heartbeats_require_agent_token\u0027,"},{"line_number":263,"context_line":"                default\u003dFalse,"},{"line_number":264,"context_line":"                help\u003d_(\u0027Setting if heartbeat processing should require an \u0027"},{"line_number":265,"context_line":"                       \u0027agent token, which is either provided upon lookup or \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_554aa1ac","line":262,"updated":"2019-12-11 17:32:49.000000000","message":"How is it different from require_agent_token? Why do we need both?","commit_id":"d57a2d226df66b3d33988979510ba0dba23e33d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a57e5969725a937e7c67bdd7644405404e6bf536","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                      \u0027will be used by ironic when building UEFI-bootable ISO \u0027"},{"line_number":260,"context_line":"                      \u0027out of kernel and ramdisk. Required for UEFI boot from \u0027"},{"line_number":261,"context_line":"                      \u0027partition images.\u0027)),"},{"line_number":262,"context_line":"    cfg.BoolOpt(\u0027heartbeats_require_agent_token\u0027,"},{"line_number":263,"context_line":"                default\u003dFalse,"},{"line_number":264,"context_line":"                help\u003d_(\u0027Setting if heartbeat processing should require an \u0027"},{"line_number":265,"context_line":"                       \u0027agent token, which is either provided upon lookup or \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_64f84dc0","line":262,"in_reply_to":"3fa7e38b_554aa1ac","updated":"2019-12-11 22:37:41.000000000","message":"They are functionally the same except in different areas of the code. One is if the API surface requires it, and the other is if conductor heartbeat processing requires it.\n\nWe could use one setting, but I figured that I would also be disagreed with using just one so I split it apart. I don\u0027t see any issues just using one parameter under default configuration.","commit_id":"d57a2d226df66b3d33988979510ba0dba23e33d5"}],"ironic/conf/default.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e070fa400f922c80e7b0f6a758da504c5726e242","unresolved":false,"context_lines":[{"line_number":327,"context_line":"                        (\u0027json-rpc\u0027, _(\u0027use JSON RPC transport\u0027))],"},{"line_number":328,"context_line":"               help\u003d_(\u0027Which RPC transport implementation to use between \u0027"},{"line_number":329,"context_line":"                      \u0027conductor and API services\u0027)),"},{"line_number":330,"context_line":"    cfg.BoolOpt(\u0027require_agent_token\u0027,"},{"line_number":331,"context_line":"                default\u003dFalse,"},{"line_number":332,"context_line":"                help\u003d_(\u0027Used to require the use of agent tokens. These \u0027"},{"line_number":333,"context_line":"                       \u0027tokens are used to guard the api lookup endpoint and \u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_6db878c6","line":330,"updated":"2020-02-10 11:51:43.000000000","message":"We probably need a deprecation warning on start-up for require_agent_token\u003d\u003dFalse.","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a1aa7d38de093515165922169fc0ca462b18d604","unresolved":false,"context_lines":[{"line_number":327,"context_line":"                        (\u0027json-rpc\u0027, _(\u0027use JSON RPC transport\u0027))],"},{"line_number":328,"context_line":"               help\u003d_(\u0027Which RPC transport implementation to use between \u0027"},{"line_number":329,"context_line":"                      \u0027conductor and API services\u0027)),"},{"line_number":330,"context_line":"    cfg.BoolOpt(\u0027require_agent_token\u0027,"},{"line_number":331,"context_line":"                default\u003dFalse,"},{"line_number":332,"context_line":"                help\u003d_(\u0027Used to require the use of agent tokens. These \u0027"},{"line_number":333,"context_line":"                       \u0027tokens are used to guard the api lookup endpoint and \u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_8c5ccb80","line":330,"in_reply_to":"3fa7e38b_6db878c6","updated":"2020-02-10 21:20:47.000000000","message":"Likely a good idea, at least raise visibility since it is a nice hard breaking change once the option for it goes away.","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"}],"ironic/drivers/modules/deploy_utils.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e070fa400f922c80e7b0f6a758da504c5726e242","unresolved":false,"context_lines":[{"line_number":1515,"context_line":"    fields \u003d cleaning if node.clean_step else deployment"},{"line_number":1516,"context_line":"    if reboot is not None:"},{"line_number":1517,"context_line":"        info[fields[\u0027reboot\u0027]] \u003d reboot"},{"line_number":1518,"context_line":"        if reboot is True:"},{"line_number":1519,"context_line":"            if not info.get(\u0027agent_secret_token_pregenerated\u0027, False):"},{"line_number":1520,"context_line":"                info.pop(\u0027agent_secret_token\u0027, None)"},{"line_number":1521,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_2dae0080","line":1518,"range":{"start_line":1518,"start_character":0,"end_line":1518,"end_character":26},"updated":"2020-02-10 11:51:43.000000000","message":"\"if reboot\" (you already checked for None)","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a1aa7d38de093515165922169fc0ca462b18d604","unresolved":false,"context_lines":[{"line_number":1515,"context_line":"    fields \u003d cleaning if node.clean_step else deployment"},{"line_number":1516,"context_line":"    if reboot is not None:"},{"line_number":1517,"context_line":"        info[fields[\u0027reboot\u0027]] \u003d reboot"},{"line_number":1518,"context_line":"        if reboot is True:"},{"line_number":1519,"context_line":"            if not info.get(\u0027agent_secret_token_pregenerated\u0027, False):"},{"line_number":1520,"context_line":"                info.pop(\u0027agent_secret_token\u0027, None)"},{"line_number":1521,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_2cfb5748","line":1518,"range":{"start_line":1518,"start_character":0,"end_line":1518,"end_character":26},"in_reply_to":"3fa7e38b_2dae0080","updated":"2020-02-10 21:20:47.000000000","message":"Done","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dcd6abcdcfcb38a816df512292480c2b68c467a5","unresolved":false,"context_lines":[{"line_number":1517,"context_line":"        info[fields[\u0027reboot\u0027]] \u003d reboot"},{"line_number":1518,"context_line":"        if reboot:"},{"line_number":1519,"context_line":"            if not info.get(\u0027agent_secret_token_pregenerated\u0027, False):"},{"line_number":1520,"context_line":"                info.pop(\u0027agent_secret_token\u0027, None)"},{"line_number":1521,"context_line":""},{"line_number":1522,"context_line":"    if skip_current_step is not None:"},{"line_number":1523,"context_line":"        info[fields[\u0027skip\u0027]] \u003d skip_current_step"}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_dd499a65","line":1520,"updated":"2020-02-18 12:27:26.000000000","message":"These two lines may be worth separating into a helper function with an explanation why we do it","commit_id":"2114c08ffff0d538ad2628fc1d017e0390c1c73b"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"79e983e68036ce8a1a7689c6c7e228df558f37c3","unresolved":false,"context_lines":[{"line_number":1517,"context_line":"        info[fields[\u0027reboot\u0027]] \u003d reboot"},{"line_number":1518,"context_line":"        if reboot:"},{"line_number":1519,"context_line":"            if not info.get(\u0027agent_secret_token_pregenerated\u0027, False):"},{"line_number":1520,"context_line":"                info.pop(\u0027agent_secret_token\u0027, None)"},{"line_number":1521,"context_line":""},{"line_number":1522,"context_line":"    if skip_current_step is not None:"},{"line_number":1523,"context_line":"        info[fields[\u0027skip\u0027]] \u003d skip_current_step"}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_f1b3560b","line":1520,"in_reply_to":"3fa7e38b_dd499a65","updated":"2020-02-20 19:19:11.000000000","message":"Good point, done.","commit_id":"2114c08ffff0d538ad2628fc1d017e0390c1c73b"}],"ironic/tests/unit/api/controllers/v1/test_ramdisk.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e070fa400f922c80e7b0f6a758da504c5726e242","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def _set_secret_mock(self, node, token_value):"},{"line_number":59,"context_line":"        driver_internal \u003d node.driver_internal_info"},{"line_number":60,"context_line":"        driver_internal[\u0027agent_secret_token\u0027] \u003d token_value"},{"line_number":61,"context_line":"        node.driver_internal_info \u003d driver_internal"},{"line_number":62,"context_line":"        self.mock_generate_agent_token.return_value \u003d node"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def _check_config(self, data):"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_2de360d9","line":61,"updated":"2020-02-10 11:51:43.000000000","message":"nit: if you don\u0027t use save(), you can modify driver_internal_info directly","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a1aa7d38de093515165922169fc0ca462b18d604","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def _set_secret_mock(self, node, token_value):"},{"line_number":59,"context_line":"        driver_internal \u003d node.driver_internal_info"},{"line_number":60,"context_line":"        driver_internal[\u0027agent_secret_token\u0027] \u003d token_value"},{"line_number":61,"context_line":"        node.driver_internal_info \u003d driver_internal"},{"line_number":62,"context_line":"        self.mock_generate_agent_token.return_value \u003d node"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def _check_config(self, data):"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_8c460b7e","line":61,"in_reply_to":"3fa7e38b_2de360d9","updated":"2020-02-10 21:20:47.000000000","message":"true, being a helper it is likely for the best to leave it this way in case someone goes down that path and goes \"what?!?\" one day.","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"}],"ironic/tests/unit/conductor/test_manager.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e070fa400f922c80e7b0f6a758da504c5726e242","unresolved":false,"context_lines":[{"line_number":6999,"context_line":""},{"line_number":7000,"context_line":"    # TODO(TheJulia): We should double check if these heartbeat tests need"},{"line_number":7001,"context_line":"    # to move. I have this strange feeling we were lacking rpc testing of"},{"line_number":7002,"context_line":"    # heartbeat until we did adoption testing...."},{"line_number":7003,"context_line":""},{"line_number":7004,"context_line":"    @mock.patch(\u0027ironic.drivers.modules.fake.FakeDeploy.heartbeat\u0027,"},{"line_number":7005,"context_line":"                autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_6d063888","line":7002,"updated":"2020-02-10 11:51:43.000000000","message":"We need to refactor the hell out of this file :)","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a1aa7d38de093515165922169fc0ca462b18d604","unresolved":false,"context_lines":[{"line_number":6999,"context_line":""},{"line_number":7000,"context_line":"    # TODO(TheJulia): We should double check if these heartbeat tests need"},{"line_number":7001,"context_line":"    # to move. I have this strange feeling we were lacking rpc testing of"},{"line_number":7002,"context_line":"    # heartbeat until we did adoption testing...."},{"line_number":7003,"context_line":""},{"line_number":7004,"context_line":"    @mock.patch(\u0027ironic.drivers.modules.fake.FakeDeploy.heartbeat\u0027,"},{"line_number":7005,"context_line":"                autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_2c1cb779","line":7002,"in_reply_to":"3fa7e38b_6d063888","updated":"2020-02-10 21:20:47.000000000","message":"Indeed.... :(","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e070fa400f922c80e7b0f6a758da504c5726e242","unresolved":false,"context_lines":[{"line_number":7067,"context_line":""},{"line_number":7068,"context_line":"        mock_spawn.reset_mock()"},{"line_number":7069,"context_line":""},{"line_number":7070,"context_line":"        def fake_spawn(conductor_obj, func, *args, **kwargs):"},{"line_number":7071,"context_line":"            func(*args, **kwargs)"},{"line_number":7072,"context_line":"            return mock.MagicMock()"},{"line_number":7073,"context_line":"        mock_spawn.side_effect \u003d fake_spawn"},{"line_number":7074,"context_line":""},{"line_number":7075,"context_line":"        self.assertRaises("}],"source_content_type":"text/x-python","patch_set":22,"id":"3fa7e38b_edf1c897","line":7072,"range":{"start_line":7070,"start_character":0,"end_line":7072,"end_character":35},"updated":"2020-02-10 11:51:43.000000000","message":"nit: can be a global function","commit_id":"acb003c6fa5ec48f6c4ef3c0d87fd8e490f7b5d3"}]}
