Opened 4 years ago

Closed 3 weeks ago

#3543 closed enhancement (duplicate)

Implement control socket for DDNS

Reported by: tomek Owned by: tmark
Priority: medium Milestone: Kea1.5
Component: ddns Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 2
Total Hours: 10 Internal?: no

Description (last modified by tomek)

After the design (#3540) is done, we should implement control socket in DDNS server.

D2, our DHCP-DDNS update daemon, does not support control channel. CA does support it and has a section for D2 communication, tries to open a socket etc, but fails ultimately, because D2 is not able to listen on that socket.

The absolute minimum required are the following commands:

version-get
build-report
shutdown

Since it is unclear whether we'll be able to squeeze this into 1.3, adding this with low priority.

Subtickets

Change History (26)

comment:1 Changed 4 years ago by tomek

  • Priority changed from medium to low

comment:2 Changed 4 years ago by tomek

This ticket also covers extending the DDNS server to support existing commands over control socket. This should be very easy to do, though. It's just a matter of calling existing handlers.

comment:3 Changed 4 years ago by tomek

  • Milestone changed from Kea0.9.1 to Kea0.9.2

Moving to 0.9.2 as discussed on 2014-12-17 Kea call.

comment:4 Changed 3 years ago by hschempf

  • Milestone changed from Kea0.9.2 to Kea1.1

comment:5 Changed 3 years ago by tomek

  • Milestone changed from Kea1.1 to DHCP Outstanding Tasks

comment:6 Changed 3 years ago by tomek

  • Milestone changed from DHCP Outstanding Tasks to Outstanding Tasks

Milestone renamed

comment:7 Changed 2 years ago by tomek

  • Milestone changed from Outstanding Tasks to Kea1.2

comment:8 Changed 2 years ago by tomek

  • Milestone changed from Kea1.2 to Kea-proposed

comment:9 Changed 2 years ago by stephen

  • Milestone changed from Kea-proposed to Kea1.3

comment:10 Changed 16 months ago by tomek

  • Description modified (diff)

comment:11 Changed 15 months ago by tomek

  • Milestone changed from Kea1.3 to Kea 1.4

After discussing with Stephen, pushed back several tickets to lower the workload in 1.3.

comment:12 Changed 12 months ago by tomek

  • Milestone changed from Kea 1.4 to Kea1.4

Milestone renamed

comment:13 Changed 5 months ago by tomek

  • Component changed from management API to ddns
  • Milestone changed from Kea1.4 to Kea1.5
  • Priority changed from low to medium

As discussed on 2018-04-26 call, moving to 1.5 as medium.

comment:14 Changed 3 months ago by fdupont

  • Owner set to fdupont
  • Status changed from new to accepted

comment:15 Changed 3 months ago by fdupont

  • Add Hours to Ticket changed from 0 to 8
  • Total Hours changed from 0 to 8

Almost done (still todo: port some unit tests for corner cases, update agent, consider augmenting shutdown and adding config-set).

comment:16 Changed 3 months ago by fdupont

  • Add Hours to Ticket changed from 8 to 2
  • Owner changed from fdupont to UnAssigned
  • Status changed from accepted to reviewing
  • Total Hours changed from 8 to 10

Ready for review.

comment:17 Changed 2 months ago by fdupont

Note there is no config-set even it should not be hard to add...

comment:18 Changed 8 weeks ago by tmark

  • Owner changed from UnAssigned to tmark

comment:19 Changed 7 weeks ago by tmark

  • Owner changed from tmark to fdupont

I did some testing, and discovered that a configuration reload via SIGHUP no longer functions. The issue stems from a few things. The primary culprit is that the "old" control socket information is actually lost, when the D2 configuration context is reset in here DCfgMgrBase::parseConfig(). So a currently open socket does not get closed, because we do not think it exists.

Having found a way around that, the next issue is an "address already in use" error which occurs if you close the existing control socket and then immediately try to open a new one.

We should restructure process lib, such that it retains a current and staging copy of the configuration context, mirroring what is done in dhcpsrv. This could be used to compare old
and new values, such as the control socket.

We need to make ensure rollback functions if the control socket fails to open.

comment:20 follow-up: Changed 5 weeks ago by fdupont

  • Owner changed from fdupont to tmark

We should discuss about this at the next conf call. What to do propose?

  • address this in this ticket taking the risk to create a large change
  • give up
  • create a ticket to address required process library update

I vote for the last option.

comment:21 Changed 5 weeks ago by tomek

Going with smaller tickets is usually better. When creating new tickets, please use gitlab. Don't add new tickets in trac anymore.

comment:22 in reply to: ↑ 20 Changed 5 weeks ago by tmark

Replying to fdupont:

We should discuss about this at the next conf call. What to do propose?

  • address this in this ticket taking the risk to create a large change
  • give up
  • create a ticket to address required process library update

I vote for the last option.

The last option. Create a new ticket to address process lib changes, and then come back to this one and rework it.

comment:23 Changed 5 weeks ago by fdupont

  • Owner changed from tmark to UnAssigned

Gitlab issue 18 was created.

comment:24 Changed 5 weeks ago by fdupont

  • Owner changed from UnAssigned to fdupont
  • Status changed from reviewing to accepted

Not really convinced (after an attempt) that lib process must be updated. I shall retry a more direct fix inside the D2 code.

comment:25 Changed 5 weeks ago by fdupont

  • Owner changed from fdupont to tmark
  • Status changed from accepted to reviewing

Complete the fix which seems to address the issue (I started the d2 server with a config including a control socket, it accepted commands even after a reload by HUP signal).
Ready for another round. Note if you agree we can close the Issue and merge request.

comment:26 Changed 3 weeks ago by tomek

  • Resolution set to duplicate
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.