xapi-project / xen-api

The Xapi Project's XenAPI Server
http://xenproject.org/developers/teams/xapi.html
Other
346 stars 283 forks source link

CP-50193: Update new fingerprint fields on DB upgrade #5786

Closed snwoods closed 2 months ago

snwoods commented 3 months ago

The new fingerprint_sha256 and fingerprint_sha1 fields will be empty when upgrading from a version without the fields. This commit checks for this and fills them in, stopping the certificate from being needlessly reinstalled.

snwoods commented 2 months ago

This looks good, have you tested this on a host?

Yep, tested on both an rt-next pool and a pool which had the sha1 changes. In both occasions, the logs showed that the certificate was not reinstalled and in the former case it showed the new fingerprint fields were populated. It correctly sent both sha256 and sha1 when requested on HOST_IS_SLAVE error.