Bug 1716812
| Summary: | Failed to create volume which transport_type is "tcp,rdma" | |||
|---|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | guolei <guol-fnst> | |
| Component: | glusterd | Assignee: | bugs <bugs> | |
| Status: | CLOSED NEXTRELEASE | QA Contact: | ||
| Severity: | high | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | mainline | CC: | amukherj, bugs, guol-fnst, pgurusid, srakonde | |
| Target Milestone: | --- | Keywords: | Triaged | |
| Target Release: | --- | |||
| Hardware: | x86_64 | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1721105 1721106 1721109 (view as bug list) | Environment: | ||
| Last Closed: | 2019-06-17 10:31:00 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1721105, 1721106, 1721109 | |||
|
Description
guolei
2019-06-04 07:52:34 UTC
Test is ok on glusterfs3.12.9 ,failed on glusterfs3.13.2 and later version.
generate_client_volfiles (glusterd_volinfo_t *volinfo,
glusterd_client_type_t client_type)
{
int i = 0;
int ret = -1;
char filepath[PATH_MAX] = {0,};
char *types[] = {NULL, NULL, NULL};
dict_t *dict = NULL;
xlator_t *this = NULL;
gf_transport_type type = GF_TRANSPORT_TCP;
this = THIS;
enumerate_transport_reqs (volinfo->transport_type, types);
dict = dict_new ();
if (!dict)
goto out;
for (i = 0; types[i]; i++) {
memset (filepath, 0, sizeof (filepath));
ret = dict_set_str (dict, "client-transport-type", types[i]);
if (ret)
goto out;
type = transport_str_to_type (types[i]);
ret = dict_set_uint32 (dict, "trusted-client", client_type);
if (ret)
goto out;
if (client_type == GF_CLIENT_TRUSTED) {
ret = glusterd_get_trusted_client_filepath (filepath,
volinfo,
type);
} else if (client_type == GF_CLIENT_TRUSTED_PROXY) {
glusterd_get_gfproxy_client_volfile (volinfo,
filepath,
PATH_MAX); <---------------------------- Maybe this is the problem? transport type should be passed to glusterd_get_gfproxy_client_volfile .Or filepath is NULL.
ret = dict_set_str (dict, "gfproxy-client", "on");
} else {
ret = glusterd_get_client_filepath (filepath,
volinfo,
type);
}
if (ret) {
gf_msg (this->name, GF_LOG_ERROR, EINVAL,
GD_MSG_INVALID_ENTRY,
"Received invalid transport-type");
goto out;
}
* ret = generate_single_transport_client_volfile (volinfo,
filepath,
dict);*
if (ret)
goto out;
}
/* Generate volfile for rebalance process */
glusterd_get_rebalance_volfile (volinfo, filepath, PATH_MAX);
ret = build_rebalance_volfile (volinfo, filepath, dict);
if (ret) {
gf_msg (this->name, GF_LOG_ERROR, 0,
GD_MSG_VOLFILE_CREATE_FAIL,
"Failed to create rebalance volfile for %s",
volinfo->volname);
goto out;
}
out:
if (dict)
dict_unref (dict);
gf_msg_trace ("glusterd", 0, "Returning %d", ret);
return ret;
}
void
glusterd_get_gfproxy_client_volfile (glusterd_volinfo_t *volinfo,
char *path, int path_len)
{
char workdir[PATH_MAX] = {0, };
glusterd_conf_t *priv = THIS->private;
GLUSTERD_GET_VOLUME_DIR (workdir, volinfo, priv);
switch (volinfo->transport_type) {
case GF_TRANSPORT_TCP:
snprintf (path, path_len,
"%s/trusted-%s.tcp-gfproxy-fuse.vol",
workdir, volinfo->volname);
break;
case GF_TRANSPORT_RDMA:
snprintf (path, path_len,
"%s/trusted-%s.rdma-gfproxy-fuse.vol",
workdir, volinfo->volname);
break;
default:
break;
}
}
Since type GF_TRANSPORT_BOTH_TCP_RDMA isn't handled in the function. Poornima - Was this intentionally done or a bug? I feel it's the latter. Looking at glusterd_get_dummy_client_filepath () we just need to club GF_TRANSPORT_TCP & GF_TRANSPORT_BOTH_TCP_RDMA in the same place. Please confirm. Looking at the code, I feel we missed handle GF_TRANSPORT_BOTH_TCP_RDMA. As we have provided choice to create volume using tcp,rdma we should handle GF_TRANSPORT_BOTH_TCP_RDMA in glusterd_get_gfproxy_client_volfile(). This issue exists in the latest master too. Thanks, Sanju REVIEW: https://review.gluster.org/22851 (glusterd: add GF_TRANSPORT_BOTH_TCP_RDMA in glusterd_get_gfproxy_client_volfile) posted (#1) for review on master by Atin Mukherjee REVIEW: https://review.gluster.org/22851 (glusterd: add GF_TRANSPORT_BOTH_TCP_RDMA in glusterd_get_gfproxy_client_volfile) merged (#5) on master by Amar Tumballi The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |