)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"2dc6e66c68e250fbe57f4600c976c9b534edadf0","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Guest Agent goes active before connecting to message queue"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"It seens Guest Agents are active before making sure that it can"},{"line_number":10,"context_line":" connect to amqp server. Clients who try to make API calls that"},{"line_number":11,"context_line":" require the Guest Agent, such as listing the databases for an"},{"line_number":12,"context_line":" instance result in HTTP errors."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7ac7a964_0c1cddc0","line":9,"updated":"2014-08-15 14:28:15.000000000","message":"seems","commit_id":"0492411cc6b8da0d8cbc99b50581cfa4775a6013"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"2dc6e66c68e250fbe57f4600c976c9b534edadf0","unresolved":false,"context_lines":[{"line_number":16,"context_line":" to Active status. If rpc connection failed it will go to"},{"line_number":17,"context_line":" BLOCKED status."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Also while in preper action, make sure guest agent goes active"},{"line_number":20,"context_line":" after all works in preper action is done. Change the preper"},{"line_number":21,"context_line":" method in mysql manager. Make sure all databases and users are"},{"line_number":22,"context_line":" created before guest agent goes ACTIVE. To prevent error user"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7ac7a964_ec77a100","line":19,"updated":"2014-08-15 14:28:15.000000000","message":"proper or prepare","commit_id":"0492411cc6b8da0d8cbc99b50581cfa4775a6013"}],"trove/cmd/guest.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"722bf4190bce1df1158d19a75755c7111a4c5fd3","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    if not debug_utils.enabled():"},{"line_number":51,"context_line":"        eventlet.monkey_patch(thread\u003dTrue)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    if not rpc_status.is_rpc_reachable:"},{"line_number":54,"context_line":"        msg \u003d (\"RPC Service is unreachable from guest %s\" % CONF.guest_id)"},{"line_number":55,"context_line":"        raise RuntimeError(msg)"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_fa2598c2","line":53,"updated":"2014-08-19 11:11:32.000000000","message":"if there is exactly one place where you make this check, and exactly once, why all the trouble of a class and stuff like that? why not just inline the code.\n\nI\u0027m not saying that\u0027s the right thing (see my comments on the patch set as a whole).","commit_id":"e97821125a7a4e769c9888623eb76700631e432c"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"722bf4190bce1df1158d19a75755c7111a4c5fd3","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        eventlet.monkey_patch(thread\u003dTrue)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    if not rpc_status.is_rpc_reachable:"},{"line_number":54,"context_line":"        msg \u003d (\"RPC Service is unreachable from guest %s\" % CONF.guest_id)"},{"line_number":55,"context_line":"        raise RuntimeError(msg)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    manager \u003d dbaas.datastore_registry().get(CONF.datastore_manager)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_9a990422","line":54,"updated":"2014-08-19 11:11:32.000000000","message":"Wrap this message for i18n","commit_id":"e97821125a7a4e769c9888623eb76700631e432c"}],"trove/common/rpc/service.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"722bf4190bce1df1158d19a75755c7111a4c5fd3","unresolved":false,"context_lines":[{"line_number":65,"context_line":"            LOG.debug(\"RPC connection reachable.\")"},{"line_number":66,"context_line":"            reachable \u003d True"},{"line_number":67,"context_line":"        except Exception as e:"},{"line_number":68,"context_line":"            LOG.debug(e)"},{"line_number":69,"context_line":"            LOG.debug(\"RPC connection unreachable.\")"},{"line_number":70,"context_line":"            reachable \u003d False"},{"line_number":71,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_7a642822","line":68,"updated":"2014-08-19 11:11:32.000000000","message":"use log.exception()","commit_id":"e97821125a7a4e769c9888623eb76700631e432c"}],"trove/guestagent/datastore/cassandra/service.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"2dc6e66c68e250fbe57f4600c976c9b534edadf0","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        try:"},{"line_number":196,"context_line":"            # If status check would be successful,"},{"line_number":197,"context_line":"            # bot stdin and stdout would contain nothing"},{"line_number":198,"context_line":"            LOG.info(\"Checking RPC connection.\")"},{"line_number":199,"context_line":"            self.checking_rpc_connection()"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"            out, err \u003d utils.execute_with_timeout(system.CASSANDRA_STATUS,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_acdbe9eb","line":198,"updated":"2014-08-15 14:28:15.000000000","message":"This should be LOG.debug which won\u0027t need _()","commit_id":"0492411cc6b8da0d8cbc99b50581cfa4775a6013"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"d0b083ed3a4bed18333ad29cfe97a6aea2e7f2ca","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        try:"},{"line_number":196,"context_line":"            # If status check would be successful,"},{"line_number":197,"context_line":"            # bot stdin and stdout would contain nothing"},{"line_number":198,"context_line":"            LOG.info(\"Checking RPC connection.\")"},{"line_number":199,"context_line":"            self.checking_rpc_connection()"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"            out, err \u003d utils.execute_with_timeout(system.CASSANDRA_STATUS,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_acf929ca","line":198,"updated":"2014-08-15 14:09:03.000000000","message":"should be wrapped _()","commit_id":"0492411cc6b8da0d8cbc99b50581cfa4775a6013"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"9d608b80e95c12e9f6891121d2c986c1c7aaa335","unresolved":false,"context_lines":[{"line_number":197,"context_line":"            # bot stdin and stdout would contain nothing"},{"line_number":198,"context_line":"            LOG.debug(\"Checking RPC connection.\")"},{"line_number":199,"context_line":"            if not self.is_rpc_reachable:"},{"line_number":200,"context_line":"                raise exception.ProcessExecutionError()"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"            out, err \u003d utils.execute_with_timeout(system.CASSANDRA_STATUS,"},{"line_number":203,"context_line":"                                                  shell\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_02f3b99e","line":200,"updated":"2014-08-15 19:31:58.000000000","message":"why? you didn\u0027t attempt to execute a process.","commit_id":"e2d7fcb1f728ebe8243cd57cafc12083d19ede9b"}],"trove/guestagent/datastore/couchbase/service.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"2dc6e66c68e250fbe57f4600c976c9b534edadf0","unresolved":false,"context_lines":[{"line_number":228,"context_line":"    def _get_actual_db_status(self):"},{"line_number":229,"context_line":"        self.ip_address \u003d operating_system.get_ip_address()"},{"line_number":230,"context_line":"        try:"},{"line_number":231,"context_line":"            LOG.info(\"Checking RPC connection.\")"},{"line_number":232,"context_line":"            self.checking_rpc_connection()"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"            pwd \u003d CouchbaseRootAccess.get_password()"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_0cf85d48","line":231,"updated":"2014-08-15 14:28:15.000000000","message":"This should be LOG.debug which won\u0027t need _()","commit_id":"0492411cc6b8da0d8cbc99b50581cfa4775a6013"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"d0b083ed3a4bed18333ad29cfe97a6aea2e7f2ca","unresolved":false,"context_lines":[{"line_number":228,"context_line":"    def _get_actual_db_status(self):"},{"line_number":229,"context_line":"        self.ip_address \u003d operating_system.get_ip_address()"},{"line_number":230,"context_line":"        try:"},{"line_number":231,"context_line":"            LOG.info(\"Checking RPC connection.\")"},{"line_number":232,"context_line":"            self.checking_rpc_connection()"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"            pwd \u003d CouchbaseRootAccess.get_password()"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_0cff7dab","line":231,"updated":"2014-08-15 14:09:03.000000000","message":"should be wrapped _()","commit_id":"0492411cc6b8da0d8cbc99b50581cfa4775a6013"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"9d608b80e95c12e9f6891121d2c986c1c7aaa335","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        try:"},{"line_number":231,"context_line":"            LOG.debug(\"Checking RPC connection.\")"},{"line_number":232,"context_line":"            if not self.is_rpc_reachable:"},{"line_number":233,"context_line":"                raise exception.ProcessExecutionError()"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"            pwd \u003d CouchbaseRootAccess.get_password()"},{"line_number":236,"context_line":"            out, err \u003d utils.execute_with_timeout("}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_422cd102","line":233,"updated":"2014-08-15 19:31:58.000000000","message":"same reason.","commit_id":"e2d7fcb1f728ebe8243cd57cafc12083d19ede9b"}],"trove/guestagent/datastore/mongodb/service.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"2dc6e66c68e250fbe57f4600c976c9b534edadf0","unresolved":false,"context_lines":[{"line_number":206,"context_line":"class MongoDbAppStatus(service.BaseDbStatus):"},{"line_number":207,"context_line":"    def _get_actual_db_status(self):"},{"line_number":208,"context_line":"        try:"},{"line_number":209,"context_line":"            LOG.info(\"Checking RPC connection.\")"},{"line_number":210,"context_line":"            self.checking_rpc_connection()"},{"line_number":211,"context_line":"            status_check \u003d (system.CMD_STATUS %"},{"line_number":212,"context_line":"                            operating_system.get_ip_address())"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_6ca0f143","line":209,"updated":"2014-08-15 14:28:15.000000000","message":"This should be LOG.debug which won\u0027t need _()","commit_id":"0492411cc6b8da0d8cbc99b50581cfa4775a6013"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"d0b083ed3a4bed18333ad29cfe97a6aea2e7f2ca","unresolved":false,"context_lines":[{"line_number":206,"context_line":"class MongoDbAppStatus(service.BaseDbStatus):"},{"line_number":207,"context_line":"    def _get_actual_db_status(self):"},{"line_number":208,"context_line":"        try:"},{"line_number":209,"context_line":"            LOG.info(\"Checking RPC connection.\")"},{"line_number":210,"context_line":"            self.checking_rpc_connection()"},{"line_number":211,"context_line":"            status_check \u003d (system.CMD_STATUS %"},{"line_number":212,"context_line":"                            operating_system.get_ip_address())"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_2c2d1947","line":209,"updated":"2014-08-15 14:09:03.000000000","message":"should be wrapped _()","commit_id":"0492411cc6b8da0d8cbc99b50581cfa4775a6013"}],"trove/guestagent/datastore/mysql/manager.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"2dc6e66c68e250fbe57f4600c976c9b534edadf0","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        else:"},{"line_number":143,"context_line":"            app.secure_root(secure_remote_root\u003dTrue)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        app.complete_install_or_restart()"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        if databases:"},{"line_number":148,"context_line":"            self.create_database(context, databases)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_acb0498c","side":"PARENT","line":145,"updated":"2014-08-15 14:28:15.000000000","message":"why this change?","commit_id":"804644c3a8db3e799fdcf1b644f865d4222ae861"}],"trove/guestagent/datastore/mysql/service.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"2dc6e66c68e250fbe57f4600c976c9b534edadf0","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def _get_actual_db_status(self):"},{"line_number":158,"context_line":"        try:"},{"line_number":159,"context_line":"            LOG.info(\"Checking RPC connection.\")"},{"line_number":160,"context_line":"            self.checking_rpc_connection()"},{"line_number":161,"context_line":"            out, err \u003d utils.execute_with_timeout("},{"line_number":162,"context_line":"                \"/usr/bin/mysqladmin\","}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_0ca69d53","line":159,"updated":"2014-08-15 14:28:15.000000000","message":"This should be LOG.debug which won\u0027t need _()","commit_id":"0492411cc6b8da0d8cbc99b50581cfa4775a6013"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"d0b083ed3a4bed18333ad29cfe97a6aea2e7f2ca","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def _get_actual_db_status(self):"},{"line_number":158,"context_line":"        try:"},{"line_number":159,"context_line":"            LOG.info(\"Checking RPC connection.\")"},{"line_number":160,"context_line":"            self.checking_rpc_connection()"},{"line_number":161,"context_line":"            out, err \u003d utils.execute_with_timeout("},{"line_number":162,"context_line":"                \"/usr/bin/mysqladmin\","}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_ac20494a","line":159,"updated":"2014-08-15 14:09:03.000000000","message":"should be wrapped _()","commit_id":"0492411cc6b8da0d8cbc99b50581cfa4775a6013"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"9d608b80e95c12e9f6891121d2c986c1c7aaa335","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        try:"},{"line_number":159,"context_line":"            LOG.debug(\"Checking RPC connection.\")"},{"line_number":160,"context_line":"            if not self.is_rpc_reachable:"},{"line_number":161,"context_line":"                raise exception.ProcessExecutionError()"},{"line_number":162,"context_line":"            out, err \u003d utils.execute_with_timeout("},{"line_number":163,"context_line":"                \"/usr/bin/mysqladmin\","},{"line_number":164,"context_line":"                \"ping\", run_as_root\u003dTrue, root_helper\u003d\"sudo\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_a2392543","line":161,"updated":"2014-08-15 19:31:58.000000000","message":"no ... same reason","commit_id":"e2d7fcb1f728ebe8243cd57cafc12083d19ede9b"}],"trove/guestagent/datastore/redis/service.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"d0b083ed3a4bed18333ad29cfe97a6aea2e7f2ca","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        out \u003d \"\""},{"line_number":83,"context_line":"        err \u003d \"\""},{"line_number":84,"context_line":"        try:"},{"line_number":85,"context_line":"            LOG.info(\"Checking RPC connection.\")"},{"line_number":86,"context_line":"            self.checking_rpc_connection()"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"            if \u0027requirepass\u0027 in options:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_0c169df1","line":85,"updated":"2014-08-15 14:09:03.000000000","message":"should be wrapped _()","commit_id":"0492411cc6b8da0d8cbc99b50581cfa4775a6013"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"9d608b80e95c12e9f6891121d2c986c1c7aaa335","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        err \u003d \"\""},{"line_number":84,"context_line":"        try:"},{"line_number":85,"context_line":"            LOG.debug(\"Checking RPC connection.\")"},{"line_number":86,"context_line":"            if not self.is_rpc_reachable:"},{"line_number":87,"context_line":"                raise exception.ProcessExecutionError()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"            if \u0027requirepass\u0027 in options:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_024ad9c4","line":86,"updated":"2014-08-15 19:31:58.000000000","message":"no.. same reason","commit_id":"e2d7fcb1f728ebe8243cd57cafc12083d19ede9b"}],"trove/guestagent/datastore/service.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"1a184cedbfa94de5d58a315060544a4ab6d5d233","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    def _get_actual_db_status(self):"},{"line_number":88,"context_line":"        raise NotImplementedError()"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    @property"},{"line_number":91,"context_line":"    def checking_rpc_connection(self):"},{"line_number":92,"context_line":"        \"\"\"True if rpc service is reachable."},{"line_number":93,"context_line":"        Raising errors otherwise."}],"source_content_type":"text/x-python","patch_set":2,"id":"7ac7a964_24ce455b","line":90,"updated":"2014-08-14 11:27:20.000000000","message":"I feel concerned about making this method a class property, it should be plain class method.","commit_id":"9b013b5db305aae3f8e2430a4c9860975f0e43f1"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"2dc6e66c68e250fbe57f4600c976c9b534edadf0","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    def _get_actual_db_status(self):"},{"line_number":88,"context_line":"        raise NotImplementedError()"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def checking_rpc_connection(self):"},{"line_number":91,"context_line":"        \"\"\"Pass if rpc service is reachable."},{"line_number":92,"context_line":"        Raising error otherwise."},{"line_number":93,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_8fce1fb3","line":90,"updated":"2014-08-15 14:28:15.000000000","message":"so, I think the premise of this function should be to verify whether an rpc connection can be established or not. \n\ntherefore it would be better if this function returned true or false and never raised an exception.\n\nThe caller could use the true/false return in a wait with timeout.\n\nThat would, IMHO be a better way to implement this instead of throwing an exception here.\n\nFurther, the way this is implemented you will be establishing an RPC connection each time someone polls database state. That\u0027s not a required thing, I don\u0027t think.","commit_id":"0492411cc6b8da0d8cbc99b50581cfa4775a6013"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"2dc6e66c68e250fbe57f4600c976c9b534edadf0","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        try:"},{"line_number":97,"context_line":"            conn \u003d rpc.create_connection(new\u003dTrue)"},{"line_number":98,"context_line":"            LOG.info(\"RPC connection reachable.\")"},{"line_number":99,"context_line":"        except common.RemoteError as r:"},{"line_number":100,"context_line":"            LOG.error(r)"},{"line_number":101,"context_line":"            raise exception.ProcessExecutionError(r.value)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_4c35f5f5","line":98,"updated":"2014-08-15 14:28:15.000000000","message":"This should be LOG.debug which won\u0027t need _()","commit_id":"0492411cc6b8da0d8cbc99b50581cfa4775a6013"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"d0b083ed3a4bed18333ad29cfe97a6aea2e7f2ca","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        try:"},{"line_number":97,"context_line":"            conn \u003d rpc.create_connection(new\u003dTrue)"},{"line_number":98,"context_line":"            LOG.info(\"RPC connection reachable.\")"},{"line_number":99,"context_line":"        except common.RemoteError as r:"},{"line_number":100,"context_line":"            LOG.error(r)"},{"line_number":101,"context_line":"            raise exception.ProcessExecutionError(r.value)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_ecc88176","line":98,"updated":"2014-08-15 14:09:03.000000000","message":"should be wrapped _()","commit_id":"0492411cc6b8da0d8cbc99b50581cfa4775a6013"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"2dc6e66c68e250fbe57f4600c976c9b534edadf0","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        try:"},{"line_number":97,"context_line":"            conn \u003d rpc.create_connection(new\u003dTrue)"},{"line_number":98,"context_line":"            LOG.info(\"RPC connection reachable.\")"},{"line_number":99,"context_line":"        except common.RemoteError as r:"},{"line_number":100,"context_line":"            LOG.error(r)"},{"line_number":101,"context_line":"            raise exception.ProcessExecutionError(r.value)"},{"line_number":102,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_0f192f79","line":99,"updated":"2014-08-15 14:28:15.000000000","message":"First, you are doing the same thing as Exception ...\n\nexcept (Exception, common.RemoteError) ..\n\nNext, Why not just LOG.exception() and raise.\n\nWhy are you casting to ProcessExecutionError?\n\n---\n\nBut, I think the better way of implementing this function is to catch all errors and return true/false.","commit_id":"0492411cc6b8da0d8cbc99b50581cfa4775a6013"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"d0b083ed3a4bed18333ad29cfe97a6aea2e7f2ca","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        try:"},{"line_number":97,"context_line":"            conn \u003d rpc.create_connection(new\u003dTrue)"},{"line_number":98,"context_line":"            LOG.info(\"RPC connection reachable.\")"},{"line_number":99,"context_line":"        except common.RemoteError as r:"},{"line_number":100,"context_line":"            LOG.error(r)"},{"line_number":101,"context_line":"            raise exception.ProcessExecutionError(r.value)"},{"line_number":102,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_ac95a941","line":99,"updated":"2014-08-15 14:09:03.000000000","message":"this can be simplified:\n\n\nexcept common.RemoteError as ex:\n\n\n\nNo need to expect too broad exception class - Exception.","commit_id":"0492411cc6b8da0d8cbc99b50581cfa4775a6013"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"2dc6e66c68e250fbe57f4600c976c9b534edadf0","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            LOG.error(e)"},{"line_number":104,"context_line":"            raise exception.ProcessExecutionError(str(e))"},{"line_number":105,"context_line":"        finally:"},{"line_number":106,"context_line":"            if conn:"},{"line_number":107,"context_line":"                conn.close()"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_ef6233d7","line":106,"updated":"2014-08-15 14:28:15.000000000","message":"can it be anything other than conn?","commit_id":"0492411cc6b8da0d8cbc99b50581cfa4775a6013"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"9d608b80e95c12e9f6891121d2c986c1c7aaa335","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        raise NotImplementedError()"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    @property"},{"line_number":91,"context_line":"    def is_rpc_reachable(self):"},{"line_number":92,"context_line":"        \"\"\"true if rpc service is reachable."},{"line_number":93,"context_line":"        false otherwise."},{"line_number":94,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_427a11f2","line":91,"updated":"2014-08-15 19:31:58.000000000","message":"sorry, this wasn\u0027t what I was thinking. let me write some code and send it to you.","commit_id":"e2d7fcb1f728ebe8243cd57cafc12083d19ede9b"}]}
