Designate Yoga Reconfigure Update DNS Pools Failed

Bug #2012292 reported by LuuVuong
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
kolla-ansible
Incomplete
Medium
Gaël THEROND

Bug Description

I upgrade from openstack xena to yoga by kolla-ansiable failed in Designate, i try reconfigure designate but no success with logs below

TASK [designate : Update DNS pools] ********************************************
fatal: [controller01 -> controller01]: FAILED! => {"changed": true, "cmd": ["docker", "exec", "-t", "designate_worker", "designate-manage", "pool", "update", "--file", "/etc/designate/pools.yaml"], "delta": "0:00:05.701786", "end": "2023-03-20 22:52:00.934583", "msg": "non-zero return code", "rc": 1, "start": "2023-03-20 22:51:55.232797", "stderr": "", "stderr_lines": [], "stdout": "Updating Pools Configuration\r\n****************************", "stdout_lines": ["Updating Pools Configuration", "****************************"]}

NO MORE HOSTS LEFT *************************************************************

Please check help me!

Revision history for this message
Gaël THEROND (gtherond) wrote :

I'll patch this one, the issue lie with the fact that designate-manage command do not provide enough documentation about how it works.

Currently, there are two ways to update the pools:

The first way is through "designate-manage pool update" it simply match pools from DB and file and add the pools that are present on file but not in DB.

the second one is through "designate-manage pool update --delete" this one simply delete all pools that are present within the DB but not on file.

Changed in kolla-ansible:
status: New → Confirmed
assignee: nobody → Gaël THEROND (fl1nt)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (master)
Changed in kolla-ansible:
status: Confirmed → In Progress
Revision history for this message
LuuVuong (luuvuong) wrote :

Hi,
I try update "docker exec -t designate_worker designate-manage pool update --file /etc/designate/pools.yaml" to "docker exec -t designate_worker designate-manage pool update" in file /kolla-ansible/ansible/roles/designate/tasks/update_pools.yml and reconfigure again but FAILED with log:

TASK [designate : Update DNS pools] ********************************************
fatal: [controller01 -> controller01]: FAILED! => {"changed": true, "cmd": ["docker", "exec", "-t", "designate_worker", "designate-manage", "pool", "update", "--file", "/etc/designate/pools.yaml"], "delta": "0:00:05.701786", "end": "2023-03-20 22:52:00.934583", "msg": "non-zero return code", "rc": 1, "start": "2023-03-20 22:51:55.232797", "stderr": "", "stderr_lines": [], "stdout": "Updating Pools Configuration\r\n****************************", "stdout_lines": ["Updating Pools Configuration", "****************************"]}

NO MORE HOSTS LEFT *************************************************************

Revision history for this message
Gaël THEROND (gtherond) wrote :

From the log you posted you still have docker to call for --file.

Revision history for this message
LuuVuong (luuvuong) wrote :

Hi,
I try reconfigure but Failed, this is log Failed

TASK [designate : Update DNS pools] ********************************************
fatal: [controller01 -> controller01]: FAILED! => {"changed": true, "cmd": ["docker", "exec", "-t", "designate_worker", "designate-manage", "pool", "update"], "delta": "0:00:02.869349", "end": "2023-03-21 22:05:07.152252", "msg": "non-zero return code", "rc": 1, "start": "2023-03-21 22:05:04.282903", "stderr": "", "stderr_lines": [], "stdout": "Updating Pools Configuration\r\n****************************", "stdout_lines": ["Updating Pools Configuration", "****************************"]}

NO MORE HOSTS LEFT *************************************************************

Revision history for this message
Gaël THEROND (gtherond) wrote :

Is that environment a production environment?
If not, could you please share your pools.yaml file and a docker exec -t designate_worker designate-manage pool show_config --pool_id <YOUR POOL ID> output?

Another one would be to resync completely from the file using:

docker exec -t designate_worker designate-manage pool update --delete but be careful as this command will destroy any pool and associated zone and replace them with the pools of the pools.yaml file.

TBN: It works perfectly on my side with a simple update and I'm testing on a fresh victoria deployment too.

Revision history for this message
LuuVuong (luuvuong) wrote :

Hi,
It is in a Staging environment. This is Output "designate-manage pool show_config --pool_id"
-------------------
also_notifies: []
attributes: {}
description: Default BIND9 Pool
id: dc90f5bd-fa2d-400f-8144-9f6def52d9cc
name: default-bind
nameservers:
- host: 10.10.30.5
  port: 53
