)]}'
{"neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"ef06dc34417c0fe20b8b23b378a97f710e3a7d0b","unresolved":false,"context_lines":[{"line_number":563,"context_line":""},{"line_number":564,"context_line":"    def vxlan_module_supported(self):"},{"line_number":565,"context_line":"        try:"},{"line_number":566,"context_line":"            utils.execute(cmd\u003d[\u0027grep\u0027, \u0027^vxlan\\\\b\u0027, \u0027/proc/modules\u0027])"},{"line_number":567,"context_line":"            return True"},{"line_number":568,"context_line":"        except RuntimeError:"},{"line_number":569,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_5cc93459","line":566,"updated":"2014-07-09 18:59:48.000000000","message":"Why are we executing grep?  Can\u0027t we do with file()?","commit_id":"a2a73ac3107fd68f92790671e56eae07488dfe10"},{"author":{"_account_id":7217,"name":"Hugh Saunders","email":"hugh@wherenow.org","username":"hughsaunders"},"change_message_id":"a896a82e0b38c9cdabf9527c6f8aaaeac7b7faca","unresolved":false,"context_lines":[{"line_number":563,"context_line":""},{"line_number":564,"context_line":"    def vxlan_module_supported(self):"},{"line_number":565,"context_line":"        try:"},{"line_number":566,"context_line":"            utils.execute(cmd\u003d[\u0027grep\u0027, \u0027^vxlan\\\\b\u0027, \u0027/proc/modules\u0027])"},{"line_number":567,"context_line":"            return True"},{"line_number":568,"context_line":"        except RuntimeError:"},{"line_number":569,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_c79d5659","line":566,"in_reply_to":"baada198_5cc93459","updated":"2014-07-10 10:39:40.000000000","message":"Previously modinfo was executed, so I retained the structure but called grep instead. However I can see that it may be cheaper to save an execute and read the file directly. Fixed in patch set 2.","commit_id":"a2a73ac3107fd68f92790671e56eae07488dfe10"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"a6347aa56426761f08fe8800d0758dd92f3b5674","unresolved":false,"context_lines":[{"line_number":563,"context_line":""},{"line_number":564,"context_line":"    def vxlan_module_supported(self):"},{"line_number":565,"context_line":"        try:"},{"line_number":566,"context_line":"            utils.execute(cmd\u003d[\u0027grep\u0027, \u0027^vxlan\\\\b\u0027, \u0027/proc/modules\u0027])"},{"line_number":567,"context_line":"            return True"},{"line_number":568,"context_line":"        except RuntimeError:"},{"line_number":569,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_dc78e4fa","line":566,"in_reply_to":"baada198_5cc93459","updated":"2014-07-09 19:04:12.000000000","message":"return any(l.startswith(\u0027vxlan \u0027) for l in file(\u0027/proc/modules\u0027))","commit_id":"a2a73ac3107fd68f92790671e56eae07488dfe10"},{"author":{"_account_id":7217,"name":"Hugh Saunders","email":"hugh@wherenow.org","username":"hughsaunders"},"change_message_id":"a896a82e0b38c9cdabf9527c6f8aaaeac7b7faca","unresolved":false,"context_lines":[{"line_number":563,"context_line":""},{"line_number":564,"context_line":"    def vxlan_module_supported(self):"},{"line_number":565,"context_line":"        try:"},{"line_number":566,"context_line":"            utils.execute(cmd\u003d[\u0027grep\u0027, \u0027^vxlan\\\\b\u0027, \u0027/proc/modules\u0027])"},{"line_number":567,"context_line":"            return True"},{"line_number":568,"context_line":"        except RuntimeError:"},{"line_number":569,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_67e72ae5","line":566,"in_reply_to":"baada198_dc78e4fa","updated":"2014-07-10 10:39:40.000000000","message":"Thanks for the hint, startswith isn\u0027t quite equivalent as it would also match other modules such as vxlan-helper-module, but I will use a similar generator with a regex match.","commit_id":"a2a73ac3107fd68f92790671e56eae07488dfe10"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"9b2f053271ef058639e43c472643a4ad606b22a0","unresolved":false,"context_lines":[{"line_number":565,"context_line":"    def vxlan_module_supported(self):"},{"line_number":566,"context_line":"        try:"},{"line_number":567,"context_line":"            pattern \u003d re.compile(\u0027^vxlan\\\\b\u0027)"},{"line_number":568,"context_line":"            return any((pattern.match(line) for"},{"line_number":569,"context_line":"                line in open(\u0027/proc/modules\u0027)))"},{"line_number":570,"context_line":"        except IOError:"},{"line_number":571,"context_line":"            LOG.warning(_(\"Failed to read /proc/modules so cannot determine \""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_91254ac4","line":568,"updated":"2014-07-10 17:16:26.000000000","message":"I think you don\u0027t need double (\n\n any(pattern.match ...)\n\nworks too.","commit_id":"8e71424a3c1d02178abe9f18390d1b701892edf1"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"749d1f6c2bb997e3d189e3ae3f54cc9db5b52a1d","unresolved":false,"context_lines":[{"line_number":565,"context_line":"    def vxlan_module_supported(self):"},{"line_number":566,"context_line":"        try:"},{"line_number":567,"context_line":"            pattern \u003d re.compile(\u0027^vxlan\\\\b\u0027)"},{"line_number":568,"context_line":"            return any((pattern.match(line) for"},{"line_number":569,"context_line":"                line in open(\u0027/proc/modules\u0027)))"},{"line_number":570,"context_line":"        except IOError:"},{"line_number":571,"context_line":"            LOG.warning(_(\"Failed to read /proc/modules so cannot determine \""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_092eabab","line":568,"in_reply_to":"baada198_7055ad4e","updated":"2014-07-30 02:28:19.000000000","message":"+1, different distro has different behavior of module mgmt.\nI prefer the simple and stupid way, just test if vxlan port is created.","commit_id":"8e71424a3c1d02178abe9f18390d1b701892edf1"},{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"0d1fb54376f3c8476da9e559ba4b615edfd2904b","unresolved":false,"context_lines":[{"line_number":565,"context_line":"    def vxlan_module_supported(self):"},{"line_number":566,"context_line":"        try:"},{"line_number":567,"context_line":"            pattern \u003d re.compile(\u0027^vxlan\\\\b\u0027)"},{"line_number":568,"context_line":"            return any((pattern.match(line) for"},{"line_number":569,"context_line":"                line in open(\u0027/proc/modules\u0027)))"},{"line_number":570,"context_line":"        except IOError:"},{"line_number":571,"context_line":"            LOG.warning(_(\"Failed to read /proc/modules so cannot determine \""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_f6ac6737","line":568,"in_reply_to":"baada198_91254ac4","updated":"2014-07-21 06:46:09.000000000","message":"/proc/modules is never a large file, so consider just a simple multiline regex match:\n\n return bool(re.search(r\u0027^vxlan\\b\u0027, open(\u0027proc/modules\u0027).read(), re.MULTILINE))\n\n\nI appreciate the desire to give helpful error diagnostic messages when the environment looks like it can\u0027t support vxlan, *however* if we want to be truly robust to a minimal functional environment, then vxlan might be linked into the kernal and not a module at all.\n\nAll these *_supported() functions seem susceptible to similar original problems.  Should we instead just try to configure vxlan, and assume logging the failing command and its stderr will make it clear why it failed?  If we do want to provide more than that, then these diagnostics need to be demoted to non-fatal warnings or only run if/when the actual attempt to configure vxlan fails.  If the vxlan config succeeds, then who cares what was in /\u0027proc/modules?","commit_id":"8e71424a3c1d02178abe9f18390d1b701892edf1"},{"author":{"_account_id":7217,"name":"Hugh Saunders","email":"hugh@wherenow.org","username":"hughsaunders"},"change_message_id":"44617d0c6e12568ba005c2a0d4641aec2fbaff3e","unresolved":false,"context_lines":[{"line_number":565,"context_line":"    def vxlan_module_supported(self):"},{"line_number":566,"context_line":"        try:"},{"line_number":567,"context_line":"            pattern \u003d re.compile(\u0027^vxlan\\\\b\u0027)"},{"line_number":568,"context_line":"            return any((pattern.match(line) for"},{"line_number":569,"context_line":"                line in open(\u0027/proc/modules\u0027)))"},{"line_number":570,"context_line":"        except IOError:"},{"line_number":571,"context_line":"            LOG.warning(_(\"Failed to read /proc/modules so cannot determine \""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_7055ad4e","line":568,"in_reply_to":"baada198_f6ac6737","updated":"2014-07-21 14:32:19.000000000","message":"hmm, I agree, instead of checking for the module, maybe we should attempt to create a vxlan network, if it works, then all the prereqs are available.","commit_id":"8e71424a3c1d02178abe9f18390d1b701892edf1"}]}
