Restarting services

You can manually restart services and service instances when you need to use them again after shutting them down

Who needs to complete this task?
You must be either:
  • A cluster administrator
  • An instance administrator
When do you need to complete this task?
When you want to restart a service that was temporarily shut down.

In most cases, you restart services by using one of the following commands:


cpd-cli manage restart
cpd-cli manage restart
You can restart a service by using the cpd-cli manage restart command. The command restarts the specified component and any dependencies. The component is restarted after the dependencies are restarted. When you restart a service, any instances that were forcibly shut down restart automatically.

The command accepts the following options:

--components
The component or components to restart. If a component has any dependencies, the dependencies will also be restarted.
--cpd_instance_ns
The project (namespace) where the component that you want to restart is installed.

Use the ${PROJECT_CPD_INST_OPERANDS} environment variable to specify the project.

--tethered_instance_ns
A tethered project (namespace) where the restart command will restart installed service instances.

Use the ${PROJECT_CPD_INSTANCE_TETHERED} environment variable to specify the project.

--preview
Specify --preview=true to preview the commands that will run when you issue this CLI command.

For more information about the cpd-cli manage restart command, see manage restart in the cpd-cli command reference.



oc patch shutdown command
oc patch shutdown command
Some services support shutdown and restart but do not support the use of the cpd-cli manage shutdown command. To restart these services, you run the oc patch command to update the shutdown parameter in the service custom resource (CR) to manually restart the service.
The shutdown parameter accepts the following values:
true
The operator shuts down its deployments and any dynamic workloads such as jobs and environments. The operator might wait for running jobs to end before it shuts down fully. During that time, the service must not start any new dynamic workloads.

If you shut down a service that has running instances, the CR has a status of shutdownError. Otherwise, the status initially is shutdownInProgress and then eventually shutdown.

force
The service immediately shuts down without waiting for jobs to exit. Any service instances that are running are shut down. Wait for the status to progress from shutdownInProgress to shutdown.
false
The service is restarted. If you previously forced a shutdown that shut down service instances, this setting also restarts those service instances. You can also remove the shutdown setting from the CR to restart the service. Wait for the status to progress from shutdown to InProgress to Completed.

Procedures

Best practice: You can run the commands in this task exactly as written if you set up environment variables. For instructions, see Setting up installation environment variables.

Ensure that you source the environment variables before you run the commands in this task.

  1. Log the cpd-cli in to the Red Hat® OpenShift® Container Platform cluster:
    ${CPDM_OC_LOGIN}
    Remember: CPDM_OC_LOGIN is an alias for the cpd-cli manage login-to-ocp command.
  2. Restart any of the following services as needed.

Scheduling service

Run the following command to restart the scheduling service

oc patch Scheduling ibm-cpd-scheduler \
--namespace ${PROJECT_SCHEDULING_SERVICE} \
--type=merge \
--patch '{"spec": {"shutdown": "false"}}'


control plane
Note: If you installed the Scheduling service, you must restart it before you restart the control plane. See Scheduling service.
Run the following command to restart the control plane:
cpd-cli manage restart \
--components=cpd_platform \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
Important: The control plane must restart to the same status it was in before it was shut down. Do not change the spec of the control plane custom resource, perform upgrades, or perform rollbacks while the control plane is shut down.


Common core services

Run the following command to restart the common core services service:

oc patch ccs ccs-cr \
--namespace ${PROJECT_CPD_INST_OPERANDS} \
--patch '{"spec":{"shutdown":"false"}}' \
--type=merge


AI Factsheets

Run the following command to restart the AI Factsheets service:

cpd-cli manage restart \
--components=factsheet \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Cognos Analytics

Restart the Cognos® Analytics service and then restart the service instances that are associated with the service.

  1. Run the following command to restart the Cognos Analytics service:
    cpd-cli manage restart \
    --components=cognos_analytics \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
    Note: Any instances that were shut down forcibly are automatically restarted.
  2. Run the following command to list all of the Cognos Analytics service instances on the cluster:
    oc get caserviceinstance --all-namespaces

    Identify the service instances that are associated with the instance of Cognos Analytics that you want to restart.

  3. For each instance, run the following command to restart the Cognos Analytics service instance.
    Each time that you run the command, replace the following values:
    • Replace <instance-id> with the appropriate ID from the list of service instances.
    • Replace <instance-namespace> with the namespace where the service instance is deployed.
    oc patch caserviceinstance <instance-id> \
    --namespace <instance-namespace> \
    --patch '{"spec":{"shutdown":"false"}}' \
    --type=merge


Cognos Dashboards

Run the following command to restart the Cognos Dashboards service:

