On 07/23/2012 02:58 PM, Eugene Kirpichov wrote: > The only problem is, it breaks backward compatibility a bit: my patch > assumes you have a flag "rabbit_addresses" which should look like > "rmq-host1:5672,rmq-host2:5672" instead of the prior rabbit_host and > rabbit_port flags. > > Guys, can you advise on a way to do this without being ugly and > without breaking compatibility? > Maybe have "rabbit_host", "rabbit_port" be ListOpt's? But that sounds > weird, as their names are in singular. > Maybe have "rabbit_host", "rabbit_port" and also "rabbit_host2", > "rabbit_port2" (assuming we only have clusters of 2 nodes)? > Something else?
I think that the "standard" (in Nova at least) is to go with a single ListOpt flag that is a comma-delimited list of the URIs. We do that for Glance APi servers, for example, in the glance_api_servers flag: https://github.com/openstack/nova/blob/master/nova/flags.py#L138 So, perhaps you can add a rabbit_ha_servers ListOpt flag that, when filled, would be used instead of rabbit_host and rabbit_port. That way you won't break backwards compat? Best, -jay > On Mon, Jul 23, 2012 at 11:27 AM, Jay Pipes <[email protected]> wrote: >> On 07/23/2012 09:02 AM, Alessandro Tagliapietra wrote: >>> Hi guys, >>> >>> just an idea, i'm deploying Openstack trying to make it HA. >>> The missing thing is rabbitmq, which can be easily started in >>> active/active mode, but it needs to declare the queues adding an >>> x-ha-policy entry. >>> http://www.rabbitmq.com/ha.html >>> It would be nice to add a config entry to be able to declare the queues >>> in that way. >>> If someone know where to edit the openstack code, else i'll try to do >>> that in the next weeks maybe. >> >> https://github.com/openstack/openstack-common/blob/master/openstack/common/rpc/impl_kombu.py >> >> You'll need to add the config options there and the queue is declared >> here with the options supplied to the ConsumerBase constructor: >> >> https://github.com/openstack/openstack-common/blob/master/openstack/common/rpc/impl_kombu.py#L114 >> >> Best, >> -jay >> >> _______________________________________________ >> Mailing list: https://launchpad.net/~openstack >> Post to : [email protected] >> Unsubscribe : https://launchpad.net/~openstack >> More help : https://help.launchpad.net/ListHelp > > > _______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : [email protected] Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp

