[Bugs] [Bug 1793390] Pre-validation failure does not provide any hints on the reason for the failure
bugzilla at redhat.com
bugzilla at redhat.com
Tue Jan 28 09:35:03 UTC 2020
https://bugzilla.redhat.com/show_bug.cgi?id=1793390
--- Comment #1 from Sanju <srakonde at redhat.com> ---
In case of volume stop, gd_mgmt_v3_pre_validate_fn() is calling
glusterd_op_stage_stop_volume(). There are multiple functions which are called
by glusterd_op_stage_stop_volume() but not all of them are having logs at every
failure check.
For example,
glusterd_op_stage_stop_volume() is calling glusterd_op_stop_volume_args_get()
and not logging anything on failure.
ret = glusterd_op_stop_volume_args_get(dict, &volname, &flags);
if (ret)
goto out;
Also glusterd_op_stop_volume_args_get() has a scenario when it return -1 but
logs nothing.
int
glusterd_op_stop_volume_args_get(dict_t *dict, char **volname, int *flags)
{
int ret = -1;
xlator_t *this = NULL;
this = THIS;
GF_ASSERT(this);
if (!dict || !volname || !flags)
goto out; <----- returning -1 but logging
nothing
ret = dict_get_strn(dict, "volname", SLEN("volname"), volname);
if (ret) {
gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_DICT_GET_FAILED,
"Unable to get volume name");
goto out;
}
ret = dict_get_int32n(dict, "flags", SLEN("flags"), flags);
if (ret) {
gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_DICT_GET_FAILED,
"Unable to get flags");
goto out;
}
out:
return ret;
}
In such cases, we don't have any logs to say what went wrong. Although DEBUG
logs help, I would agree that there is a scope for improvement.
I'm more inclined towards assigning this to a newbie as it is not a complex
thing and also it gives an opportunity to read the code.
Thanks,
Sanju
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list