ServiceControl version 7 adds SQL Server and PostgreSQL as storage options for Error and Audit instances. Upgrading an existing instance does not change its storage: it continues to use RavenDB with its existing data. To move an instance to SQL Server or PostgreSQL after upgrading, see Migrating from RavenDB to SQL storage.
The following changes can require action when upgrading:
| Change | Action required |
|---|---|
| Storage type is required | Upgrading with the ServiceControl Management Utility or PowerShell: none. PowerShell scripts that create instances: add -StorageType RavenDB.Containers: add STORAGETYPE=RavenDB. |
| Integration events disabled by default | Only if DisableExternalIntegrationsPublishing is set, or endpoints subscribe to integration events. |
| Event log changes | Only if a script or tool reads failed messages from the event log. |
| Error instance audit retention setting removed | None. |
| Maintenance mode restricted to embedded RavenDB | Only if an instance that uses an external RavenDB server runs in maintenance mode. |
Prerequisites
Review the upgrade tips and back up the RavenDB database before upgrading.
Storage type is required
Version 7 has no default storage type. Each Error and Audit instance must set ServiceControl/ or ServiceControl. to RavenDB, SQLServer, or PostgreSQL, and an instance without it does not start. StorageType replaces the PersistenceType setting.
- Upgrading with the ServiceControl Management Utility or PowerShell: no action is required. Upgrading an instance sets its storage type to
RavenDBin the configuration file. - PowerShell scripts that create instances: add
-StorageType RavenDBto eachNew-ServiceControlInstanceandNew-ServiceControlAuditInstancecall. The version 7 cmdlets require the parameter, and the version 6 cmdlets do not accept it. - Containers: add the
STORAGETYPEenvironment variable with the valueRavenDBto each Error and Audit container. Version 6 images selected RavenDB automatically.
Before (version 6), the environment variables of an Error or Audit container:
TRANSPORTTYPE=RabbitMQ.QuorumConventionalRouting
CONNECTIONSTRING=host=rabbitmq
RAVENDB_CONNECTIONSTRING=http://servicecontrol-db:8080
After (version 7):
TRANSPORTTYPE=RabbitMQ.QuorumConventionalRouting
CONNECTIONSTRING=host=rabbitmq
RAVENDB_CONNECTIONSTRING=http://servicecontrol-db:8080
STORAGETYPE=RavenDB
Before (version 6), the storage parameters of a script that creates an Error instance:
New-ServiceControlInstance `
-DBPath C:\ServiceControl\DB `
-DatabaseMaintenancePort 33335
After (version 7):
New-ServiceControlInstance `
-DBPath C:\ServiceControl\DB `
-DatabaseMaintenancePort 33335 `
-StorageType RavenDB
Integration events disabled by default
Version 7 publishes integration events only when ServiceControl/ is true. Version 6 published them unless ServiceControl/ was true. Version 7 no longer supports DisableExternalIntegrationsPublishing: an Error instance that has it in its configuration file or environment does not start, whatever its value.
Most systems do not use integration events and need no change. Check each Error instance for the following cases before upgrading.
Publishing turned off
If publishing was turned off with DisableExternalIntegrationsPublishing, remove the setting. Publishing is off by default in version 7, so the instance behaves the same as before.
Before (version 6):
<!-- ServiceControl.exe.config -->
<add key="ServiceControl/DisableExternalIntegrationsPublishing" value="true" />
# Container environment variable
SERVICECONTROL_DISABLEEXTERNALINTEGRATIONSPUBLISHING=true
After (version 7): no setting and no environment variable.
Endpoints subscribe to integration events
If endpoints subscribe to integration events, enable publishing. Endpoints that subscribe reference the ServiceControl.Contracts package, for example to send a notification when a message fails.
If publishing is not enabled, subscribers stop receiving events after the upgrade, without any error.
Before (version 6): no setting, because version 6 published integration events by default.
After (version 7):
<!-- ServiceControl.exe.config -->
<add key="ServiceControl/EnableExternalIntegrationsPublishing" value="true" />
# Container environment variable
SERVICECONTROL_ENABLEEXTERNALINTEGRATIONSPUBLISHING=true
If the instance has DisableExternalIntegrationsPublishing set to false, remove it as well.
Event log changes
Version 7 no longer writes an event log entry for each failed message, which reduces the write and retention load on the event log. Failed messages are listed on the failed messages screen in ServicePulse.
No action is required unless a script or monitoring tool reads failed messages from the event log. In that case, change it to subscribe to MessageFailed integration events and enable integration event publishing.
Error instance audit retention setting removed
Error instances no longer read the ServiceControl/ setting, which had no effect on them. Audit retention is configured on each Audit instance with ServiceControl..
No action is required. Upgrading an instance with the ServiceControl Management Utility or PowerShell removes the setting from the configuration file. Error containers ignore the SERVICECONTROL_AUDITRETENTIONPERIOD environment variable, which can be removed.
Maintenance mode restricted to embedded RavenDB
Error and Audit instances that use an external RavenDB server, including the RavenDB container, no longer start in maintenance mode. Maintenance mode remains available for embedded RavenDB, as deployed by the ServiceControl Management Utility and PowerShell, where ServiceControl manages the database process.
For instances that use an external RavenDB server, remove ServiceControl/ or ServiceControl., and any maintenance-mode argument, from the instance's configuration and startup commands. To perform database maintenance, stop the ServiceControl instance instead, leaving the database server running. See accessing the ServiceControl database.
Before (version 6), database maintenance on a container deployment:
# Restart the Error instance in maintenance mode
docker rm -f servicecontrol
docker run -d --name servicecontrol {OPTIONS} -e SERVICECONTROL_MAINTENANCEMODE=true particular/servicecontrol:6
After (version 7):
# Stop the Error instance; the database container keeps running
docker stop servicecontrol
# Perform maintenance on port 8080 of the database container, then:
docker start servicecontrol
Support for version 6
Version 6 is supported for one year after version 7 is released as defined by the ServiceControl support policy. The ServiceControl support end date is available at ServiceControl supported versions.