+1799. [bug] fdupont
+ Checked execution of queries to get schema versions of MySQL
+ and PostgreSQL database in kea-admin.
+ (Gitlab #828)
+
1798. [bug] tmark
kea-dhcp4 now correctly updates DNS when a client
returns for lease after the lease has expired. Prior
to this, the server would remove the entries but then
fail to add them unless the hostname (or FQDN) changed.
- This change also eliminates redundant DNS removes when
+ This change also eliminates redundant DNS removes when
expired leases are reclaimed and given to different clients.
(Gitlab #1409)
if [ "$ERRCODE" -eq 0 ]; then
printf "Database version reported after initialization: "
- mysql_version
+ checked_mysql_version
printf "\n"
fi
exit 1
fi
- version=$(pgsql_version)
+ version=$(checked_pgsql_version)
printf "Database version reported after initialization: %s\n" "$version"
exit 0
}
exit 1
}
+checked_mysql_version() {
+ mysql_version
+ ERRCODE=$?
+ if [ $ERRCODE -ne 0 ]
+ then
+ log_error "Failed to get schema version, mysql status = $ERRCODE"
+ exit 1
+ fi
+}
+
+checked_pgsql_version() {
+ pgsql_version
+ ERRCODE=$?
+ if [ $ERRCODE -ne 0 ]
+ then
+ log_error "Failed to get schema version, pgsql status = $ERRCODE"
+ exit 1
+ fi
+}
+
### Functions used for upgrade
memfile_upgrade() {
# Useless as Kea converts CSV versions at startup.
mysql_upgrade() {
printf "Database version reported before upgrade: "
- mysql_version
+ checked_mysql_version
printf "\n"
# Check if the scripts directory exists at all.
done
printf "Database version reported after upgrade: "
- mysql_version
+ checked_mysql_version
printf "\n"
}
pgsql_upgrade() {
- version=$(pgsql_version)
+ version=$(checked_pgsql_version)
printf "Database version reported before upgrade: %s\n" "$version"
# Check if the scripts directory exists at all.
sh "${script}" -U "${db_user}" -h "${db_host}" -d "${db_name}"
done
- version=$(pgsql_version)
+ version=$(checked_pgsql_version)
printf "Database version reported after upgrade: %s\n" "$version"
exit 0
}
memfile_version
;;
mysql)
- mysql_version
+ checked_mysql_version
printf "\n"
;;
pgsql)
- pgsql_version
+ checked_pgsql_version
;;
cql)
cql_version