From 4c8ef841d3580c9bb9a97f50f36a42686c3de8ab Mon Sep 17 00:00:00 2001 From: Sushil Kumar Date: Tue, 11 Feb 2014 08:45:58 +0000 Subject: [PATCH] Raises BadRequest for grant_access on ignore_dbs Reasons: - Currently, it just logs an informative log in guestagent log, and then control shifts to next line, which provides the requested grant. - This brings the need to raise the exception instead of informative logging. Changes: - Raises BadRequest if ignore_dbs are requested access instead of informative logging into guest-agent logs. Change-Id: I9df08d04cd42916f3d1f91e05cd4799bb9041eae Closes-Bug: #1257021 --- trove/guestagent/datastore/mysql/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trove/guestagent/datastore/mysql/service.py b/trove/guestagent/datastore/mysql/service.py index b21b56f799..53b912365b 100644 --- a/trove/guestagent/datastore/mysql/service.py +++ b/trove/guestagent/datastore/mysql/service.py @@ -384,7 +384,7 @@ class MySqlAdmin(object): try: mydb.name = database except ValueError: - LOG.info(_( + raise exception.BadRequest(_( "Grant access to %s is not allowed") % database) g = sql_query.Grant(permissions='ALL', database=mydb.name,