cpd-cli manage restart \
--components=dashboard \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
Note: If Cognos Dashboards fails to restart, it might be because the Redis component failed to restart with Cognos Dashboards. For a workaround and more information, see Cannot restart Cognos Dashboards services.


Data Refinery
Run the appropriate command for your environment:
The name of the Data Refinery custom resource is datarefinery-cr
oc patch DataRefinery datarefinery-cr \
--namespace ${PROJECT_CPD_INST_OPERANDS} \
--patch '{"spec":{"shutdown":"false"}}' \
--type=merge
The name of the Data Refinery custom resource is datarefinery-sample
oc patch DataRefinery datarefinery-sample \
--namespace ${PROJECT_CPD_INST_OPERANDS} \
--patch '{"spec":{"shutdown":"false"}}' \
--type=merge


DataStage

Run the following command to restart the DataStage® service:

cpd-cli manage restart \
--components=datastage_ent \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}

To restart DataStage Enterprise Plus, set the --components option to datastage_ent_plus.



Db2

Run the following command to restart the Db2® service:

cpd-cli manage restart \
--components=db2oltp \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
Note: Any instances that were shut down forcibly are automatically restarted.


Db2 Big SQL

Restart the Db2 Big SQL service and then restart the service instances.

  1. Run the following command to restart the Db2 Big SQL service:
    cpd-cli manage restart \
    --components=bigsql \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
  2. Run the following command to get the list of Db2 Big SQL service instance IDs:
    oc get cm \
    --namespace ${PROJECT_CPD_INST_OPERANDS} \
    -l component=db2bigsql \
    -o custom-columns="Instance Id:{.data.instance_id}, \
    InstanceName:{.data.instance_name}, \
    Created:{.metadata.creationTimestamp}"
  3. For each service instance, run the following command to restart the Db2 Big SQL service instance.

    Each time that you run the command, replace <instance-id> with the appropriate ID from the list of service instances.

    oc patch bigsql bigsql-<instance-id> \
    --namespace ${PROJECT_CPD_INST_OPERANDS} \
    --patch '{"spec":{"shutdown":"false"}}' \
    --type=merge


Db2 Data Gate

Restart the Db2 Data Gate service and then restart the service instances.

  1. Run the following command to restart the Db2 Data Gate service:
    cpd-cli manage restart \
    --components=datagate \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
  2. Run the following command to list all of the service instances in the project where Db2 Data Gate is installed:
    oc get datagateinstanceservices --namespace ${PROJECT_CPD_INST_OPERANDS}
  3. For each service instance, run the following command to restart the Db2 Data Gate service instance.

    Each time that you run the command, replace <instance-id> with the appropriate ID from the list of service instances.

    export DATAGATE_INSTANCE_ID=<instance-id>
    
    cpd-cli manage restart --components=datagate_instance --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} --extra-vars=cr_name=${DATAGATE_INSTANCE_ID} --extra-vars='{"override_components_meta":{"datagate_instance":{"cr_apply_support":"true"}}}'


Db2 Data Management Console

Restart the Db2 Data Management Console service and then restart the service instances.

  1. Run the following command to restart the Db2 Data Management Console service:
    cpd-cli manage restart \
    --components=dmc \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Db2 Warehouse

Run the following command to restart the Db2 Warehouse service:

cpd-cli manage restart \
--components=db2wh \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
Note: Any instances that were shut down forcibly are automatically restarted.


Decision Optimization

Run the following command to restart the Decision Optimization service:

cpd-cli manage restart \
--components=dods \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


EDB Postgres
Run the following command to restart the EDB Postgres service:
oc patch CPDEdbInstance <yourEDBInstanceName> \
--namespace ${PROJECT_CPD_INST_OPERANDS} \
--type=merge \
--patch '{"spec": {"shutdown": false}}'


Execution Engine for Apache Hadoop

Run the following command to restart the Execution Engine for Apache Hadoop service:

cpd-cli manage restart \
--components=hee \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


IBM Match 360 with Watson