- host: 10.10.30.3
  port: 53
- host: 10.10.30.4
  port: 53
ns_records:
- hostname: ns1.example.org.
  priority: 1
targets:
- description: BIND9 Server 10.10.30.4
  masters:
  - host: 10.10.30.4
    port: 5354
  - host: 10.10.30.3
    port: 5354
  - host: 10.10.30.5
    port: 5354
  options:
    host: 10.10.30.4
    port: '53'
    rndc_host: 10.10.30.4
    rndc_key_file: /etc/designate/rndc.key
    rndc_port: '953'
  type: bind9
- description: BIND9 Server 10.10.30.5
  masters:
  - host: 10.10.30.5
    port: 5354
  - host: 10.10.30.4
    port: 5354
  - host: 10.10.30.3
    port: 5354
  options:
    host: 10.10.30.5
    port: '53'
    rndc_host: 10.10.30.5
    rndc_key_file: /etc/designate/rndc.key
    rndc_port: '953'
  type: bind9
- description: BIND9 Server 10.10.30.3
  masters:
  - host: 10.10.30.3
    port: 5354
  - host: 10.10.30.5
    port: 5354
  - host: 10.10.30.4
    port: 5354
  options:
    host: 10.10.30.3
    port: '53'
    rndc_host: 10.10.30.3
    rndc_key_file: /etc/designate/rndc.key
    rndc_port: '953'
  type: bind9

I already try "docker exec -t designate_worker designate-manage pool update --delete" but after reconfig Failed

Revision history for this message
LuuVuong (luuvuong) wrote :

It work perfectly in xena version and Failed when upgrade to Yoga

Revision history for this message
Gaël THEROND (gtherond) wrote :

It doesn't work since a long time as victoria got the same issue.

From your logs, I'm pretty sure it doesn't work because you didn't changed the default designate_ns_record variable on your globals.yml file.

Beware that designate_ns_record need to be either a list of FQDN Bind DNS servers THAT RESOLVE or their IPs if your DNS server doesn't get DNS resolution.

so basically with 1 DNS Server:
designate_ns_record: "<YOUR_DNS_SERVER_FQDN>"

Exemple:
designate_ns_record: "ns1.domain.tld"

or

designate_ns_record: "10.123.10.10"

and with many:

designate_ns_record:
  - "ns1.domain.tld"
  - "ns2.domain.tld"
  - "ns3.domain.tld"

or

designate_ns_record:
  - "10.123.10.10"
  - "10.123.10.10"
  - "10.123.10.11"

Revision history for this message
LuuVuong (luuvuong) wrote :

Hi,
I /etc/kolla/globals.yml in already change designate_ns_record to:
designate_ns_record:
  - "ns1.domain.com"
  - "ns2.domain.com"
  - "ns3.domain.com"

But result in designate-manage pool show_config --pool_id:
ns_records:
- hostname: ns1.example.org.
  priority: 1

Do need edit in database designate ?

Revision history for this message
Gaël THEROND (gtherond) wrote : Re: [Bug 2012292] Re: Designate Yoga Reconfigure Update DNS Pools Failed

Nope it needs you to run a kolla-config deploy/reconfigure, the update will
reconfigure mdns in order to be able to send correct zone transfer requests
to your dns server.

Le mer. 22 mars 2023 à 09:00, LuuVuong <email address hidden> a
écrit :

> Hi,
> I /etc/kolla/globals.yml in already change designate_ns_record to:
> designate_ns_record:
> - "ns1.domain.com"
> - "ns2.domain.com"
> - "ns3.domain.com"
>
> But result in designate-manage pool show_config --pool_id:
> ns_records:
> - hostname: ns1.example.org.
> priority: 1
>
> Do need edit in database designate ?
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/2012292
>
> Title:
> Designate Yoga Reconfigure Update DNS Pools Failed
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kolla-ansible/+bug/2012292/+subscriptions
>
>

Revision history for this message
LuuVuong (luuvuong) wrote :

Hi,
I reconfigure and FAILED with logs below, i need solutions to fix for this problem

TASK [designate : Update DNS pools] ********************************************
fatal: [controller01 -> controller01]: FAILED! => {"changed": true, "cmd": ["docker", "exec", "-t", "designate_worker", "designate-manage", "pool", "update"], "delta": "0:00:02.950657", "end": "2023-03-22 15:00:59.020474", "msg": "non-zero return code", "rc": 1, "start": "2023-03-22 15:00:56.069817", "stderr": "", "stderr_lines": [], "stdout": "Updating Pools Configuration\r\n****************************", "stdout_lines": ["Updating Pools Configuration", "****************************"]}

