Kolla-ansible can't create default server pool for Designate
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| kolla-ansible |
High
|
wu.chunyang | ||
| Stein |
High
|
Unassigned | ||
| Train |
High
|
Unassigned | ||
| Ussuri |
High
|
Unassigned | ||
| Victoria |
High
|
wu.chunyang |
Bug Description
I'm using kolla-ansible 9.0.0.0rc1, designate from stable/train
1. "Designate" to work requires pool of DNS Servers.
2. Kolla-ansible creates /etc/kolla/
- name: default-bind
id: 387cb738-
description: Default BIND9 Pool
attributes: {}
...
3. pool "id" is defined globally in passwords.yml, variable designate_pool_id
4. the same "id" is also used in designate.conf, content:
...
[service:central]
default_pool_id = 387cb738-
...
5. kolla-ansible updates pools here: kolla-ansible/
but this do not take effect - nothing happen, pools are not defined because of "designate-manage" work flow
6. latest "designate-manage" work as following:
- if pool id is defined in pools.yaml it looking for existing pool with that id and then update it if exists, never creates new pool.
- if pool id is not defined in pools.yaml it looking for existing pool with defined name and update it if exists. If pool does not exists, **creates it**.
7. after "Designate" installing empty pool named 'default' exists, with auto generated id
8. In my opinion kolla-ansible should work as following:
- do not use pool id defined in passwords.yml
- should read 'default' pool id from "Designate" and use it in place of designate_pool_id. I'm doing it manually and it works for me.
Regards,
Wojtek
Mark Goddard (mgoddard) wrote : | #1 |
Wojtek Rakoniewski (enter2608) wrote : | #2 |
Hi Mark,
I'm not sure but you may have right with chicken and egg. I first installed designate then change configuration and run kolla-ansible reconfigure so I fixed it manually. I do not check if installation is possible when default_pool_id is not defined in first steps.
Maybe better is to fix designate-manage, I also checked source, look from line 110
https:/
When there is no 'id' in yaml file, in line 120 exception PoolNotFound will be raised and serviced in line 144, pool will be created in line 156 as you wrote.
When there is 'id' in yaml, exception raised in line 112 will be serviced in line 114. After 'continue' in line 118 next pool from yaml will be serviced in next iteration of loop so **pool will not be created**
Part of designate-
2019-12-09 19:38:12.617 25 CRITICAL designate.
Traceback (most recent call last):
File "/var/lib/
return f(self, *args, **kwargs)
File "/var/lib/
return self.storage.
File "/var/lib/
return self._find_
File "/var/lib/
sort_dir)
File "/var/lib/
raise exc_notfound(msg)
designate.
: designate.
Regards,
Wojtek
description: | updated |
Mark Goddard (mgoddard) wrote : | #3 |
I see, thanks for the explanation. Is this something you can work on?
Changed in kolla-ansible: | |
status: | New → Triaged |
importance: | Undecided → Medium |
tags: | added: designate |
Viorel-Cosmin Miron (uhl-hosting) wrote : | #4 |
I can confirm that this is still not fixed and that the generated id of the pool is not matching the one used in the pool.
- the pool exists in designate-worker
- user needs to manually update the id of the pool in passwords
- reconfigure -t designate
user can add zones and create pools in both horizon and via cli.
Radosław Piliszek (yoctozepto) wrote : | #5 |
Possible duplicate (but not exact): https:/
Radosław Piliszek (yoctozepto) wrote : | #6 |
Designate seems to create the default pool called "default" with config-specified default_pool_id via migrations (during the bootstrap): https:/
Changed in kolla-ansible: | |
importance: | Medium → High |
Xing Zhang (xingzhang) wrote : | #7 |
Maybe it's designate's bug:
https:/
yao ning (mslovy11022) wrote : | #8 |
duplicate: https:/
I find out this is exactly a bug in designate. not related to kolla-ansible.
the default_pool_id config under section [service:central] does not work properly when running command "designate-manage database xxx" or "designate-manage pool xxxx".
This is because the code below:
https:/
https:/
the code in manage.py says, even if we execute "designate-manage database", we also load the default cli params for command "designate-manage pool"
then the code in pool.py, it is recursively defined default_pool_id from cli by the default opts values in conf. that means "register_
I think we need someone help from designate project to suggest how to fix it in designate.
Changed in kolla-ansible: | |
assignee: | nobody → wu.chunyang (wuchunyang) |
wu.chunyang (wuchunyang) wrote : | #9 |
hi, this is a designate bug, the default_pool_id opt didn't registered before executing designate-manage database sync. i have proposed a patch [1] to fix it.
we will create a default pool with the right default_pool_id now. and then default pool can be updated by `desigante manage update`[2]
this works for me.
[1]https:/
[2]https:/
Mark Goddard (mgoddard) wrote : | #10 |
This issue has been fixed in designate in Victoria, according to the above comment.
Hi Wojtek, I think there is a chicken and egg problem with your proposal - we need to configure the pool ID in designate config, but need designate to be running in order to query the pool ID.
I checked the code for designate manage, and if the pool is not found then it is created. https:/ /opendev. org/openstack/ designate/ src/commit/ d9fb34767c5bd9f 8f822acc2b91715 db45ab68db/ designate/ manage/ pool.py# L156