Updater Changelog

Version 2.6.1
- The updater reads the site's settings from the site itself: the connection string from ConnectionStrings.config, the database engine and schema from Web.config (Terrasoft.WebHost.dll.config for .NET sites), the version from Terrasoft.Common.dll, the application type from the site's files, the IIS site and application pool from IIS by the site's directory, and the Kestrel ports from appsettings.json or the site's systemd unit. creatio.json needs only WebRootDirectory, WorkDirectory, Product, HubUser and HubPassword.
- The DbServer, Database, UserName, Password, CurrentSchemaName, ApplicationType, Site, ApplicationPool, InstallPackagesPath and WebServer settings were removed from creatio.json. Leftover keys in an existing creatio.json, including the Redis settings and SkipSecurityProtocol, are ignored with one warning that names them.
- install.xml and the UseClassicConfig feature, which made the updater read it instead of creatio.json, were removed: the updater reads its settings only from creatio.json. An install.xml or a UseClassicConfig setting left over from an earlier version is ignored.
- ConnectionString, DbEngineType, HostingType, KestrelPorts and Version remain as optional overrides. They are not in the shipped creatio.json: add one only when the updater cannot read a value and names the setting to set. An explicit ConnectionString is used only for the updater's own connections, such as backup and restore; the site keeps its own connection string, and a ConnectionString kept in creatio.json must point at the same server, port and database as the site's own (remove it to use the site's own). An explicit Version only sets where a download starts: the update works from the site's own version. The '#Version#' placeholder of a creatio.json kept from 2.6.0 counts as not set.
- WCConnectionTimeout and the Backup block are no longer in the shipped creatio.json. Without WCConnectionTimeout the WorkspaceConsole timeout is 1024 seconds; set it only to change it. The Backup block (AppDirectory, DbDirectory, Frequency) is read only by the ForceBackup and ForceRestore features: with a feature on and no Backup block, the backup or the restore is skipped with a warning instead of failing the update.
- Before an update or a download starts, the updater prints the settings it resolved and where each came from, with passwords masked. If a setting cannot be resolved, it stops before any change with exit code 1, and names what it could not read and the setting that unblocks it. The site's own connection string must name one server and one database. An update also exits with code 1 when IIS cannot stop the site, for example a site nested in a web site whose application pool also serves other applications.
- A command that stops on an error now exits with code 1. Before, an update, a download or a rollback-marker removal that stopped on an error, such as a missing creatio.json, unmet prerequisites, update packages still missing after the automatic download or a failed backup, printed the error but exited with code 0. Ctrl+C during a command also exits with code 1; Ctrl+C at the closing "press any key" prompt keeps the command's result.
- Running the update on a site that is already up to date now ends before the site is stopped, with "The site is already up to date; nothing was changed." and exit code 0. Before, it ended with an error that the update packages were still missing after the automatic download.
- New command --show-config (show-config) prints the resolved settings without changing anything.
- --download reads the site's folder at WebRootDirectory, or a copy of it, for the application type, the version and the database engine. It also needs Product, HubUser and HubPassword, which are now checked up front, together with the drive of WorkDirectory.
- The Kestrel ports are read from the site's appsettings.json, its systemd unit (from any systemd unit directory, such as /etc/systemd/system or /usr/lib/systemd/system, with its drop-ins) or ASPNETCORE_URLS. When something the updater does not read could change them (an appsettings file of the environment, Kestrel settings or a variable file in the unit, several units running the site, a URL without a port it can read such as http://*:0), it asks for KestrelPorts instead of guessing, because stopping the site stops whatever listens on those ports.
- A site installed as an application inside an IIS web site (for example Default Web Site/creatio) is stopped and started through its application pool only; the web site and its other applications keep running. If that application pool also serves another running application, the update stops before any change.
- The database engine of a .NET site is read from Terrasoft.WebHost.dll.config; before, the download on such a site failed unless creatio.json set DbEngineType.
- The updater now works with a Redis Cluster: the pre-update check reports the cluster's version instead of failing, and after the update the cache is cleared on every master node.
- The site's own Redis connection string is now used as is and is no longer rewritten during the update, so cluster hosts, TLS and certificate settings survive.
- Secure (TLS) Redis connections, with or without a client certificate, are supported and the server certificate is validated.
- Redis Sentinel is reported as not supported: the Redis steps are skipped and the update continues.
- A missing ConnectionStrings.config or a missing 'redis' entry, and a Redis server that refuses the cache-clear command, are now warnings with the command to run manually instead of a failed update.
- The RedisServer, RedisDB, RedisPort and RedisPassword settings were removed from creatio.json and downloader.json; the updater reads them from the site. Leftover keys in an existing configuration file are ignored. Pointing the updated site at a different Redis via the updater configuration is no longer possible.
- The distribution archive now includes the third-party license notices (THIRD-PARTY-NOTICES.txt) for the bundled Redis client.
- The downloader is now built into the updater: --download and the automatic download during --update no longer run PowerShell scripts. The download folders and the messages stay the same. The ClientsOnSiteDownloader folder and config/DefineProduct.ps1 are no longer shipped; the distribution archive contains no PowerShell scripts.
- The download source addresses are built in; they and the retry and timeout policy can be overridden in the new 'downloader' section of appsettings.json. Every source must be an HTTPS address, and the resource kit must come from the hub host because the hub credentials are sent to it.
- --download reads creatio.json from the working directory, the same way as --update.
- The update reads its packages from <WorkDirectory>\InstallPackages, the directory the downloader fills.
- Downloads use the operating system's TLS settings (TLS 1.2 and newer); the SkipSecurityProtocol setting is no longer needed and is ignored.
- If 'Version' is not set in creatio.json and the site version cannot be detected, the download stops with a clear message instead of downloading every version since 7.8.0.
- The site version is now detected for .NET 8 and Linux sites as well; 'Version' in creatio.json still takes precedence.
- .NET sites now always receive the .NET build of the update package, whether ApplicationType is Net, NetCore or Net6. Before, Net failed with 'File not found' for versions below 8.0.9, and Net6 received the .NET Framework build.
- Update scenarios and the version list are downloaded with the same retries, resume and size check as the update packages, and the checks whether a scenario is published are retried on network and server errors as well.
- If a download fails part-way, the packages downloaded so far are removed, so a later update cannot start from an incomplete set.
- Archives are checked for unsafe entries, and for an implausible number of entries or size, before anything is extracted; a damaged archive is reported by name.
- An invalid 'Locale' in creatio.json stops the download with a clear message.
- The products and bundles the downloader accepts are listed in config/knownProducts.json, so a new one can be added without a new updater build.
- A version list with a single version is now read correctly, and a product mapping outside the update path or a Web.config without the database section stops the download with a clear message instead of a crash or a wrong download.
- The product check now runs natively, reads its product table from config/productRules.json and passes on Azure SQL sites like on MS SQL.
- An appsettings.json kept from Updater 2.6.0 keeps working: without the 'downloader' section the built-in sources are used, and a 'productCheck' that still names DefineProduct.ps1 uses config/productRules.json with a warning. An appsettings.json from an older version is not supported. Take appsettings.json from the new archive to remove the warning; features can also be passed as --features:<name>=<value>.
- Each scenario archive is checked for existence only once per download.
- On Linux, the updater finds the processes of a Kestrel site with ss (package iproute2, installed on current distributions) instead of the deprecated netstat, which is used only when ss is not installed. If neither is installed, the update stops before the site is changed, with a message naming the package to install.
- The compilation history check before an update no longer times out on sites with a long compilation history. Its query reads the CompilationHistory table twice instead of about ten times and no longer slows down quadratically as the history grows; it also runs with a 600-second timeout instead of the 30-second MS SQL default.
- When the compilation history cannot be checked (a timeout or another database error), the check says so, with the database's own error message, and names the SkipCheckCompilationHistory feature that skips it. The update still stops before the site is touched. Before, the run ended with "Installed components/software have an outdated/incorrect version" after a bare "The wait operation timed out".
- A feature set to a value other than true or false, such as CheckRollback = 'true;', is now reported as a warning in the 'Updater features' list, in the console and in the extended log, because the updater treats such a value as false. Before, a misspelled value switched the feature off without any message.
- On a site that runs in Kestrel, the update now ends after it starts the site. Since 2.5.0, the updater waited until the started site stopped, so the run did not end. The restore after a failed update and the log collection did not run, and Ctrl+C in the updater terminal also stopped the site. Now the updater starts the site and does not wait for it: on Linux in a separate session (setsid), on Windows in a hidden window of its own. On Linux, Ctrl+C in the updater terminal and the end of the terminal or SSH session do not stop the site; on Windows, Ctrl+C in the updater console does not stop it. A script that reads the updater output does not wait for the site. The site output does not go to the updater console; Creatio continues to write its own logs. The updater does not check that the site comes up. On Linux, if the updater cannot find setsid or dotnet, it writes "Can't start web site" and exits with code 1.
- With the ForceRestore feature on, the updater now restores a failed update before it starts the site, not after it. The restore of the database and the site files occurs while the site is stopped. If the restore fails, the updater still starts the site and collects the logs.

Version 2.6.0
- The update command now verifies that all required update packages and scenarios are available before the update starts and reports the result of every check.
- Missing update packages/scenarios are downloaded automatically during the update; a separate --download run is no longer required.
- The update starts only after all required files are available; the new SkipAvailabilityCheck feature skips this pre-update verification (including its automatic download).
- Configuration overrides passed as --<key>=<value> arguments (for example --stopAppPoolTries=3) are accepted again, standalone or combined with a command, and are no longer rejected by the command parser.
- A mistyped command no longer starts the update implicitly; the updater reports the unrecognized command and exits with a failure code.
- The distribution archive now includes Oracle's license terms (ORACLE_LICENSE.txt) for the bundled Oracle database driver.
- When a newer updater version is required, the error message now explains how to obtain it: download the latest Updater.zip, unpack it to a new folder, copy your creatio.json there and run the update again. The standalone Downloader is no longer referenced.

Version 2.5.1
- Implemented a client-facing change log.
- Enhanced updater error messaging with guidance to use the Downloader when a newer updater version is required.
- Improved system logic.
- Resolved various bugs.