On Mon, Oct 15, 2018 at 6:53 AM Keiichi Fujino <kfuj...@apache.org> wrote:

> Hi Remy.
>
> Sorry for the late reply.
> I have two comments against the current code.
>
> The one is,
> the uniqueId of the local member and the other cluster members are
> different.
>
> The CloudMembershipService#createOrUpdateLocalMember method is as follows.
> ==
> // Set localMember unique ID to md5 hash of hostname
> localMember.setUniqueId(MessageDigest.getInstance("md5")
>         .digest(InetAddress.getLocalHost().getHostName().getBytes()));
> ==
>
> The KubernetesMembershipProvider#parsePods method is as follows.
> ==
> byte[] id = md5.digest(uid.getBytes(StandardCharsets.US_ASCII));
> ==
>
> In other words, uniqueId of local member is obtained from hostname, while
> other cluster members are obtained from uid.
> In this case, some features such as RpcChannel do not work properly.
>
> We need to update the local member's uniqueId with the uid obtained from
> pod, or use a different way to align  the local member's uniqueId with
> other cluster member's uniqueId.
>

Yes, I had changed it (I didn't really like trying to use the "host name"
although it should actually work, and since kube was kindly giving that id)
but it was badly done.

Thanks for catching that mess ;)

Rémy

Reply via email to