)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"31d807977323cbe25f22fcaa5c9b5d7f75962450","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Resources could be created before the extension was enabled in the"},{"line_number":10,"context_line":"setup. In that case, no bindings are created for them. In that case, we"},{"line_number":11,"context_line":"should gracefully return default (True) value when extracting the value"},{"line_number":12,"context_line":"using the mixin; and we should also create binding model on update"},{"line_number":13,"context_line":"request, if there is no existing binding model for the resource."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1af94dfe_ddad7a9c","line":11,"updated":"2016-03-18 04:44:02.000000000","message":"I think that gracefully populating bindings like you did may be problematic. If the DB migration worked correctly this problem would not occur so I\u0027d rather nail down why this is happening in the first place.\n\nThe use case of toggling the extension and making the code handle the potential lack of binding is an interesting one, but I wonder if this is a widespread problem throughout our codebase. That\u0027s why extensions are bad :)","commit_id":"e08bc7ddeb7862c8c8ab3468a4d9e3ef0ea32ba6"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"14a733529f42bd696beef0e159a97af8ae383ead","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Resources could be created before the extension was enabled in the"},{"line_number":10,"context_line":"setup. In that case, no bindings are created for them. In that case, we"},{"line_number":11,"context_line":"should gracefully return default (True) value when extracting the value"},{"line_number":12,"context_line":"using the mixin; and we should also create binding model on update"},{"line_number":13,"context_line":"request, if there is no existing binding model for the resource."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa0719c6_1db021f4","line":11,"in_reply_to":"1af94dfe_ddad7a9c","updated":"2016-03-21 11:02:43.000000000","message":"The migration rule worked fine, it\u0027s what happened AFTER the alembic migration applied that matters: since the extension was not enabled for Kilo, and is enabled only when switching to Liberty, you have networks and ports that were created during Kilo time without bindings in place.\n\nWhether extensions are bad or good, they are there, and you need to allow existing users to enable them somehow in release that is not the very first one that introduced the extension [seems rather reasonable to allow folks to opt in later?]\n\nThe fact that we may have other bugs in other extension db code should not stop us from fixing the bug for port security. It\u0027s a common issue, and affects 3party subprojects too. F.e. see the hack in midonet plugin to work that around: https://review.openstack.org/#/c/245657/1/midonet/neutron/plugin_v2.py\n\nEven when we talk about ml2, it\u0027s common to enable extensions in later cycles. For example, the bug was reopened by our Ansible friends since they enable the extension in Liberty. Some other distributions also consider enabling the extension in a release that is later than Kilo.","commit_id":"e08bc7ddeb7862c8c8ab3468a4d9e3ef0ea32ba6"}],"neutron/db/portsecurity_db_common.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"31d807977323cbe25f22fcaa5c9b5d7f75962450","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        except exc.NoResultFound:"},{"line_number":83,"context_line":"            # NOTE(ihrachys) the resource may have been created before port"},{"line_number":84,"context_line":"            # security extension was enabled; return default value"},{"line_number":85,"context_line":"            return True"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _get_port_security_binding(self, context, port_id):"},{"line_number":88,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_42606b01","line":85,"updated":"2016-03-18 04:44:02.000000000","message":"you\u0027re then masking the potential error where the lack of binding is the result of a genuine error. We should figure out a different way to tackle this problem.","commit_id":"e08bc7ddeb7862c8c8ab3468a4d9e3ef0ea32ba6"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"14a733529f42bd696beef0e159a97af8ae383ead","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        except exc.NoResultFound:"},{"line_number":83,"context_line":"            # NOTE(ihrachys) the resource may have been created before port"},{"line_number":84,"context_line":"            # security extension was enabled; return default value"},{"line_number":85,"context_line":"            return True"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _get_port_security_binding(self, context, port_id):"},{"line_number":88,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_dd086994","line":85,"in_reply_to":"1af94dfe_42606b01","updated":"2016-03-21 11:02:43.000000000","message":"We have tests for db code that trigger the change for the resource attribute and check that it\u0027s changed. If we have other potential holes somewhere, it\u0027s a matter of fixing the genuine errors where they occur, not exposing all poor folks who were unlucky not to opt in the new feature in Kilo to exceptions in db code.","commit_id":"e08bc7ddeb7862c8c8ab3468a4d9e3ef0ea32ba6"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"02be8bac913b38e98a4725a41c14dad7e2437c96","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        except exc.NoResultFound:"},{"line_number":83,"context_line":"            # NOTE(ihrachys) the resource may have been created before port"},{"line_number":84,"context_line":"            # security extension was enabled; return default value"},{"line_number":85,"context_line":"            return True"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _get_port_security_binding(self, context, port_id):"},{"line_number":88,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_81b5a332","line":85,"in_reply_to":"fa0719c6_b673e814","updated":"2016-03-22 14:39:31.000000000","message":"Gary, what would be the steps from operators to solve that issue? I can\u0027t think of any. I don\u0027t believe we should trigger log messages when there is nothing that ops could do about it; [and honestly, nothing wrong is going on].","commit_id":"e08bc7ddeb7862c8c8ab3468a4d9e3ef0ea32ba6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2a91b2ad8e7357ae89ea6f59f2356ef08d8fb1bd","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        except exc.NoResultFound:"},{"line_number":83,"context_line":"            # NOTE(ihrachys) the resource may have been created before port"},{"line_number":84,"context_line":"            # security extension was enabled; return default value"},{"line_number":85,"context_line":"            return True"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _get_port_security_binding(self, context, port_id):"},{"line_number":88,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_b673e814","line":85,"in_reply_to":"fa0719c6_dd086994","updated":"2016-03-22 06:09:03.000000000","message":"If we do go down this route then we need at least a LOG.warning/info here so that an admin can get some idea that something dodgy occurred.","commit_id":"e08bc7ddeb7862c8c8ab3468a4d9e3ef0ea32ba6"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"31d807977323cbe25f22fcaa5c9b5d7f75962450","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        except exc.NoResultFound:"},{"line_number":94,"context_line":"            # NOTE(ihrachys) the resource may have been created before port"},{"line_number":95,"context_line":"            # security extension was enabled; return default value"},{"line_number":96,"context_line":"            return True"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def _process_port_port_security_update("},{"line_number":99,"context_line":"        self, context, port_req, port_res):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_225d5f47","line":96,"updated":"2016-03-18 04:44:02.000000000","message":"ditto","commit_id":"e08bc7ddeb7862c8c8ab3468a4d9e3ef0ea32ba6"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"31d807977323cbe25f22fcaa5c9b5d7f75962450","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        except exc.NoResultFound:"},{"line_number":111,"context_line":"            # NOTE(ihrachys) the resource may have been created before port"},{"line_number":112,"context_line":"            # security extension was enabled; create the binding model"},{"line_number":113,"context_line":"            self._process_port_port_security_create("},{"line_number":114,"context_line":"                context, port_req, port_res)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def _process_network_port_security_update("}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_dd0bba22","line":113,"updated":"2016-03-18 04:44:02.000000000","message":"I fear that this may end up causing scenarios where the bindings automagically pop up despite they have been removed.","commit_id":"e08bc7ddeb7862c8c8ab3468a4d9e3ef0ea32ba6"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"14a733529f42bd696beef0e159a97af8ae383ead","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        except exc.NoResultFound:"},{"line_number":111,"context_line":"            # NOTE(ihrachys) the resource may have been created before port"},{"line_number":112,"context_line":"            # security extension was enabled; create the binding model"},{"line_number":113,"context_line":"            self._process_port_port_security_create("},{"line_number":114,"context_line":"                context, port_req, port_res)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def _process_network_port_security_update("}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_dd2fc9f4","line":113,"in_reply_to":"1af94dfe_dd0bba22","updated":"2016-03-21 11:02:43.000000000","message":"Well, if you call update for the attribute, don\u0027t you expect something to be stored in the database?","commit_id":"e08bc7ddeb7862c8c8ab3468a4d9e3ef0ea32ba6"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"04309f00e69675e015051b5ac4c7dfa205f687f4","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            binding \u003d query.filter("},{"line_number":80,"context_line":"                NetworkSecurityBinding.network_id \u003d\u003d network_id).one()"},{"line_number":81,"context_line":"        except exc.NoResultFound:"},{"line_number":82,"context_line":"            raise psec.PortSecurityBindingNotFound()"},{"line_number":83,"context_line":"        return binding.port_security_enabled"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def _get_port_security_binding(self, context, port_id):"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa0719c6_f3e9ce81","side":"PARENT","line":82,"updated":"2016-03-22 16:50:41.000000000","message":"that exception should be removed now.","commit_id":"89e8e2a9c52368be037f31057a81808871e7fa46"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b99fc0a6024c2774a3b12cbb29b42e453f78b26e","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        except exc.NoResultFound:"},{"line_number":92,"context_line":"            # NOTE(ihrachys) the resource may have been created before port"},{"line_number":93,"context_line":"            # security extension was enabled; return default value"},{"line_number":94,"context_line":"            return True"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _get_port_security_binding(self, context, port_id):"},{"line_number":97,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa0719c6_a790b444","line":94,"updated":"2016-03-22 16:39:08.000000000","message":"you\u0027re hardcoding a default value; though that\u0027s not likely to change, ideally you would use the one defined in the extension file","commit_id":"5d53bcda7285eafe599f1dadad1e39f584740f79"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"04309f00e69675e015051b5ac4c7dfa205f687f4","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        except exc.NoResultFound:"},{"line_number":92,"context_line":"            # NOTE(ihrachys) the resource may have been created before port"},{"line_number":93,"context_line":"            # security extension was enabled; return default value"},{"line_number":94,"context_line":"            return True"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _get_port_security_binding(self, context, port_id):"},{"line_number":97,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa0719c6_d3d5aab9","line":94,"in_reply_to":"fa0719c6_a790b444","updated":"2016-03-22 16:50:41.000000000","message":"Right. I also need some more clean ups here, like killing an exception not used anymore.","commit_id":"5d53bcda7285eafe599f1dadad1e39f584740f79"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"85846d355bfcf3f2f8cdd1cbc4a6f429af9479eb","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        except exc.NoResultFound:"},{"line_number":92,"context_line":"            # NOTE(ihrachys) the resource may have been created before port"},{"line_number":93,"context_line":"            # security extension was enabled; return default value"},{"line_number":94,"context_line":"            return True"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _get_port_security_binding(self, context, port_id):"},{"line_number":97,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa0719c6_08664f50","line":94,"in_reply_to":"fa0719c6_d3d5aab9","updated":"2016-03-24 16:32:48.000000000","message":"Done","commit_id":"5d53bcda7285eafe599f1dadad1e39f584740f79"}],"neutron/tests/unit/plugins/ml2/extensions/test_port_security.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8d49aeee249cb8921e0937c98368d8cc2673100c","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from neutron.tests.unit.plugins.ml2 import test_plugin"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class TestML2ExtensionPortSecurity(test_plugin.Ml2PluginV2TestCase):"},{"line_number":22,"context_line":"    def test_extend_port_dict_no_port_security(self):"},{"line_number":23,"context_line":"        \"\"\"Test _extend_port_security_dict won\u0027t crash"},{"line_number":24,"context_line":"        if port_security item is None"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa0719c6_c50afd20","side":"PARENT","line":21,"updated":"2016-03-22 16:53:24.000000000","message":"I guess I may want to implement some test cases for the class since now we don\u0027t even create the extension driver, which is regression in testing coverage.","commit_id":"89e8e2a9c52368be037f31057a81808871e7fa46"}]}
