Maintenance Releases
This section is about upgrading Engine from one minor/maintenance release version to another such version within the same major version (e.g., 2018.1.11.318 to Engine 2018.1.19.535). If you are looking to change major versions of Engine (e.g., 2015.1 to 2018.1), see the Upgrading Engine page of the documentation.
Maintenance releases of Engine are intended to be "drop-in" replacements for earlier versions of Engine in the same major version. Generally, upgrading to a more recent maintenance release is an easy task and shouldn't require much effort on your part (compared to a major version upgrade).
What Changes
The bulk of the changes that go into minor version releases are fixes for bugs, though we often add smaller new features into minor releases as well. Generally speaking, the following things will not change during maintenance releases:
- The structure of Engine's database
- The interface for existing Engine REST API calls
- The behavior of existing configuration settings
- Support for versions of a platform that were supported at the beginning of a release cycle. (For example, we stopped supporting MySQL 5.5 in 2016, when Oracle dropped support for it, but releases of Engine 2015.1 released in 2016 and 2017 still worked with MySQL 5.5.)
There are occasionally exceptions to the above, but we generally take care to make changes as non-disruptive as possible. (For example, sometimes we add new tables or columns to Engine's database, but the maintenance release will be written such that it will make sure the tables or columns exist before using them, to ensure compatibility with the original schema.)
Starting with this release, Engine refuses outbound web requests to internal destinations: hosts that resolve
to a loopback, private, link-local (including cloud metadata), CGNAT or other non-public address, or to the
Engine server itself. Before upgrading, check the requests you have Engine configured to make. If any of them
must reach an internal host, list its host:port in the new AllowedLocalHostsMask system setting. Features to
check:
- Course and asset imports from a URL, including reference imports and the manifests they point to
- Content connector imports
- Event subscriptions (webhooks) and their authentication token URLs
- Import result and rollup registration postbacks
- Statement pipes
- The LRS authentication callback (
LrsAuthCallbackUrl) - LTI 1.1 outcomes, and LTI 1.3 dispatch destinations (token, key set, line item and score URLs)
- PENS package, receipt and alert URLs
- Player customization files included in course and player exports
- The OnDemandRegistrationsXapi plugin callback URL
- The protected xAPI content proxy
API callers can make Engine send requests to any destination listed in AllowedLocalHostsMask, so list only
hosts they are meant to reach. Requests to HashiCorp Consul and Vault are not checked and need no entry.
Other changes to outbound web requests:
- Only
httpandhttpsURLs are accepted. Player customization files and PENS package URLs can no longer befile:paths. - Engine resolves each destination's host name itself before sending the request, including when the request
goes through an outbound proxy, so the Engine host must be able to resolve public names, or the hosts must be
listed in
AllowedLocalHostsMask. A proxy resolves the name again and connects to its own answer, so configure the proxy to refuse connections to internal and link-local addresses as well. - Engine follows redirects itself and checks each hop like the original destination. Redirects that used to work
can now fail with an error that names the redirect's
Location; configure that final URL instead. Most likely:- .NET only: an event subscription, postback, statement pipe or LRS callback endpoint that handles the request
and then answers with a 301, 302 or 303, for example to a result page. These redirects are no longer followed
for requests that send a body (such as
POST), so the delivery fails and is retried, and the endpoint may receive it more than once. If such an endpoint did not handle the request, its payload was already being lost, and the delivery now fails instead of appearing to succeed. - .NET only: a request that sends a body and gets a 307 or 308 to another scheme, host or port. Only redirects
to the same origin, or from
httptohttpson the same host, are followed. - A
GETthat is redirected to another scheme, host or port and needs credentials or custom headers there. These are dropped on such redirects. Redirects fromhttptohttpson the same host keep them. A HashiCorp Vault standby that redirects to the active node falls in this case; pointHashiCorpVaultHostMountPathat the active node or a load balancer. - A chain of more than
MaximumWebRedirectHops(default 3) redirects.
- .NET only: an event subscription, postback, statement pipe or LRS callback endpoint that handles the request
and then answers with a 301, 302 or 303, for example to a result page. These redirects are no longer followed
for requests that send a body (such as
- Requests to Consul and Vault read
MaximumWebRedirectHopsonly from the configuration file or environment, not from system settings stored in the database, because their values can be part of the database connection string. - Error responses from remote servers are written to the Engine log instead of to API error messages and the
errorMessageofNotificationFailedevents.NotificationFailed.responseBodyis null for destinations listed inAllowedLocalHostsMask. EngineHostAllowListnow also applies to therustici-original-urlheader.- .NET only: LTI 1.1 outcome requests now get the same destination checks as other outbound requests.
- Java only: outbound requests share a connection pool of up to 1000 connections, 200 per host. Override these
with the JVM system properties
rustici.http.maxConnectionsandrustici.http.maxConnectionsPerHost. When every connection to a host is in use, a request waits up to 30 seconds and then fails.
Testing
While we attempt as far as possible to make maintenance releases as non-disruptive as possible, there is always a risk which switching between versions of a given piece of software. Therefore, we recommend that you deploy the maintenance release in a development or staging environment for minimal testing before you deploy it in production.
Downtime
When restarting an Engine server, there will be a service interruption while your server is restarting, which will likely cause currently-launched registrations to fail if they happen to send requests while the restart is happening, which means their registration progress could be lost. For this reason, if you are using a single Engine server, it is best to take a few minutes of scheduled downtime (but it doesn't need to be long).
If you use a load balancer, it is much easier to do a true zero-downtime deployment. Most load balancers have a feature such that you can upgrade half of your servers and configure the load balancer to switch to the upgraded half while letting the requests on the other half finish in-progress requests.
How to Upgrade
Deploying a new maintenance release should generally be a simple matter of copying the
entire RusticiEngine and overwriting what you currently have, except for your
RusticiEngineSettings.config file. If you have an integration layer, you will have to make sure
that the assembly containing it gets deployed along with Engine. If you've made any modifications
to Engine's player files, you'll also need to make sure those modifications are merged into the
latest version of the player files. And if you've modified or removed our web.config, you should
make sure to keep your modified version.
If you are running MySQL, you will also need to deploy the MySQL.Data connector along with Engine
(since licensing concerns prevent us from bundling that dependency with our releases). You must use
the exact version against which Engine's MySQL plugin was compiled or use assembly binding
redirects in your web.config. We will try to avoid updating the required version of the MySQL plugin
in a maintenance release, but we will sometimes have to in the case of security updates; always
deploy to a staging environment first to make sure everything is working correctly.
Upgrading is generally a matter of deploying the new WAR file. We have found on Tomcat that it is sometimes necessary to remove the old deployed/unzipped RusticiEngine folder before redeploying the WAR file.
If you bundle your RusticiEngineSettings.properties file or your integration layer inside the WAR
file, you will of course need to add these to the new WAR file before deploying it.