)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"b1215d0874dec7ee25df954d6adf71e4d45c4c26","unresolved":false,"context_lines":[{"line_number":11,"context_line":"before registration. This ensures that any locks that are stuck when a"},{"line_number":12,"context_line":"conductor shuts down are cleared when the conductor starts again."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partial-Bug: #1382698"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I0c3c2a9c94b6a85a1cbbcc570f57c3c34c256092"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a930d6b_af52f6da","line":14,"updated":"2015-01-22 11:04:50.000000000","message":"The bug is marked as fixed committed, we should re-open it if the problem is not solved yet.","commit_id":"7e84783dd77df51ef9118dfddcb842fbf2c9737e"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"428678c9ba8a407e573813cd6367950ad918526c","unresolved":false,"context_lines":[{"line_number":11,"context_line":"before registration. This ensures that any locks that are stuck when a"},{"line_number":12,"context_line":"conductor shuts down are cleared when the conductor starts again."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partial-Bug: #1382698"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I0c3c2a9c94b6a85a1cbbcc570f57c3c34c256092"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a930d6b_e1ab1b1c","line":14,"in_reply_to":"1a930d6b_af52f6da","updated":"2015-01-22 22:04:29.000000000","message":"The commit that fixes this bug should actually fix it, however this patch is extra insurance on top.","commit_id":"7e84783dd77df51ef9118dfddcb842fbf2c9737e"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7a2144452c27a1a7863cabc9db9c48e2d346b5b1","unresolved":false,"context_lines":[{"line_number":11,"context_line":"before registration. This ensures that any locks that are stuck when a"},{"line_number":12,"context_line":"conductor shuts down are cleared when the conductor starts again."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partial-Bug: #1382698"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I0c3c2a9c94b6a85a1cbbcc570f57c3c34c256092"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a930d6b_067e6b6b","line":14,"in_reply_to":"1a930d6b_e1ab1b1c","updated":"2015-01-23 10:06:00.000000000","message":"gotcha!","commit_id":"7e84783dd77df51ef9118dfddcb842fbf2c9737e"}],"ironic/db/sqlalchemy/api.py":[{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"31b6a572f4580508197adcc1b2ac25f545cfc3b9","unresolved":false,"context_lines":[{"line_number":556,"context_line":"        with session.begin():"},{"line_number":557,"context_line":"            query \u003d model_query(models.Node, session\u003dsession).filter_by("},{"line_number":558,"context_line":"                    reservation\u003dhostname)"},{"line_number":559,"context_line":"            query.update({\u0027reservation\u0027: None})"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"    def get_active_driver_dict(self, interval\u003dNone):"},{"line_number":562,"context_line":"        if interval is None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_e4bfaea8","line":559,"updated":"2015-01-22 19:48:54.000000000","message":"Let\u0027s log which nodes are unlocked for us to have a record of it.","commit_id":"7e84783dd77df51ef9118dfddcb842fbf2c9737e"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"428678c9ba8a407e573813cd6367950ad918526c","unresolved":false,"context_lines":[{"line_number":556,"context_line":"        with session.begin():"},{"line_number":557,"context_line":"            query \u003d model_query(models.Node, session\u003dsession).filter_by("},{"line_number":558,"context_line":"                    reservation\u003dhostname)"},{"line_number":559,"context_line":"            query.update({\u0027reservation\u0027: None})"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"    def get_active_driver_dict(self, interval\u003dNone):"},{"line_number":562,"context_line":"        if interval is None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_8145f771","line":559,"in_reply_to":"1a930d6b_e4bfaea8","updated":"2015-01-22 22:04:29.000000000","message":"Will do","commit_id":"7e84783dd77df51ef9118dfddcb842fbf2c9737e"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"94b551563f555e6ec2bb1abecf03eb2c981aa3df","unresolved":false,"context_lines":[{"line_number":559,"context_line":"                    reservation\u003dhostname)"},{"line_number":560,"context_line":"            for node in query.all():"},{"line_number":561,"context_line":"                LOG.warn(_LW(\u0027Clearing reservation of node %s by \u0027"},{"line_number":562,"context_line":"                             \u0027conductor %s\u0027), node[\u0027uuid\u0027], hostname)"},{"line_number":563,"context_line":"            query.update({\u0027reservation\u0027: None})"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"    def get_active_driver_dict(self, interval\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a930d6b_06282b33","line":562,"updated":"2015-01-23 10:16:11.000000000","message":"i18n: Messages with more than one variable should use interpolation, so translations can move them around.\n\nLOG.warn(_LW(\u0027Clearing reservation of node %(node)s by conductor %(hostname)s\u0027), {\u0027node\u0027: node[\u0027uuid\u0027], \u0027hostname\u0027: hostname})","commit_id":"2eabb3bff3924a71ecb24bc7178aa09694cbca92"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"1453f6a741aa825030f97ef48ab56f0a7765149d","unresolved":false,"context_lines":[{"line_number":560,"context_line":"            for node in query.all():"},{"line_number":561,"context_line":"                LOG.warn(_LW(\u0027Clearing reservation of node %s by \u0027"},{"line_number":562,"context_line":"                             \u0027conductor %s\u0027), node[\u0027uuid\u0027], hostname)"},{"line_number":563,"context_line":"            query.update({\u0027reservation\u0027: None})"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"    def get_active_driver_dict(self, interval\u003dNone):"},{"line_number":566,"context_line":"        if interval is None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a930d6b_8dce06b3","line":563,"updated":"2015-01-23 00:05:35.000000000","message":"This could be misleading. This will log that all of the nodes have been cleared, but the update() may fail (and since it is a bulk operation, either ALL are updated, or none of them are). I think you should do the update() first, then log all of the nodes.","commit_id":"2eabb3bff3924a71ecb24bc7178aa09694cbca92"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"30b9db20d2e9ba5563607b065d974312c91e399d","unresolved":false,"context_lines":[{"line_number":560,"context_line":"            for node in query.all():"},{"line_number":561,"context_line":"                LOG.warn(_LW(\u0027Clearing reservation of node %s by \u0027"},{"line_number":562,"context_line":"                             \u0027conductor %s\u0027), node[\u0027uuid\u0027], hostname)"},{"line_number":563,"context_line":"            query.update({\u0027reservation\u0027: None})"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"    def get_active_driver_dict(self, interval\u003dNone):"},{"line_number":566,"context_line":"        if interval is None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a930d6b_fcb567ee","line":563,"in_reply_to":"1a930d6b_46d23301","updated":"2015-01-23 13:30:24.000000000","message":"+1 to using info and only doing a generic logging in the end","commit_id":"2eabb3bff3924a71ecb24bc7178aa09694cbca92"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"94b551563f555e6ec2bb1abecf03eb2c981aa3df","unresolved":false,"context_lines":[{"line_number":560,"context_line":"            for node in query.all():"},{"line_number":561,"context_line":"                LOG.warn(_LW(\u0027Clearing reservation of node %s by \u0027"},{"line_number":562,"context_line":"                             \u0027conductor %s\u0027), node[\u0027uuid\u0027], hostname)"},{"line_number":563,"context_line":"            query.update({\u0027reservation\u0027: None})"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"    def get_active_driver_dict(self, interval\u003dNone):"},{"line_number":566,"context_line":"        if interval is None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a930d6b_46d23301","line":563,"in_reply_to":"1a930d6b_8dce06b3","updated":"2015-01-23 10:16:11.000000000","message":"+1 for the update to be invoked first. Perhaps we could do something like:\n\n count \u003d query.update({\u0027reservation\u0027: None})\n if count \u003e 0:\n     LOG.info(_LI(\u0027Cleared any reservation(s) held by %s\u0027), hostname)\n\nI also changed the log from warn to info, because at that point the reservations are already cleared, so the task was completed successfully.","commit_id":"2eabb3bff3924a71ecb24bc7178aa09694cbca92"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"c025d986447b754e9af23382c62db3887f46df2b","unresolved":false,"context_lines":[{"line_number":560,"context_line":"            for node in query.all():"},{"line_number":561,"context_line":"                LOG.warn(_LW(\u0027Clearing reservation of node %s by \u0027"},{"line_number":562,"context_line":"                             \u0027conductor %s\u0027), node[\u0027uuid\u0027], hostname)"},{"line_number":563,"context_line":"            query.update({\u0027reservation\u0027: None})"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"    def get_active_driver_dict(self, interval\u003dNone):"},{"line_number":566,"context_line":"        if interval is None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a930d6b_02372e4f","line":563,"in_reply_to":"1a930d6b_fcb567ee","updated":"2015-01-23 14:22:41.000000000","message":"Jim, I would suggest building a list of node UUIDs inside the context manager, and logging them *outside* of it (after the commit has been successfully executed).","commit_id":"2eabb3bff3924a71ecb24bc7178aa09694cbca92"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3c6ff964756c9c80e9e0adee6de1f51e8d5b15c1","unresolved":false,"context_lines":[{"line_number":558,"context_line":"        with session.begin():"},{"line_number":559,"context_line":"            query \u003d model_query(models.Node, session\u003dsession).filter_by("},{"line_number":560,"context_line":"                    reservation\u003dhostname)"},{"line_number":561,"context_line":"            for node in query.all():"},{"line_number":562,"context_line":"                nodes.append(node[\u0027uuid\u0027])"},{"line_number":563,"context_line":"            query.update({\u0027reservation\u0027: None})"},{"line_number":564,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_4e087d2d","line":561,"updated":"2015-01-23 15:37:37.000000000","message":"all() is not needed","commit_id":"322a9f8847d537b22563fbc6916f067609ae35ce"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3c6ff964756c9c80e9e0adee6de1f51e8d5b15c1","unresolved":false,"context_lines":[{"line_number":559,"context_line":"            query \u003d model_query(models.Node, session\u003dsession).filter_by("},{"line_number":560,"context_line":"                    reservation\u003dhostname)"},{"line_number":561,"context_line":"            for node in query.all():"},{"line_number":562,"context_line":"                nodes.append(node[\u0027uuid\u0027])"},{"line_number":563,"context_line":"            query.update({\u0027reservation\u0027: None})"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        if nodes:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_4e5a3d51","line":562,"updated":"2015-01-23 15:37:37.000000000","message":"more efficient would be to query only for uuid, not for the whole Node object","commit_id":"322a9f8847d537b22563fbc6916f067609ae35ce"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"f058669addd40267c2424cebd30c9ac91e28b2e6","unresolved":false,"context_lines":[{"line_number":559,"context_line":"            query \u003d model_query(models.Node, session\u003dsession).filter_by("},{"line_number":560,"context_line":"                    reservation\u003dhostname)"},{"line_number":561,"context_line":"            for node in query.all():"},{"line_number":562,"context_line":"                nodes.append(node[\u0027uuid\u0027])"},{"line_number":563,"context_line":"            query.update({\u0027reservation\u0027: None})"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        if nodes:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_4ed79dbf","line":562,"updated":"2015-01-23 16:48:14.000000000","message":"nit:\n\nnodes \u003d [node[\u0027uuid\u0027] for node in query]","commit_id":"322a9f8847d537b22563fbc6916f067609ae35ce"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"f058669addd40267c2424cebd30c9ac91e28b2e6","unresolved":false,"context_lines":[{"line_number":565,"context_line":"        if nodes:"},{"line_number":566,"context_line":"            nodes \u003d \u0027, \u0027.join(nodes)"},{"line_number":567,"context_line":"            LOG.warn(_LW(\u0027Cleared reservations held by %(hostname)s: \u0027"},{"line_number":568,"context_line":"                         \u0027%(nodes)s\u0027), hostname, nodes)"},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"    def get_active_driver_dict(self, interval\u003dNone):"},{"line_number":571,"context_line":"        if interval is None:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_9b2d4049","line":568,"updated":"2015-01-23 16:48:14.000000000","message":"I might be wrong, but we don\u0027t need a mapping (dict)? Since these are interpolated and not positional arguments?","commit_id":"322a9f8847d537b22563fbc6916f067609ae35ce"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"0dc07d6d102d45f816687c52833135f0fc7ee8ee","unresolved":false,"context_lines":[{"line_number":565,"context_line":"        if nodes:"},{"line_number":566,"context_line":"            nodes \u003d \u0027, \u0027.join(nodes)"},{"line_number":567,"context_line":"            LOG.warn(_LW(\u0027Cleared reservations held by %(hostname)s: \u0027"},{"line_number":568,"context_line":"                         \u0027%(nodes)s\u0027), hostname, nodes)"},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"    def get_active_driver_dict(self, interval\u003dNone):"},{"line_number":571,"context_line":"        if interval is None:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_96ea770d","line":568,"in_reply_to":"1a930d6b_9b2d4049","updated":"2015-01-23 16:59:22.000000000","message":"Standard is here: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-translated-messages","commit_id":"322a9f8847d537b22563fbc6916f067609ae35ce"}]}
