nfsdcltrack: silence some expected errors
diff mbox

Message ID 20170424164117.13119-1-jlayton@redhat.com
State New
Headers show

Commit Message

Jeff Layton April 24, 2017, 4:41 p.m. UTC
On a new install, we're unable to select from the parameters table, as
it doesn't exist yet. The code is set up to log that fact at L_ERROR
now, but it's an expected situation. Change it to log that at D_GENERAL
instead.

Reported-and-Tested-by: ChunYu Wang <chunwang@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 utils/nfsdcltrack/sqlite.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Steve Dickson April 26, 2017, 4:15 p.m. UTC | #1
On 04/24/2017 12:41 PM, Jeff Layton wrote:
> On a new install, we're unable to select from the parameters table, as
> it doesn't exist yet. The code is set up to log that fact at L_ERROR
> now, but it's an expected situation. Change it to log that at D_GENERAL
> instead.
> 
> Reported-and-Tested-by: ChunYu Wang <chunwang@redhat.com>
> Signed-off-by: Jeff Layton <jlayton@redhat.com>
Committed...

steved.
> ---
>  utils/nfsdcltrack/sqlite.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/utils/nfsdcltrack/sqlite.c b/utils/nfsdcltrack/sqlite.c
> index 54cd7487920b..1552eba4e35c 100644
> --- a/utils/nfsdcltrack/sqlite.c
> +++ b/utils/nfsdcltrack/sqlite.c
> @@ -101,7 +101,7 @@ sqlite_query_schema_version(void)
>  		"SELECT value FROM parameters WHERE key == \"version\";",
>  		 -1, &stmt, NULL);
>  	if (ret != SQLITE_OK) {
> -		xlog(L_ERROR, "Unable to prepare select statement: %s",
> +		xlog(D_GENERAL, "Unable to prepare select statement: %s",
>  			sqlite3_errmsg(dbh));
>  		ret = 0;
>  		goto out;
> @@ -110,7 +110,7 @@ sqlite_query_schema_version(void)
>  	/* query schema version */
>  	ret = sqlite3_step(stmt);
>  	if (ret != SQLITE_ROW) {
> -		xlog(L_ERROR, "Select statement execution failed: %s",
> +		xlog(D_GENERAL, "Select statement execution failed: %s",
>  				sqlite3_errmsg(dbh));
>  		ret = 0;
>  		goto out;
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/utils/nfsdcltrack/sqlite.c b/utils/nfsdcltrack/sqlite.c
index 54cd7487920b..1552eba4e35c 100644
--- a/utils/nfsdcltrack/sqlite.c
+++ b/utils/nfsdcltrack/sqlite.c
@@ -101,7 +101,7 @@  sqlite_query_schema_version(void)
 		"SELECT value FROM parameters WHERE key == \"version\";",
 		 -1, &stmt, NULL);
 	if (ret != SQLITE_OK) {
-		xlog(L_ERROR, "Unable to prepare select statement: %s",
+		xlog(D_GENERAL, "Unable to prepare select statement: %s",
 			sqlite3_errmsg(dbh));
 		ret = 0;
 		goto out;
@@ -110,7 +110,7 @@  sqlite_query_schema_version(void)
 	/* query schema version */
 	ret = sqlite3_step(stmt);
 	if (ret != SQLITE_ROW) {
-		xlog(L_ERROR, "Select statement execution failed: %s",
+		xlog(D_GENERAL, "Select statement execution failed: %s",
 				sqlite3_errmsg(dbh));
 		ret = 0;
 		goto out;