Set RavenDB 6.2 into maintenance mode when running containers

We have done a container deployment of ServicePulse & ServiceControl but now want to confirm that we put the DB into maintenance mode. Something we need to do quite regularly at the moment.

Could someone please assist me with the steps I should follow to do the instructions from Particular’s docs “Container deployment”

It states:

The container equivalent of maintenance mode can be achieved by stopping the ServiceControl container while leaving the database container running.

So not sure how to stop specific containers in a single pod

image

Would appreciate any assistance.

Good day, @CarikeBS. Welcome to the Particular discussion group.

I believe that the sample we have around k8s deployment is misleading; having both the ServiceControl and database containers in the same stateful set makes it impossible to put ServiceControl maintenance mode because of the way k8s will react to stopping containers. I raised an issue about it to update the sample and make it so that only RavenDB is in the stateful set.

In the meantime, I have a hunch that a possible workaround for you is temporarily disabling ingestion by setting one of the following environment variables and restarting the ServiceControl container:

SERVICECONTROL_INGESTERRORMESSAGES=false
SERVICECONTROL_INGESTAUDITMESSAGES=false

Use the first one for a ServiceControl primary instance, ingesting failed messages, and the second for a ServiceControl audit instance. When the variable is false, the instance will run normally but not ingest messages from the configured error or audit queue.

The differences with maintenance mode are:

  • ServicePulse and ServiceInsight remain usable, and failed messages can be retried or archived
  • Some ServiceControl database background activity might still happen

Let me know if this helps.
.m