Add support for custom hostname

Bug #1896613 reported by Przemyslaw Hausman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack RabbitMQ Server Charm
Triaged
Wishlist
Unassigned

Bug Description

This is a feature request to add support for setting up a custom hostname, so that rabbitmq-server can advertise its hostname in the relations to the other units instead of its IP address.

My use case is to deploy rabbitmq-server in the public cloud and relate it with the consuming units deployed on premise. The IP address of the resulting rabbimq-server unit is in private VPC and cannot be accessed directly by the consuming units.

Assigning the Elastic IP to the VM hosting rabbitmq-server won't help, since rabbitmq-server is not aware of this IP address.

The solution would be to create a record in Route53 zone, pointing to the Elastic IP attached to the VM. This makes it possible for consuming units to access rabbitmq-server. However, the consuming units must have an automatic way to learn about rabbitmq-server's hostname, ideally via relations.

I think the simple change would be to update the code in https://github.com/openstack/charm-rabbitmq-server/blob/master/hooks/rabbitmq_server_relations.py#L272 with the following logic:

If the custom hostname is defined in charm config:
  host_addr = hostname from the config
Else
  host_addr = ch_ip.get_relation_ip(...)

James Page (james-page)
Changed in charm-rabbitmq-server:
importance: Undecided → Wishlist
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.