[PATCH v2] Samba RADOS service registration

Jeff Layton jlayton at samba.org
Thu Feb 15 18:09:45 UTC 2018


On Tue, 2018-02-13 at 20:27 +0100, David Disseldorp wrote:
>
> +	instance_guid = rados_get_instance_id(state->cluster);
> +
> +	ret = ceph_service_instance_gen(instance_buf, sizeof(instance_buf),
> +					daemon, instance_guid);
> +	if (ret < 0) {
> +		goto out_mem_free;
> +	}
> +
> +	DBG_DEBUG("registering as %s with %s Ceph cluster\n", instance_buf,
> +		  (cluster_name != NULL ? cluster_name : "default"));
> +
> +	ret = rados_service_register(state->cluster, "samba", instance_buf, "");

IIUC, if the program (samba in this case) dies, and then is restarted
(maybe host reboots?), it'll get a new instance_guid, right? Or am I
misunderstanding what rados_get_instance_id will return here?
-- 
Jeff Layton <jlayton at samba.org>



More information about the samba-technical mailing list