I've found what causes this strange behavior of Masakari - somehow variable region_name gets value "RegionTwo" (it's a proper name of second region) and Masakari tries to GET /os-services from this region's public endpoint. That's why it works without a problem in RegionTwo and doesn't work in RegionOne
In compute/nova.py , line 128 there is
region_name=CONF.os_region_name
when I replace it with
region_name='RegionOne'
everything works, I am able to add hosts to segment and I can see notifications, etc.
So the question is: How Masakari gets the value for region_name variable? And how to force it to get proper value? Maybe it's a common problem in multi-region environments?
I've found what causes this strange behavior of Masakari - somehow variable region_name gets value "RegionTwo" (it's a proper name of second region) and Masakari tries to GET /os-services from this region's public endpoint. That's why it works without a problem in RegionTwo and doesn't work in RegionOne
In compute/nova.py , line 128 there is
region_ name=CONF. os_region_ name
when I replace it with
region_ name='RegionOne '
everything works, I am able to add hosts to segment and I can see notifications, etc.
openstack segment list ------- ------- ------- ------- ----+-- ------- -+----- ------- -+----- ------- --+---- ------- ------+ ------- ------- ------- ------- ----+-- ------- -+----- ------- -+----- ------- --+---- ------- ------+ xxxxxxxxxxxxxxx 4f6e3ffeaa75 | pierwszy | None | COMPUTE | auto | ------- ------- ------- ------- ----+-- ------- -+----- ------- -+----- ------- --+---- ------- ------+ xxxxxxxxxxxxxxx xxxxx4f6e3ffeaa 75 ------- ------- ------- ------- ----+-- ------- ------- -+----- ----+-- ------- ------- ----+-- ------- -+----- ------- ----+-- ------- ------- ------- ------- ------- -+ ------- ------- ------- ------- ----+-- ------- ------- -+----- ----+-- ------- ------- ----+-- ------- -+----- ------- ----+-- ------- ------- ------- ------- ------- -+ xxxxxxxxxxxxxxx xxxx133994b8 | compute2 | compute | ssh | False | False | ffa57bf0- xxxxxxxxxxxxxxx 4f6e3ffeaa75 | xxxxxxxxxxxxxxx xxxxb928e571 | compute1 | compute | ssh | False | False | ffa57bf0- xxxxxxxxxxxxxxx 4f6e3ffeaa75 | ------- ------- ------- ------- ----+-- ------- ------- -+----- ----+-- ------- ------- ----+-- ------- -+----- ------- ----+-- ------- ------- ------- ------- ------- -+
+------
| uuid | name | description | service_type | recovery_method |
+------
| ffa57bf0-
+------
openstack segment host list ffa57bf0-
+------
| uuid | name | type | control_attributes | reserved | on_maintenance | failover_segment_id |
+------
| e8e95c4b-
| 8ad367a7-
+------
So the question is: How Masakari gets the value for region_name variable? And how to force it to get proper value? Maybe it's a common problem in multi-region environments?