Complete one of the following steps to restart the IBM® Match 360 service or to move IBM Match 360 out of maintenance mode and then revert the shut down for FoundationDB:

  • To restart the IBM Match 360 service, run the following command:

    oc patch mdm mdm-cr \
    --namespace ${PROJECT_CPD_INST_OPERANDS} \
    --type=merge \
    --patch '{"spec": {"shutdown": "false"}}'
    cpd-cli manage restart \
    --components=match360 \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
  • To move IBM Match 360 out of maintenance mode and restart a shut down FoundationDB instance, complete the following steps:
    1. Run the following commands:
      oc patch mdm mdm-cr -n ${PROJECT_CPD_INST_OPERANDS} -patch "{\"spec\":{\"ignoreForMaintenance\": false}" --type=merge
      
      oc patch fdbcluster mdm-foundationdb-cluster -n ${PROJECT_CPD_INST_OPERANDS} -patch '{"spec":{"shutdown":"false"}}' --type=merge 
      
    2. Complete the following steps to manually unlock FoundationDB:

      1. Run the following command to get the UID value from the annotation:
        oc get fdbcluster/sample-cluster -o yaml | grep -i lockUID
        The following example shows the result of the command:
        lockUID: 61712bc9bb33f6feaf6750ce8ff3458c
      2. Login to a terminal of the database pod.
      3. Type the following at the command prompt, where {UID} is the UID value from step a:
        $ lockid={UID}
        $ fdbcli --exec "unlock $lockid"
      4. Type the passphrase and retype it when you are prompted to do so.

        The database is unlocked and ready to use.



Informix

Run the following command to restart the Informix® service:

cpd-cli manage restart \
--components=informix_cp4d \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


MANTA Automated Data Lineage

Run the following command to restart the MANTA Automated Data Lineage service:

cpd-cli manage restart \
--components=mantaflow \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


MongoDB
Run the following command to restart the MongoDB service:
oc patch CPDMongoDB <yourMongoDBInstanceName> \
--namespace ${PROJECT_CPD_INST_OPERANDS} \
--type=merge \
--patch '{"spec": {"shutdown": false}}'


OpenPages

Restart the OpenPages service and then restart the service instances that are associated with the service.

Run the following command to restart an OpenPages® instance or service. Replace <service_or_instance> with openpages to restart the service or openpages_instance to restart an instance. Use --extra-vars=cr_name=${OPENPAGES_INSTANCE_NAME} in the command only when you need to specify the instance name because the instance doesn't use the default name.

cpd-cli manage restart --components=<service_or_instance> --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} --extra-vars=cr_name=${OPENPAGES_INSTANCE_NAME}

You can include the --tethered_instance_ns argument to specify an instance namespace when you use the cpd-cli manage restart command to restart OpenPages instances that are installed in tethered projects.



Planning Analytics

Restart the Planning Analytics service and then restart the service instances that are associated with the service.

  1. Run the following command to restart the Planning Analytics service:
    cpd-cli manage restart \
    --components=planning_analytics \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
  2. Run the following command to list all of the Planning Analytics service instances on the cluster:
    oc get paserviceinstance --all-namespaces

    Identify the service instances that are associated with the instance of Planning Analytics that you want to restart.

  3. For each instance, run the following command to restart the Planning Analytics service instance.
    Each time that you run the command, replace the following values:
    • Replace <instance-id> with the appropriate ID from the list of service instances.
    • Replace <instance-namespace> with the namespace where the service instance is deployed.
    oc patch paserviceinstance <instance-id> \
    --namespace <instance-namespace> \
    --patch '{"spec":{"shutdown":"false"}}' \
    --type=merge


Product Master

Run the following command to restart the Product Master service:

cpd-cli manage restart \
--components=productmaster_instance \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


RStudio Server Runtimes

Run the following command to restart the RStudio® Server Runtimes service:

cpd-cli manage restart \
--components=rstudio \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


SPSS Modeler

Run the following command to restart the SPSS® Modeler service:

cpd-cli manage restart \
--components=spss \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Synthetic Data Generator

Run the following command to restart the Synthetic Data Generator service:

cpd-cli manage restart \
--components=syntheticdata \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Watson Discovery

Run the following command to restart the Watson™ Discovery service:

cpd-cli manage restart \
--components=watson_discovery \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Watson Machine Learning

Run the following command to restart the Watson Machine Learning service:

cpd-cli manage restart \
--components=wml \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Watson Machine Learning Accelerator
Run the following command to restart the Watson Machine Learning Accelerator service:
cpd-cli manage restart \
--components=wml_accelerator \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Watson OpenScale

Run the following command to restart the Watson OpenScale service.

cpd-cli manage restart \
--components=openscale \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Watson Pipelines

Run the following command to restart the Watson Pipelines service:

cpd-cli manage restart \
--components=ws_pipelines \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Watson Query

Restart the Watson Query service and then restart the service instance:

  1. Run the following command to restart the Watson Query service:
    cpd-cli manage restart \
    --components=dv \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
  2. Restart the Watson Query service instances:
    1. Set the INSTANCE_PROJECT to the project where the service instance exists:
      • If the service instance is in the operands project, run:
        export INSTANCE_PROJECT=${PROJECT_CPD_INST_OPERANDS}
      • If the service instance is in a tethered project, run:
        export INSTANCE_PROJECT=${PROJECT_CPD_INSTANCE_TETHERED}
        Important: If multiple tethered projects are associated with this instance of Cloud Pak for Data, make sure that the ${PROJECT_CPD_INSTANCE_TETHERED} environment variable is set to the correct project name before you run the export command:
        echo $PROJECT_CPD_INSTANCE_TETHERED
      • Run the following command to restart the Watson Query service instance:
        oc patch bigsql db2u-dv \
        --namespace ${INSTANCE_PROJECT} \
        --type=merge \
        --patch '{"spec": {"shutdown": "false"}}'


