Riak and host names

Deepak Balasubramanyam deepak.balu at gmail.com
Tue Jan 1 14:43:02 EST 2013

I took the AWS EC2 riak image for a spin today. I have a query regarding
riak nodes and how they behave when the machine reboots.

When an EC2 instance reboots, the internal ip / internal DNS / external DNS
change. This renders the app.config and -name argument on vm.args
incorrect. I was exploring solutions to deal with this problem.

*1. Preventive measures*

Someone on this thread dated May
using host file entries that point to the local internal IP address. That
does not seem to work. Riak fails with the following error when I add a new
entry to /etc/hosts and configure vm.args with -name riak at riaknode1

Hostname riaknode1 is illegal

I confirmed that riaknode1 pings correctly before starting riak. I guess
erlang tries to match the hostname of the system resulting in this failure
? Can anyone throw some light on this ?

*2. Use -sname*

Is starting the erlang VM with the sname flag an option if it will help
prevent the 'illegal hostname' error ?
Disclaimer: My knowledge of erlang is close to zilch, so sorry if that
option sounded like something you could dismiss easily :)

*3. Use cluster replace

a. I understand that the IPs in app.config and vm.args can be replaced with
the correct IP on a restart and using a subsequent 'cluster replace'
command will do. Will executing the 'cluster plan' and 'cluster commit'
commands now produce network chatter ?

b . What happens if 2 nodes go down and one was joined with the other. They
both have 2 different IP addresses on restart. How will 'cluster replace'
work now ?

Do let me know your thoughts.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20130102/d94f208d/attachment.html>

More information about the riak-users mailing list