Forcing 127.0.0.1 for host IP address

Hi -

Is it possible to force leaf / aggregator nodes to be identified by a loopback ip instead of the network IP with memsql-ops? I appear to be able to do this with the memsql toolbox but not memsql-ops. For example, this is what I do with the toolbox:

memsql-admin create-node --host 127.0.0.1 --port 3308 --password ""

However, if I try to do something similar with memsql-ops, it uses the IP address defined by the network (as per the SHOW LEAVES; command). This becomes a problem when my network IP address changes after I’ve deployed the node. This is the command I run on memsql-ops:

memsql-ops memsql-deploy -r leaf --developer-edition -P 3308

Obviously part of the problem here is that it doesn’t seem as though there’s anywhere I can provide an ip address when deploying a new node. Any suggested alternatives here other than using the new toolset?

Thanks!

Aaron, ideally you should use the new toolchain rather than MemSQL Ops as Ops is being currently sunsetted. Is there a feature in Ops that you need that’s not provided in the new toolchain?

In terms of getting Ops to do as you wish, all you need to do is restart each agent with --host 127.0.0.1. This will cause the agent to “run on loopback” which will allow memsql-deploy to leverage loopback when defining MemSQL Nodes. Note - this will disable the ability to run agents or MemSQL nodes across multiple machines.

Perfect – thanks that did the trick! This was for local testing purposes, so there’s no requirement for multiple machines.

1 Like