Page MenuHomePhabricator

openstack: wmf sink: extend it to support IPv6
Closed, ResolvedPublic

Related Objects

Event Timeline

aborrero updated the task description. (Show Details)

Change #1083820 had a related patch set uploaded (by Arturo Borrero Gonzalez; author: Arturo Borrero Gonzalez):

[operations/puppet@production] openstack: designate: nova_fixed_multi: base: refactor record creation routine

https://gerrit.wikimedia.org/r/1083820

the native upstream designate notification handler code does a good chunk of the things we do in our custom code.

In particular:

The only missing bit for what we do in the upstream designate handler is PTR creation.

We may benefit from adopting the upstream code for A/AAAA record creation, and reducing the scope of our own custom handler to PTR creation.

The actions:

  • drop wmf nova_fixed_multi (and base)
  • adopt upstream designate nova_fixed handler
  • create a new handler to work with PTR records

Change #1083820 abandoned by Arturo Borrero Gonzalez:

[operations/puppet@production] openstack: designate: nova_fixed_multi: base: refactor record creation routine

Reason:

taking a different route

https://gerrit.wikimedia.org/r/1083820

I'm now testing the code.

  • I disabled puppet on cloudlb2001-dev to force nova and designate request to go to cloudcontrol2004-dev
  • I disabled puppet on cloudcontrol2004-dev, edited /etc/designate/designate.conf with content:
[service:sink]
# List of notification handlers to enable, configuration of these needs to
# correspond to a [handler:my_driver] section below or else in the config
# Can be one or more of : nova_fixed, neutron_floatingip
enabled_notification_handlers = nova_fixed, wmf_sink, wmcs_nova_fixed_ptr 

[handler:nova_fixed]
zone_id = 4c754100-1790-4858-a583-9de93c9e8b3d

[handler:wmcs_nova_fixed_ptr]
# handler-specific configuration
domain_name = eqiad1.wikimedia.cloud 
ptr_v4_zone_id = 187fdc06-c5d2-46e1-ab71-97d34dd067ce
ptr_v6_zone_id = 7a2210a4-3a55-48d8-9713-0256d7d9bc1b
git clone https://gitlab.wikimedia.org/repos/cloud/cloud-vps/designate-sink-wmcs-nova-fixed-ptr
cd designate-sink-wmcs-nova-fixed-ptr
sudo cp -r wmcs_nova_fixed_ptr /usr/local/lib/python3.11/dist-packages/
  • restarted designate and nova

