summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-store.c
diff options
context:
space:
mode:
authorNandaja Varma <nandaja.varma@gmail.com>2015-06-25 00:57:00 +0530
committerKaushal M <kaushal@redhat.com>2015-06-26 23:32:01 -0700
commit911e9228f31e89fe5df6e2282ce449b2a94c42b1 (patch)
tree517bb1fd3d56c6016b21bc394956064ee56294ab /xlators/mgmt/glusterd/src/glusterd-store.c
parent2b9b3ef3b646989bbc0412dca187b3f5fcad3283 (diff)
glusterd: Porting left out log messages to new framework
Change-Id: I70d40ae3b5f49a21e1b93f82885cd58fa2723647 BUG: 1235538 Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com> Reviewed-on: http://review.gluster.org/11388 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Anand Nekkunti <anekkunt@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index 125d1430ee5..8d6e3d04cb8 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -2026,7 +2026,8 @@ glusterd_restore_op_version (xlator_t *this)
goto out;
}
conf->op_version = op_version;
- gf_log ("glusterd", GF_LOG_INFO,
+ gf_msg ("glusterd", GF_LOG_INFO, 0,
+ GD_MSG_OP_VERS_INFO,
"retrieved op-version: %d", conf->op_version);
goto out;
}
@@ -2046,11 +2047,15 @@ glusterd_restore_op_version (xlator_t *this)
*/
ret = glusterd_retrieve_uuid();
if (ret) {
- gf_log (this->name, GF_LOG_INFO, "Detected new install. Setting"
+ gf_msg (this->name, GF_LOG_INFO, 0,
+ GD_MSG_OP_VERS_SET_INFO,
+ "Detected new install. Setting"
" op-version to maximum : %d", GD_OP_VERSION_MAX);
conf->op_version = GD_OP_VERSION_MAX;
} else {
- gf_log (this->name, GF_LOG_INFO, "Upgrade detected. Setting"
+ gf_msg (this->name, GF_LOG_INFO, 0,
+ GD_MSG_OP_VERS_SET_INFO,
+ "Upgrade detected. Setting"
" op-version to minimum : %d", GD_OP_VERSION_MIN);
conf->op_version = GD_OP_VERSION_MIN;
}
@@ -2808,7 +2813,8 @@ glusterd_store_retrieve_volume (char *volname, glusterd_snap_t *snap)
/* Initialize the snapd service */
ret = glusterd_snapdsvc_init (volinfo);
if (ret) {
- gf_log (this->name, GF_LOG_ERROR, "Failed to initialize snapd "
+ gf_msg (this->name, GF_LOG_ERROR, 0,
+ GD_MSG_SNAPD_INIT_FAIL, "Failed to initialize snapd "
"service for volume %s", volinfo->volname);
goto out;
}
@@ -3023,7 +3029,8 @@ glusterd_store_retrieve_volumes (xlator_t *this, glusterd_snap_t *snap)
ret = glusterd_store_retrieve_node_state (volinfo);
if (ret) {
/* Backward compatibility */
- gf_log (this->name, GF_LOG_INFO,
+ gf_msg (this->name, GF_LOG_INFO, 0,
+ GD_MSG_NEW_NODE_STATE_CREATION,
"Creating a new node_state "
"for volume: %s.", entry->d_name);
glusterd_store_create_nodestate_sh_on_absence (volinfo);
@@ -3127,7 +3134,8 @@ glusterd_mount_brick_paths (char *brick_mount_path,
entry = glusterd_get_mnt_entry_info (brick_mount_path, buff,
sizeof (buff), &save_entry);
if (entry) {
- gf_log (this->name, GF_LOG_INFO,
+ gf_msg (this->name, GF_LOG_INFO, 0,
+ GD_MSG_ALREADY_MOUNTED,
"brick_mount_path (%s) already mounted.",
brick_mount_path);
ret = 0;
@@ -4455,7 +4463,9 @@ glusterd_quota_conf_write_header (int fd)
out:
if (ret < 0)
- gf_log_callingfn ("quota", GF_LOG_ERROR, "failed to write "
+ gf_msg_callingfn ("quota", GF_LOG_ERROR, 0,
+ GD_MSG_QUOTA_CONF_WRITE_FAIL,
+ "failed to write "
"header to a quota conf");
return ret;
@@ -4493,7 +4503,9 @@ glusterd_quota_conf_write_gfid (int fd, void *buf, char type)
out:
if (ret < 0)
- gf_log_callingfn ("quota", GF_LOG_ERROR, "failed to write "
+ gf_msg_callingfn ("quota", GF_LOG_ERROR, 0,
+ GD_MSG_QUOTA_CONF_WRITE_FAIL,
+ "failed to write "
"gfid %s to a quota conf", uuid_utoa (buf));
return ret;