[openstack-dev] [infra][devstack-gate][all]support multi-region gate environment

Sean M. Collins sean at coreitpro.com
Tue Jan 10 14:56:04 UTC 2017


joehuang wrote:
> In multi-region environment(for example, two regions RegionOne and RegionTwo), KeyStone will be shared in RegionOne and RegionTwo, so the primary node and subnode should use different role, one role to enable the keystone, while another role is to use the keystone in another node, only one role to support multi-region setup seems to be not possible.  The flag "MULTI_REGION" is to make the subnode play with the role where no keystone will run. If we don't use the flag, or maybe use DEVSTACK_GATE_MULTI_REGION?
> 
> This is the first patch in devstack-gate for me, any help or guide will be appreciated.


Basically, it's more of a note for myself at this point.

We don't directly expose a way to define a role in
devstack-gate[1][2][3][4]. We do a lot of heuristics to detect whether
or not the node is a primary node or a subnode.

Ideally, we should really have an environment variable ($ROLE ?) that
can be set by projects in  project-config, and just call the test matrix
script[5] with the role that is being set in the environment variable.

Because otherwise we end up with more if/else checks on random variables
like your patch and the MULTI_KEYSTONE[6] patch, and eventually it
becomes very difficult to maintain and add to.

Does this make sense?


[1]: https://github.com/openstack-infra/devstack-gate/blob/8740b6075b53e3c9bfda76d022fcc53904594e9c/devstack-vm-gate.sh#L230
[2]: https://github.com/openstack-infra/devstack-gate/blob/8740b6075b53e3c9bfda76d022fcc53904594e9c/devstack-vm-gate.sh#L259

[3]: https://github.com/openstack-infra/devstack-gate/blob/8740b6075b53e3c9bfda76d022fcc53904594e9c/devstack-vm-gate.sh#L642

[4]: https://github.com/openstack-infra/devstack-gate/blob/8740b6075b53e3c9bfda76d022fcc53904594e9c/devstack-vm-gate.sh#L121

[5]: https://github.com/openstack-infra/devstack-gate/blob/8740b6075b53e3c9bfda76d022fcc53904594e9c/devstack-vm-gate.sh#L265

[6]: https://review.openstack.org/#/c/394895/
-- 
Sean M. Collins



More information about the OpenStack-dev mailing list