NO MORE HOSTS LEFT *************************************************************

Revision history for this message
Gaël THEROND (gtherond) wrote :

A manual solution to fix that would be to:

1°/- docker restart designate_worker
2°/- docker exec -t designate_worker designate-manage pool update —delete
3°/- kolla-ansible deploy

It works 100% time with a fresh standard installation.

Le mer. 22 mars 2023 à 09:50, LuuVuong <email address hidden> a
écrit :

> Hi,
> I reconfigure and FAILED with logs below, i need solutions to fix for this
> problem
>
> TASK [designate : Update DNS pools]
> ********************************************
> fatal: [controller01 -> controller01]: FAILED! => {"changed": true, "cmd":
> ["docker", "exec", "-t", "designate_worker", "designate-manage", "pool",
> "update"], "delta": "0:00:02.950657", "end": "2023-03-22 15:00:59.020474",
> "msg": "non-zero return code", "rc": 1, "start": "2023-03-22
> 15:00:56.069817", "stderr": "", "stderr_lines": [], "stdout": "Updating
> Pools Configuration\r\n****************************", "stdout_lines":
> ["Updating Pools Configuration", "****************************"]}
>
> NO MORE HOSTS LEFT
> *************************************************************
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/2012292
>
> Title:
> Designate Yoga Reconfigure Update DNS Pools Failed
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kolla-ansible/+bug/2012292/+subscriptions
>
>

Revision history for this message
LuuVuong (luuvuong) wrote :

Hi,
It not working for me after run "kolla-ansible -i multinode reconfigure --tag designate" or "kolla-ansible -i multinode deploy --tag designate"

Revision history for this message
Gaël THEROND (gtherond) wrote :

Try running a full deployment without limits and tags.

Le mer. 22 mars 2023 à 10:55, LuuVuong <email address hidden> a
écrit :

> Hi,
> It not working for me after run "kolla-ansible -i multinode reconfigure
> --tag designate" or "kolla-ansible -i multinode deploy --tag designate"
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/2012292
>
> Title:
> Designate Yoga Reconfigure Update DNS Pools Failed
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kolla-ansible/+bug/2012292/+subscriptions
>
>

Revision history for this message
LuuVuong (luuvuong) wrote :

Hi,
Full deployment without limits and tags not working :(

Revision history for this message
Gaël THEROND (gtherond) wrote :

Can you show me your pools.yaml file? Don't forget that each pool need to get an ID and few other details, so that's why I've patched the current master branch pools.yaml.j2 file too in here: https://review.opendev.org/c/openstack/kolla-ansible/+/878270

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (master)

Reviewed: https://review.opendev.org/c/openstack/kolla-ansible/+/878063
Committed: https://opendev.org/openstack/kolla-ansible/commit/65ec728f5f4f4feed65f3f3353d7a6dae17bc2da
Submitter: "Zuul (22348)"
Branch: master

commit 65ec728f5f4f4feed65f3f3353d7a6dae17bc2da
Author: Gaël THEROND (Fl1nt) <email address hidden>
Date: Tue Mar 21 12:07:05 2023 +0100

    Fix improper designate-manage command usage.

      * Implicit use of default pools file path.
      * Use non-destructive update operation.

    Change-Id: Ib5f43a83d2267cd824f5215964d4ea1fea697e12
    Closes-Bug: #2012292

Changed in kolla-ansible:
status: In Progress → Fix Released
Mark Goddard (mgoddard)
Changed in kolla-ansible:
importance: Undecided → Medium
Revision history for this message
Mark Goddard (mgoddard) wrote :

I've reopened this bug because I don't believe the above patch fixes it.

Changed in kolla-ansible:
status: Fix Released → Triaged
Revision history for this message
Gaël THEROND (gtherond) wrote :

This bug will be fixed once https://review.opendev.org/c/openstack/kolla-ansible/+/878270 will be merged.

Changed in kolla-ansible:
status: Triaged → In Progress
Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

Please attach the designate-manage.log, to me it is not clear what the real issue should be here.

Changed in kolla-ansible:
status: In Progress → Incomplete
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on kolla-ansible (master)

Change abandoned by "Gaël THEROND <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/kolla-ansible/+/878270
Reason: I'm fed up with those back and forth nonsense.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 17.0.0.0rc1

This issue was fixed in the openstack/kolla-ansible 17.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.