'attribute' and 'pool_id_attribute' scheduler filters are mutally exclusive
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Designate |
Fix Released
|
High
|
Graham Hayes |
Bug Description
Hello,
I've recently observed the following problem - the following Designate scheduler filters cannot be used at the same time: attribute, pool_id_attribute.
If we have the following settings in /etc/designate/
scheduler_filters = attribute, pool_id_attribute, in_doubt_
and we try to schedule the newly created zone to a particular pool by id - this will not work, because the 'attribute' filter will throw all the pools out. "Pool_attributes" objects do not have the 'pool_id' set be default.
Creating a new zone with pool_id attribute:
curl -vv -g -i -X POST http://
{
"attributes": {
"pool_id": "3ca13c45-
},
"email": "<email address hidden>",
"name": "openstacknew3.
}'
The designate-
2018-02-15 09:38:37.929 374 DEBUG designate.
2018-02-15 09:38:37.930 374 DEBUG designate.
2018-02-15 09:38:37.930 374 DEBUG designate.
2018-02-15 09:38:37.948 374 DEBUG designate.
Attribute filter removed all pools.. and than the 'fallback' filter makes zone being scheduled to default pool, so:
[root@aio1-
+------
| Field | Value |
+------
| action | NONE |
| attributes | pool_id:
| | |
| created_at | 2018-02-
| description | None |
| email | <email address hidden> |
| expire | 91400 |
| id | 5453fc07-
| masters | |
| minimum | 3600 |
| name | openstacknew3.tech. |
| pool_id | 794ccc2c-
| project_id | b8a1e1371d22406
| refresh | 3596 |
| retry | 900 |
| serial | 1518687517 |
| status | ACTIVE |
| transferred_at | None |
| ttl | 3600 |
| type | PRIMARY |
| updated_at | 2018-02-
| version | 2 |
+------
We can change the filter order in configuration, but the final result will be the same as attributes filter will throw out all pools on the second step instead of the first.
Expected:
is that we can use both 'pool_id' and other attributes (like tier; label; etc) for scheduling the zone. If 'pool_id' was explicitly given - we'd like the zone to be exactly in this pool. If labels/attributes were defined - scheduling should happen based on those.
Changed in designate: | |
status: | In Progress → Fix Released |
P.S. the quick workaround is to have 'pool_id' defined in attributes section for each pool defined in /etc/designate/ pools.yaml
but in my opinion the 'pool_id_attribute' filter should rater be merged into the 'attribute' filter so that if 'pool_id' was specified with the request -> the zone should be scheduled to pool with the specified id, or in other case - based on any other given attributes.