Uploaded image for project: 'OpenDNSSEC'
  1. OpenDNSSEC
  2. OPENDNSSEC-338

ods-ksmutil zone delete --all does not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.10, 1.4.0b1
    • Fix Version/s: 1.3.11, 1.4.0b2
    • Component/s: Enforcer
    • Labels:
      None

      Description

      Reported by Stuart on the user list, looking at the database schema and the code its clear that the key does not get decoupled from the zone and that will block the zone delete because of the constraint.


      I'm using Mysql instead of Sqlite, I have imported 500 zones, when I tried to delete all the zones using 'ods-ksmutil zone delete --all',
      I got
      '
      ERROR: error executing SQL - Cannot delete or update a parent row: a foreign key constraint fails (`KASP`.`dnsseckeys`, CONSTRAINT `dnsseckeys_ibfk_1` FOREIGN KEY (`zone_id`) REFERENCES `zones` (`id`))
      ERROR: database operation failed - Cannot delete or update a parent row: a foreign key constraint fails (`KASP`.`dnsseckeys`, CONSTRAINT `dnsseckeys_ibfk_1` FOREIGN KEY (`zone_id`) REFERENCES `zones` (`id`))
      Error: failed to remove zone from database
      '
      I think OpenDNSSEC wants to delete data in table dnsseckeys but forgets to delete data in table zones first?

      And I also got messages bellow when I tried to list the zones in db:
      Found zone test1 in DB but not zonelist.
      Found zone test2 in DB but not zonelist.

        Attachments

          Activity

            People

            Assignee:
            sion Siôn Lloyd
            Reporter:
            jerry Jerry Lundström
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: