Opened 9 years ago

Last modified 4 years ago

#679 assigned enhancement

More clever switching of listening addresses and ports

Reported by: vorner Owned by: UnAssigned
Priority: medium Milestone: Outstanding Tasks
Component: sockcreator Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DNS Feature Depending on Ticket:
Estimated Difficulty: 0.0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

Currently, when user changes addresses and ports (listen_on), isc::server_common::portconfig::installAddresses is invoked. It closes all old sockets and create new ones.

But if there are common sockets in old and new configuration, it is both unneeded and may cause a short break in service. So a more fancy way of switching them should be done.

The idea is to open the new ports, then close the old ones and keep the same ones untouched. (In this order, we can check we can get the new ones without losing the old ones, so it is easier to rollback)

Subtickets

Change History (10)

comment:1 Changed 9 years ago by stephen

  • Milestone A-Team-Task-Backlog deleted

Milestone A-Team-Task-Backlog deleted

comment:2 Changed 8 years ago by shane

  • Defect Severity set to N/A
  • Owner set to vorner
  • Status changed from new to assigned
  • Sub-Project set to DNS

Michal, is this still an issue with the socket creator now active?

comment:3 Changed 8 years ago by vorner

  • Milestone set to New Tasks
  • Owner changed from vorner to shane

As I just looked at the code, it is still valid, sockets are first closed and then created (requested from the socket creator) first.

However, with socket creator, it should be easier to accomplish the goal ‒ we can simply do this:

  • First, ask for all the socket file descriptors of the new configuration. This is the operation which will fail most probably. Also, if there's a common address+port between the new and old configuration, we get another copy, which makes the socket alive during the operation, so we don't need to ask the OS for it again and we don't lose any packets.
  • Then replace the old sockets with new ones. This should generally be safe.
  • Close the old sockets and return them to the socket creator/boss. If they are no longer used, they are closed there as well. If we have a different copy of the same one, they are preserved because of them.

comment:4 Changed 8 years ago by shane

  • Milestone New Tasks deleted

comment:5 Changed 8 years ago by shane

  • Owner changed from shane to UnAssigned

comment:6 Changed 6 years ago by tomek

  • Milestone set to Remaining BIND10 tickets

comment:7 Changed 6 years ago by tomek

  • Component changed from Unclassified to sockcreator
  • Milestone changed from Remaining BIND10 tickets to Common Outstanding Tasks
  • Version set to git

comment:8 Changed 5 years ago by tomek

While the specifics this ticket mentions are outdated (was bind10 specific code), the general principle still applies to Kea.

comment:9 Changed 4 years ago by tomek

  • Milestone changed from Common Outstanding Tasks to DHCP Outstanding Tasks

comment:10 Changed 4 years ago by tomek

  • Milestone changed from DHCP Outstanding Tasks to Outstanding Tasks

Milestone renamed

Note: See TracTickets for help on using tickets.