)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"6049598d1e005b895df642da0d1bc7ceb70a7583","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"This is the Nova side of the changes required to support Metadata"},{"line_number":12,"context_line":"service on overlapping Quantum networks."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I4dacd565e43e136e3faeb95184a4a2f7188415cd"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAMH%2F%2F4Sw%3D","line":13,"updated":"2012-11-18 07:46:45.000000000","message":"Will this work without the Quantum changes? That is, is it backwards compatible?","commit_id":"932d55d550d585062e4b39eb66c5e96400cb1c78"}],"nova/api/metadata/handler.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"6049598d1e005b895df642da0d1bc7ceb70a7583","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        except exception.NotFound:"},{"line_number":92,"context_line":"            return None"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        self._cache.set(cache_key, data, 15)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        return data"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAMH%2F%2F4So%3D","line":94,"updated":"2012-11-18 07:46:45.000000000","message":"Why 15?","commit_id":"932d55d550d585062e4b39eb66c5e96400cb1c78"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"6049598d1e005b895df642da0d1bc7ceb70a7583","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                    \u0027Please try your request again.\u0027)"},{"line_number":130,"context_line":"            raise webob.exc.HTTPInternalServerError(explanation\u003dunicode(msg))"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        if meta_data is None:"},{"line_number":133,"context_line":"            LOG.error(_(\u0027Failed to get metadata for ip: %s\u0027), remote_address)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        return meta_data"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAMH%2F%2F4Ss%3D","line":132,"updated":"2012-11-18 07:46:45.000000000","message":"Silly question - if there is an exception in self.get_metadata_by_remote_address then meta_data will not be defined. Is this possible?","commit_id":"932d55d550d585062e4b39eb66c5e96400cb1c78"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"3fbae0812ed622a4493600195ad8833ba022c00d","unresolved":false,"context_lines":[{"line_number":30,"context_line":"from nova.openstack.common import log as logging"},{"line_number":31,"context_line":"from nova import wsgi"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"CACHE_EXPIRATION \u003d 15  # in seconds"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"CONF \u003d cfg.CONF"},{"line_number":36,"context_line":"CONF.import_opt(\u0027memcached_servers\u0027, \u0027nova.config\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMH%2F%2F0%2B0%3D","line":33,"updated":"2012-11-21 01:06:41.000000000","message":"making the world a better place... i like that :P","commit_id":"84fe0194169aac1b79fb935802969aa351a23e53"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"3fbae0812ed622a4493600195ad8833ba022c00d","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \u0027service_quantum_metadata_proxy\u0027,"},{"line_number":42,"context_line":"        default\u003dFalse,"},{"line_number":43,"context_line":"        help\u003d\u0027Set flag to indicate Quantum will proxy metadata requests and \u0027"},{"line_number":44,"context_line":"             \u0027resolve instance ids.\u0027),"},{"line_number":45,"context_line":"     cfg.StrOpt("},{"line_number":46,"context_line":"         \u0027metadata_proxy_shared_secret\u0027,"},{"line_number":47,"context_line":"         default\u003d\u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMH%2F%2F0%2Bk%3D","line":44,"updated":"2012-11-21 01:06:41.000000000","message":"What can we do to help detect that people are trying to use Quantum, but have forgotten to set this flag?  I\u0027m assuming we don\u0027t want to default to honoring the INSTANCE-ID flag, as that would be insecure for deployments that leave the metadata service publicly available.  But perhaps we could print a warning  if they have this value set to False, but are seeing the INSTANCE-ID?","commit_id":"84fe0194169aac1b79fb935802969aa351a23e53"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"3fbae0812ed622a4493600195ad8833ba022c00d","unresolved":false,"context_lines":[{"line_number":45,"context_line":"     cfg.StrOpt("},{"line_number":46,"context_line":"         \u0027metadata_proxy_shared_secret\u0027,"},{"line_number":47,"context_line":"         default\u003d\u0027\u0027,"},{"line_number":48,"context_line":"         help\u003d\u0027Shared secret to validate proxies Quantum metadata requests\u0027)"},{"line_number":49,"context_line":"]"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"CONF.register_opts(metadata_proxy_opts)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMH%2F%2F0%2B4%3D","line":48,"updated":"2012-11-21 01:06:41.000000000","message":"perhaps second option name should include quantum, so non-quantum users know they can ignore it.  I\u0027m guessing you didn\u0027t do this so that the names matched up with the option passed to the metadata agent.","commit_id":"84fe0194169aac1b79fb935802969aa351a23e53"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"b499818d46d764f6a9e6e700f05c2768526c79a5","unresolved":false,"context_lines":[{"line_number":39,"context_line":"metadata_proxy_opts \u003d ["},{"line_number":40,"context_line":"    cfg.BoolOpt("},{"line_number":41,"context_line":"        \u0027service_quantum_metadata_proxy\u0027,"},{"line_number":42,"context_line":"        default\u003dFalse,"},{"line_number":43,"context_line":"        help\u003d\u0027Set flag to indicate Quantum will proxy metadata requests and \u0027"},{"line_number":44,"context_line":"             \u0027resolve instance ids.\u0027),"},{"line_number":45,"context_line":"     cfg.StrOpt("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAMH%2F%2FyHo%3D","line":42,"updated":"2012-11-25 01:25:01.000000000","message":"Why not use request header to do this automatically? If we have this configuration, the metadata server will not be able to deal with VMs with nova-network.","commit_id":"8d9bdf13c328764331ec78cd2fa60f564758f85d"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"88b3c231f50746f48b0a2da631bc4160f3e89728","unresolved":false,"context_lines":[{"line_number":39,"context_line":"metadata_proxy_opts \u003d ["},{"line_number":40,"context_line":"    cfg.BoolOpt("},{"line_number":41,"context_line":"        \u0027service_quantum_metadata_proxy\u0027,"},{"line_number":42,"context_line":"        default\u003dFalse,"},{"line_number":43,"context_line":"        help\u003d\u0027Set flag to indicate Quantum will proxy metadata requests and \u0027"},{"line_number":44,"context_line":"             \u0027resolve instance ids.\u0027),"},{"line_number":45,"context_line":"     cfg.StrOpt("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAMH%2F%2Fw5Y%3D","line":42,"in_reply_to":"AAAAMH%2F%2FyHo%3D","updated":"2012-11-26 20:23:45.000000000","message":"When this flag is set, any VM can then spoof metadata requests for any instance-id.  That\u0027s why important for deployers to make the choice to set this flag and change the behavior of the metadata server.  When this flag is set, the metadata server should be run on the management network.","commit_id":"8d9bdf13c328764331ec78cd2fa60f564758f85d"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"8d9ddb7ac0dc5d88d233e48c1d01d10b5e3a804f","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    cfg.BoolOpt("},{"line_number":41,"context_line":"        \u0027service_quantum_metadata_proxy\u0027,"},{"line_number":42,"context_line":"        default\u003dFalse,"},{"line_number":43,"context_line":"        help\u003d\u0027Set flag to indicate Quantum will proxy metadata requests and \u0027"},{"line_number":44,"context_line":"             \u0027resolve instance ids.\u0027),"},{"line_number":45,"context_line":"     cfg.StrOpt("},{"line_number":46,"context_line":"         \u0027quantum_metadata_proxy_shared_secret\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAMH%2F%2FwSQ%3D","line":43,"updated":"2012-11-27 02:39:49.000000000","message":"sounds good.","commit_id":"8d9bdf13c328764331ec78cd2fa60f564758f85d"}],"nova/tests/test_metadata.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"4ed56bc238b937d5beda2de3fc9ac71868515d81","unresolved":false,"context_lines":[{"line_number":415,"context_line":"        expected_instance_id \u003d \u0027a-b-c-d\u0027"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"        def fake_get_metadata(instance_id, remote_address):"},{"line_number":418,"context_line":"            if instance_id \u003d\u003d expected_instance_id:"},{"line_number":419,"context_line":"                return self.mdinst"},{"line_number":420,"context_line":"            else:"},{"line_number":421,"context_line":"                raise Exception(\"Expected instance_id of %s, got %s\" %"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAMH%2F%2FuBw%3D","line":418,"updated":"2012-11-28 20:23:53.000000000","message":"I suggest using self.assertEqual(instance_id, expected_instance_id) here.","commit_id":"8d9bdf13c328764331ec78cd2fa60f564758f85d"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"d81e06baf52aa6d4ff798d7c1e816d79c32e1ab9","unresolved":false,"context_lines":[{"line_number":415,"context_line":"        expected_instance_id \u003d \u0027a-b-c-d\u0027"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"        def fake_get_metadata(instance_id, remote_address):"},{"line_number":418,"context_line":"            if instance_id \u003d\u003d expected_instance_id:"},{"line_number":419,"context_line":"                return self.mdinst"},{"line_number":420,"context_line":"            else:"},{"line_number":421,"context_line":"                raise Exception(\"Expected instance_id of %s, got %s\" %"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAMH%2F%2Frmk%3D","line":418,"in_reply_to":"AAAAMH%2F%2FrtQ%3D","updated":"2012-11-30 18:29:29.000000000","message":"Good suggestion. I\u0027ve added one.","commit_id":"8d9bdf13c328764331ec78cd2fa60f564758f85d"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"6c2d1dabe373606776e8f72e207c04435ad5d00e","unresolved":false,"context_lines":[{"line_number":415,"context_line":"        expected_instance_id \u003d \u0027a-b-c-d\u0027"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"        def fake_get_metadata(instance_id, remote_address):"},{"line_number":418,"context_line":"            if instance_id \u003d\u003d expected_instance_id:"},{"line_number":419,"context_line":"                return self.mdinst"},{"line_number":420,"context_line":"            else:"},{"line_number":421,"context_line":"                raise Exception(\"Expected instance_id of %s, got %s\" %"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAMH%2F%2FrtQ%3D","line":418,"in_reply_to":"AAAAMH%2F%2FrvE%3D","updated":"2012-11-30 17:21:21.000000000","message":"Ah, I see; I was looking for an assertRaises() below, and didn\u0027t see one.  (If you had, I would have suggested raising TestingException…)  Perhaps it would be worthwhile to add a comment here explaining that this is for testing an exception trap in the handler?","commit_id":"8d9bdf13c328764331ec78cd2fa60f564758f85d"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"b11a578f1355cbaeeca53685c03812ae54cd3b73","unresolved":false,"context_lines":[{"line_number":415,"context_line":"        expected_instance_id \u003d \u0027a-b-c-d\u0027"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"        def fake_get_metadata(instance_id, remote_address):"},{"line_number":418,"context_line":"            if instance_id \u003d\u003d expected_instance_id:"},{"line_number":419,"context_line":"                return self.mdinst"},{"line_number":420,"context_line":"            else:"},{"line_number":421,"context_line":"                raise Exception(\"Expected instance_id of %s, got %s\" %"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAMH%2F%2FrvE%3D","line":418,"in_reply_to":"AAAAMH%2F%2FuBw%3D","updated":"2012-11-30 17:02:24.000000000","message":"This exception is a little different.  It actually exercises a bit of code in the handler to trap exceptions and return a 500.  Using an assertEqual to raise an exception to test that code does not feel right.  Thoughts?","commit_id":"8d9bdf13c328764331ec78cd2fa60f564758f85d"}]}
