summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-snapd-svc.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapd-svc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c b/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c
index ea56d8012aa..b6e6a814ca2 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c
@@ -302,6 +302,14 @@ glusterd_snapdsvc_start (glusterd_svc_t *svc, int flags)
NULL);
snapd_port = pmap_assign_port (THIS, volinfo->snapd.port, snapd_id);
+ if (!snapd_port) {
+ gf_msg (this->name, GF_LOG_ERROR, 0, GD_MSG_PORTS_EXHAUSTED,
+ "All the ports in the range are exhausted, can't start "
+ "snapd for volume %s", volinfo->volname);
+ ret = -1;
+ goto out;
+ }
+
volinfo->snapd.port = snapd_port;
runner_add_arg (&runner, "--brick-port");