Closed ghost closed 3 years ago
The handoff IF cannot be set to localhost to prevent data loss. If the ip end up as 127.0.0.1 nodes might end up handing off data to themselves, then deleting themselves after the handoff.
I understand the issue but "Won't delete data in production" trumps "development convenience" in my opinion. There are a few solutions around this issue in dev, if osx doesn't like 127.1.0.1 any more an alternative is specifying your interface ip. If you want to automate that you can grab your ip via ifconfig en0 | grep 'inet ' | cut -d ' ' -f 2
@marianoguerra Still tripping up everyone who I try to get going on the "Little Riak Core" book.
@bryanhuntesl this is a riak_core schema, I only reference riak_core as a dependency, can't do much if this is not merged into a released riak_core_ng
I don't want to carry a riak_core schema on my template or override it somehow.
@Licenser maybe a way to set a flag "danger_allow_local_handoff_ip", which is false by default and I can override?
I can print a warning on start if that flag is set saying "do not use in production!"
the danger_allow_local_handoff_ip
is a good idea!
@Licenser - I worked support for Basho, 2 years, and this was never an issue 😂 - if there's an issue it needs to be addressed higher up the food chain. It's a hurdle that requires a hack and explanation every time I attempt to train anyone on how to build apps on riak_core
Really the issue is the lackluster basho implementation that didn't check where it was sending/receiving from :-D
agreed that's the real issue, but not allowing that to be set was the quick fix :P! It's still better than having a setting that when (for whatever reason) set to 127.0.0.1
will delete your data.
PS: I did run into that problem and it took me way to long to figure out what happens with a handoff of 127.0.0.1
@bryanhuntesl if it helps, on Mac you can do ifconfig lo0 alias 127.1.0.1
(it will persist even after restart, as far as I understand).
Hi,
I've commented on the commit itself but in case it gets lost - I'm having difficulties with this new restriction - it makes running devrel instances on OSX tricky - 127.1.0.1, etc are not valid IP addresses, at least on High Sierra. Specifically when trying to work with Tanodb.
https://github.com/Kyorai/riak_core/commit/40c5131ea23b96881ee5e1700d2105267ea15472