Dear Karsten,

Sorry for the delay.


may I ask for confirmation of the following behaviour:

If Orthanc is manually started for a DB upgrade

        (say, on Debian:)
        /usr/sbin/Orthanc --upgrade --trace /etc/orthanc/

BUT the database is already at the required version THEN
Orthanc will not run the upgrade and fall back to starting
up as if --upgrade was not specified on the command line.

No: If the "--upgrade" command-line option is provided, the Orthanc server will never start. If no upgrade is required, this is a void operation that returns immediately.


The Orthanc book makes me think that when an upgrade is
actually run Orthanc will automatically stop after upgrading.

Yes, this is the currently implemented behavior.


If you can confirm that Orthanc does NOT stop if no upgrade
is required even if --upgrade is specified then I would like
to ask for a change of this behaviour. Typically, one would
expect Orthanc to end up in the same state (DB upgraded and
server stopped) after an --upgrade run regardless of whether
an actual upgrade was performed.

        https://en.wikipedia.org/wiki/Principle_of_least_astonishment

That would make the process predictable and thereby
scriptable.

Yes, this is my view too: The "--upgrade" option is a special maintenance operation, and it should NOT start the server afterwards.


The exit code would make it possible to
differentiate between success and failure where
nothing-to-do-because-up-to-date counts as success.

Yes, the status code will be non-zero if any error occurs during the upgrade process.

HTH,
Sébastien-

Reply via email to