Mentioned in SAL (#wikimedia-cloud) [2024-11-04T13:52:29Z] <arturo> [codfw1dev] live-hack cloudlb2001-dev and cloudcontrol2004-dev for T378192

I can't make the service work as expected. It seems designate-sink refuses to call the handlers, with this config:

[service:sink]
enabled_notification_handlers = nova, wmf_sink, wmcs_nova_fixed_ptr

[handler:nova_fixed]
notification_topics = monitor
notification_topics = notifications
control_exchange = nova

[handler:wmcs_nova_fixed_ptr]
domain_name = eqiad1.wikimedia.cloud
ptr_v4_zone_id = 187fdc06-c5d2-46e1-ab71-97d34dd067ce
ptr_v6_zone_id = 7a2210a4-3a55-48d8-9713-0256d7d9bc1b
notification_topics = monitor
notification_topics = notifications
control_exchange = nova

I also tried with enabled_notification_handlers = nova_fixed, wmf_sink, wmcs_nova_fixed_ptr

Mentioned in SAL (#wikimedia-cloud) [2024-11-05T10:24:09Z] <arturo> [codfw1dev] disable puppet and make changes for testing T378192

Some good progress today. I was able to get designate-sink to run the new code.

The config in /etc/designate/designate.conf:

[service:sink]
enabled_notification_handlers = nova_fixed, wmcs_nova_fixed_ptr, wmf_sink

[handler:nova_fixed]
notification_topics = monitor
notification_topics = notifications
control_exchange = nova
zone_id = 4c754100-1790-4858-a583-9de93c9e8b3d
formatv4 = '%(hostname)s.%(project)s.%(zone)s'
formatv6 = '%(hostname)s.%(project)s.%(zone)s'

[handler:wmcs_nova_fixed_ptr]
domain_name = codfw1dev.wikimedia.cloud
ptr_v4_zone_id = 187fdc06-c5d2-46e1-ab71-97d34dd067ce
ptr_v6_zone_id = 7a2210a4-3a55-48d8-9713-0256d7d9bc1b
notification_topics = monitor
notification_topics = notifications
control_exchange = nova

To deploy the code, I did the following:

user@cloudcontrol:~$ cat /usr/lib/python3/dist-packages/wmcs_nova_fixed_ptr.egg-info/entry_points.txt
[designate.notification.handler]
wmcs_nova_fixed_ptr = wmcs_nova_fixed_ptr.wmcs_nova_fixed_ptr:WMCSNovaFixedPtrHandler

Then:

user@cloudcontrol:~$ git clone https://gitlab.wikimedia.org/repos/cloud/cloud-vps/designate-sink-wmcs-nova-fixed-ptr
user@cloudcontrol:~$ cd designate-sink-wmcs-nova-fixed-ptr
user@cloudcontrol:~$ sudo cp -r wmcs_nova_fixed_ptr /usr/local/lib/python3.11/dist-packages/

Then restart designate-sink:

user@cloudcontrol:~$ systemctl restart designate-sink

seems to be working as expected:

aborrero@bastion-codfw1dev-04:~$ host fullstackd-20241105162427.admin-monitoring.codfw1dev.wikimedia.cloud
fullstackd-20241105162427.admin-monitoring.codfw1dev.wikimedia.cloud has address 172.16.129.162
fullstackd-20241105162427.admin-monitoring.codfw1dev.wikimedia.cloud has IPv6 address 2a02:ec80:a100:1::2a1
aborrero@bastion-codfw1dev-04:~$ host 172.16.129.162
162.129.16.172.in-addr.arpa domain name pointer fullstackd-20241105162427.admin-monitoring.codfw1dev.wikimedia.cloud.
aborrero@bastion-codfw1dev-04:~$ host 2a02:ec80:a100:1::2a1
1.a.2.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.0.0.0.1.a.0.8.c.e.2.0.a.2.ip6.arpa domain name pointer fullstackd-20241105162427.admin-monitoring.codfw1dev.wikimedia.cloud.

Change #1087521 had a related patch set uploaded (by Arturo Borrero Gonzalez; author: Arturo Borrero Gonzalez):

[operations/puppet@production] openstack: designate: deploy and enable wmcs-nova-fixed-ptr

https://gerrit.wikimedia.org/r/1087521

Change #1087521 merged by Arturo Borrero Gonzalez:

[operations/puppet@production] openstack: designate: deploy wmcs_nova_fixed_ptr

https://gerrit.wikimedia.org/r/1087521

aborrero changed the task status from Open to In Progress.Nov 7 2024, 4:30 PM

code was deployed and enabled in codfw1dev. Tomorrow I'll check everything is working as expected before declaring victory.

I saw several failures today. I was unable to create VMs by hand, because nova failures when scheduling VMs.

Also, some failures related to nova-fullstack T379356: openstack: nova-fullstack: add support for IPv6

At the end, I was unable to confirm the new plugin is working as expeted.

ok, after restarting a few more openstack things:

aborrero@bastion-codfw1dev-04:~$ host please-work.cloudinfra-codfw1dev.codfw1dev.wikimedia.cloud
please-work.cloudinfra-codfw1dev.codfw1dev.wikimedia.cloud has address 172.16.129.95
please-work.cloudinfra-codfw1dev.codfw1dev.wikimedia.cloud has IPv6 address 2a02:ec80:a100:1::353
aborrero@bastion-codfw1dev-04:~$ host 172.16.129.95
95.129.16.172.in-addr.arpa domain name pointer please-work.cloudinfra-codfw1dev.codfw1dev.wikimedia.cloud.
aborrero@bastion-codfw1dev-04:~$ host 2a02:ec80:a100:1::353
3.5.3.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.0.0.0.1.a.0.8.c.e.2.0.a.2.ip6.arpa domain name pointer please-work.cloudinfra-codfw1dev.codfw1dev.wikimedia.cloud.
aborrero claimed this task.

Change #1138373 had a related patch set uploaded (by Majavah; author: Majavah):

[operations/puppet@production] openstack: designate: Remove nova_fixed_multi code

https://gerrit.wikimedia.org/r/1138373

Change #1138373 merged by Majavah:

[operations/puppet@production] openstack: designate: Remove nova_fixed_multi code

https://gerrit.wikimedia.org/r/1138373