Stop creation of new jobs in the internal job system

Make sure that no more new job background activity is started as described in the following paragraphs. In an environment with multiple server instances, make sure that this is done on every instance.

Disable new asynchronous tasks and wait until already generated tasks are processed

For the upgrade process it is necessary to wait until ImageMaster background tasks have finished processing. Background tasks can be triggered by various sources, for example:

  • follow-up actions of external requests or web client jobs (e.g. creation of full-text search index)

  • periodical execution of jobs according to their schedule

To get into a state where no more background tasks are being executed do the following:

  • Disable triggering new jobs by ImageMaster’s internal job system.

  • Disable triggering new tasks by ImageMaster’s autorecovery mechanism.

  • Stop sending requests to ImageMaster external interfaces.

  • Make users stop working in the WorkplaceClient and AdminClient (or disable access via these clients).

Then wait until queues (imaAsyncTasks, imaARMTasks) with asynchronous tasks are empty, which means that their message counts are zero. Also see “Checking the number of tasks in queues” below.

Disable triggering new jobs by ImageMaster's internal job system

Set the system property ima.job.processing to “false” to stop triggering new jobs:

First check whether this system property already exists. In CLI this can be done with the following command:

/system-property=ima.job.processing:read-resource

If the property does not exist, the following output is given:

[standalone@localhost:10048 /] /system-property=ima.job.processing:read-resource
{
    "outcome" => "failed",
    "failure-description" => "WFLYCTL0216: Management resource '[(\"system-property\" => \"ima.job.processing\")]' not found",
    "rolled-back" => true
}

In this case add the property with the value “false”:

/system-property=ima.job.processing:add(value=false)

If this property already exists, the following output is given:

[standalone@localhost:10048 /] /system-property=ima.job.processing:read-resource
{
    "outcome" => "success",
    "result" => {"value" => "true"}
}

In this case update the property by setting the value “false”:

/system-property=ima.job.processing:write-attribute(name=value, value=false)

Disable triggering new tasks by ImageMaster's autorecovery mechanism

Execute the same checks and actions for the system property ima.autorecover.

Check if it exists:

/system-property=ima.autorecover:read-resource

Depending on the outcome:

  • either add the property with the value “false”:

    /system-property=ima.autorecover:add(value=false)
  • or update the property by setting the value “false”:

    /system-property=ima.autorecover:write-attribute(name=value, value=false)

Checking the number of tasks in queues

These CLI commands allow checking the number of tasks in JMS queues:

 /subsystem=messaging-activemq/server=default/jms-queue=imaAsyncTasks:read-attribute(name="message-count")
 /subsystem=messaging-activemq/server=default/jms-queue=imaARMTasks:read-attribute(name="message-count")

Wait until queues (imaAsyncTasks, imaARMTasks) with asynchronous tasks are empty, which means that their message counts are zero.

Shut down the application server gracefully

To stop external activities, consider a graceful shutdown of the application server in the later step “Stop application server”.