{"action":"closed","issue":{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/1182","repository_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server","labels_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/1182/labels{/name}","comments_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/1182/comments","events_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/1182/events","html_url":"https://github.com/rabbitmq/rabbitmq-server/issues/1182","id":221551778,"number":1182,"title":"RabbitMQ should support running with \"rabbit@IP\" long-name","user":{"login":"fiksn","id":1640719,"avatar_url":"https://avatars1.githubusercontent.com/u/1640719?v=3","gravatar_id":"","url":"https://api.github.com/users/fiksn","html_url":"https://github.com/fiksn","followers_url":"https://api.github.com/users/fiksn/followers","following_url":"https://api.github.com/users/fiksn/following{/other_user}","gists_url":"https://api.github.com/users/fiksn/gists{/gist_id}","starred_url":"https://api.github.com/users/fiksn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fiksn/subscriptions","organizations_url":"https://api.github.com/users/fiksn/orgs","repos_url":"https://api.github.com/users/fiksn/repos","events_url":"https://api.github.com/users/fiksn/events{/privacy}","received_events_url":"https://api.github.com/users/fiksn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-04-13T12:42:55Z","updated_at":"2017-04-13T15:00:40Z","closed_at":"2017-04-13T15:00:40Z","body":"We are running RabbitMQ on Kubernetes. For clustering I tried [rabbitmq-autocluster](http://aweber.github.io/rabbitmq-autocluster/) plugin with Etcd2. It would be great if Erlang distribution directly used IP. The latest discussion about this topic I found is http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2009-December/005650.html\r\n\r\nBased on that I came up with:\r\n\r\n``\r\nsed -i  '/RABBITMQ_USE_LONGNAME/iRABBITMQ_NODENAME=\"$RABBITMQ_NODENAME -name test$$@${RABBITMQ_NODENAME##*@}\"'  /usr/lib/rabbitmq/lib/rabbitmq_server-${RABBITMQ_VERSION}/sbin/rabbitmqctl ; sed -i '/start_rabbitmq_server() {/iRABBITMQ_NAME_TYPE=\"-name\"' /usr/lib/rabbitmq/lib/rabbitmq_server-${RABBITMQ_VERSION}/sbin/rabbitmq-server\r\n``\r\n\r\nthen I also do export RABBITMQ_NODENAME=\"rabbit@$(hostname -i)\" before starting \"rabbitmq-server\". (Note that I don't set RABBITMQ_USE_LONGNAME at all, with it it doesn't work)\r\n\r\nWith RabbitMQ 3.6.0 that trick worked fine, but not in later 3.6 versions. I can workaround by using rabbit_cli.beam from 3.6.0 with a later version. This hack is in use for development but I wouldn't really dare to run it in production.\r\n\r\nI believe https://github.com/rabbitmq/rabbitmq-server/blob/master/src/rabbit_cli.erl#L183 is not really fine. What I mean is: i'd expect when RABBITMQ_NODENAME and RABBITMQ_USE_LONGNAME are set, RabbitMQ should use those settings. If RABBITMQ_NODENAME is not set or not a FQDN it can still fall back to old logic. \r\n\r\nIn my case I don't really want to use DNS for inter-cluster communication, but as far as I understand it also wouldn't work if I did (due to the \".no-domain\" addendum).\r\n\r\nThanks for your help."}}
{"actor":{"display_login":"michaelklishin"}}