Watson Speech services

Run the following command to restart the Watson Speech services:

cpd-cli manage restart \
--components=watson_speech \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Watson Studio
Run the following command to restart the Watson Studio service:
Restart only the Watson Studio service

Run the following command to shut down the Watson Studio service:

cpd-cli manage restart \
--components=ws \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
Restart the Watson Studio service and its dependencies

Data Refinery is a dependency of the Watson Studio service. You might need to complete additional steps to restart the Data Refinery service when you restart the Watson Studio service.

  1. Get the name of the Data Refinery custom resource:
    oc get DataRefinery --namespace=${PROJECT_CPD_INST_OPERANDS}
  2. If the name of the Data Refinery custom resource is datarefinery-sample, create a file named refinery-cr.yaml in your work directory with the following content:
    override_components_meta:
      datarefinery:
        cr_name: datarefinery-sample
  3. Run the appropriate command based on the name of the Data Refinery custom resource:
    The name of the Data Refinery custom resource is datarefinery-cr
    cpd-cli manage restart \
    --components=ws \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --include_dependency=true
    The name of the Data Refinery custom resource is datarefinery-sample
    cpd-cli manage restart \
    --components=ws \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --include_dependency=true \
    --param-file=/tmp/work/refinery-cr.yaml


Watson Studio Runtimes

Run the following command to restart the Watson Studio Runtimes service:

cpd-cli manage restart \
--components=ws_runtimes \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


watsonx Assistant

Run the following command to restart the watsonx Assistant service instance:

oc patch wa ${INSTANCE} \
--namespace ${PROJECT_CPD_INST_OPERANDS} \
--patch '{"spec": {"shutdown": false}}' \
--type=merge


watsonx.ai

4.8.0 In watsonx.ai version 4.8.0, to restart the watsonx.ai service, run the following command:

cpd-cli manage restart \
--components=watsonx_ai \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}

4.8.1 or later The cpd-cli manage restart command is not supported in watsonx.ai version 4.8.1 or later.



watsonx.data
4.8.0 In watsonx.data version 4.8.0, to restart the watsonx.data service, you must restart the following components of the service:
  • wxdAddon, which provides the watsonx.data service.
  • wxd, which provides the watsonx.data service instance.
  • wxdEngine, which provides the Presto engines.
  1. Run the following command to restart the service (the wxdAddon component):
    cpd-cli manage restart \
    --components=watsonx_data \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
  2. Run the following command to restart the service instance (the wxd component):
    oc patch wxd lakehouse \
    --namespace ${PROJECT_CPD_INST_OPERANDS} \
    --type=merge \
    --patch '{"spec":{"shutdown":"false"}}'
  3. Restart the Presto engines:
    1. Get the name of the Presto engines:
      oc get wxdengine \
      --namespace=${PROJECT_CPD_INST_OPERANDS}

      The command returns one or more Presto engines.

    2. For each engine that you want to restart, run the following command.

      Replace <engine-name> with the name of engine to shut down.

      oc patch wxdEngine <engine-name> \
      --namespace ${PROJECT_CPD_INST_OPERANDS} \
      --type=merge \
      --patch '{"spec":{"shutdown":"false"}}'

4.8.1 or later In watsonx.data version 4.8.1 or later, to restart the watsonx.data service, you must restart wxdAddon, which provides the watsonx.data service. When you restart wxdAddon, wxd and wxdEngine are also restarted.

  1. Run the following command to restart the service (the wxdAddon component):
    cpd-cli manage restart \
    --components=watsonx_data \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
Tip: You can restart individual components (such as wxd or wxdEngine) by using oc patch commands. For example, use these steps to restart wxdEngine.
  1. Run the following command with the namespace to get the engine or service instance names:
    oc get wxdengine --namespace ${PROJECT_CPD_INST_OPERANDS}

    An example of the result:

    
    NAME                  AGE
    lakehouse-presto-01   38h
    lakehouse-presto250   10h
  2. Configure and run the following command to restart the engine or service:
    oc patch wxdEngine <engine_or_service_instance> \
    --namespace ${PROJECT_CPD_INST_OPERANDS} \
    --patch '{"spec":{"shutdown":"false"}}' \
    --type=merge