Bug 1303965 - upgrade to opendnssec-1.4.9-1.fc23 breaks old installations
Summary: upgrade to opendnssec-1.4.9-1.fc23 breaks old installations
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: opendnssec
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: Paul Wouters
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-02 14:42 UTC by Petr Spacek
Modified: 2016-12-20 18:23 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-20 18:23:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Spacek 2016-02-02 14:42:50 UTC
Description of problem:


Version-Release number of selected component (if applicable):
opendnssec-1.4.9-1.fc23.x86_64

How reproducible:
100 %

Steps to Reproduce:
1. install opendnssec < 1.4.8
2. configure opendnssec < 1.4.8 (initialize its database)
3. upgrade to opendnssec 1.4.9

Actual results:
ods-enforcerd fails to start with message:
"ERROR: database version number incompatible with software; require 4, found 3. Please run the migration scripts" and enforcer does not start.


Expected results:
Migration scripts are run during RPM upgrade.


Additional info:
Migration scripts can be found in opendnssec-1.4.9/enforcer/utils/ in the source tree.

Comment 1 Paul Wouters 2016-02-17 15:28:42 UTC
yeah, this indeed works:

sqlite3 /var/opendnssec/kasp.db < migrate_1_4_8.sqlite3

I guess we should run a sqlite3 command to test the version, and then run
the migration script if the version is too low. I'll copy the sqlite3 into
the /usr/share/opendnssec/ directory where some other scripts live too.

Any preference for %post or a systemd service file?

Comment 2 Petr Spacek 2016-02-17 16:18:01 UTC
I do not have any preference.

Comment 3 Tuomo Soini 2016-02-17 16:46:16 UTC
trigger.

Comment 4 René van Dorst 2016-02-17 20:29:20 UTC
This happens to me too today after update.

Comment 5 Paul Wouters 2016-02-18 03:16:56 UTC
Can you try this build: http://koji.fedoraproject.org/koji/taskinfo?taskID=13028950


Please do make a backup of /var/lib/softhsm and /var/opendnssec (and possibly /etc/softhsm* and /etc/opendnssec


That build _should_ perform the migration. It also now runs initialization of opendnssec if /var/opendnssec/kasp.db is zero length (i.e new install, because on new install we only initialized softhsm, not opendnssec, and one had to run ods-ksmutil setup manually)

Comment 6 Paul Wouters 2016-02-18 03:18:10 UTC
tuomo: my build used %post instead of %trigger

Basically:

%post
# Initialise a slot on the softhsm on first install
if [ "$1" -eq 1 ]; then
   %{_sbindir}/runuser -u ods -- %{_bindir}/softhsm2-util --init-token \
                --slot 0 --label "OpenDNSSEC" --pin 1234 --so-pin 1234
   if [ ! -s %{_localstatedir}opendnssec/kasp.db ]; then
      echo y | %{_bindir}/ods-ksmutil setup
   fi
fi

# Migrate version 3 db to version 4 db
if [ "`%{_bindir}/sqlite3 %{_localstatedir}/%{name}/kasp.db 'select version from dbadmin;'`" != "4" ]; then
   %{_bindir}/sqlite3 %{_localstatedir}/%{name}/kasp.db < %{_datadir}/%{name}/migrate_1_4_8.sqlite3
fi

Comment 7 Lucas Diedrich 2016-03-07 14:35:00 UTC
By the help from Petr Spacek i was able to download the package manually from http://koji.fedoraproject.org/koji/taskinfo?taskID=13028950 a installed using "dnf install opendnssec-1.4.9-3.fc23.x86_64.rpm"

Now the opendnssec service is working fine using Fedora 23 - server edition.
https://fpaste.org/335144/14573612/

Thanks.

Comment 8 Fedora End Of Life 2016-11-24 15:20:57 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Fedora End Of Life 2016-12-20 18:23:05 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.