#4275 closed enhancement (complete)

Extend PostgreSQL with the ability to store hosts

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

Description

The host reservation design is described here: HostReservationDesign.
We need to extend PostgreSQL to be able to store host reservations.

Subtickets

Change History (5)

comment:1 Changed 23 months ago by tomek

  • Component changed from Unclassified to host-reservations

comment:2 Changed 18 months ago by tmark

  • Estimated Difficulty changed from 0 to 40
  • Owner set to Unassigned
  • Status changed from new to reviewing
  • Total Hours changed from 0 to 12

Postgresql schema 3.0 is now content equivalent with MySql? Schema 4.2. I also created the 2.0 to 3.0 upgrade script and updated the tests for it.

In addition, I noticed that neither of RDBMS backends check for schema version compatibility when connecting to the database. I have modified PgsqlLeaseMgr? to check the schema version after opening the database. We should create a ticket to add the same to MySQl backend.

I suggest the following Changelog:

11xx.   [func]      tmark
    The Postgresql schema has been updated to support host reservations and its
    version number has been bumped 3.0.  This schema is content equivlent to
    the MySQL schema version 4.2.
    (Trac #4275, git TBD)

Ticket is ready for review.


comment:3 Changed 18 months ago by marcin

  • Owner changed from Unassigned to marcin

comment:4 Changed 18 months ago by marcin

  • Add Hours to Ticket changed from 0 to 2
  • Owner changed from marcin to tmark
  • Total Hours changed from 12 to 14

I reviewed commit a7db35543a95bb62bde70d8d23bffa00edd0cd78

ChangeLog: "has been bumped 3.0" => "has been bumped to 3.0" ?

Your changes look good with a couple of nits. After addressing them you're ok to merge it.

You should update .gitignore to include a new script: src/share/database/scripts/pgsql/upgrade_2.0_to_3.0.sh

src/bin/admin/tests/pgsql_tests.sh.in
Add space between '#' and 'lease' in line 194.

src/share/database/scripts/pgsql/dhcpdb_create.pgsql
host_identifier_type table: I forgot to add 'client-id' as one of the supported identifier types in MySQL. As a consequence, it seems you also missed 'client-id' value in Posgres schema. I will open a ticket to add it to MySQL, but please add it to PgSQL schema.

There could be a brief description of the dhcp_option_scope table as all other tables have such description.

hosts table description: add comma after 'indexes' and before 'foreign'. In general, it would be good to add commas to mark end of all sentences.

comment:5 Changed 18 months ago by tmark

  • Add Hours to Ticket changed from 2 to 1
  • Resolution set to complete
  • Status changed from reviewing to closed
  • Total Hours changed from 14 to 15

Addressed the above comments, thanks for doing the review.
Changes merged with git# 6f8e646bee9de22c921ed26409f3d1856ebce9e6
Added ChangeLog? entry 1132.

Ticket is complete.

Note: See TracTickets for help on using tickets.