clscrs_restart_resource

The clscrs_restart_resource API instructs Oracle Clusterware to restart a named set of resources. If the flag is async, then the msgf callback function you specify is never called. The API returns an OK status after initiating the call to Oracle Clusterware, and asynchronously executes the restarts.

If the flag is not async, and msgf is not NULL, then the API drives msgf one line at a time with collected output from the restart programs. An optional event flag maybe passed to indicate that this is not a request to perform an action, but rather a notification that the action has already started. The flag should only be used for a narrow set of co-managed resources.

In the first argument, you can specify either a list of resource IDs or a filter. Specifying a filter enables the query and action to take place in a single call. The filter searches all registered resources.

Parameters

Input:

  • ridlist: The list of resources or resource instance IDs to restart, or a filter.
  • env: Specify environment arguments to the restart operation.
  • msgf: User message callback, which can be NULL.
  • msgarg: User callback argument, which can be NULL.
  • flag: Either async, force, or event options.

Output:

op_status: The resource list that holds the status of the restart operation for each resource.

Returns

  • CLSCRS_STAT_INVALID_RESNAME: Displays if ridlist is empty.
  • CLSCRS_STAT_AUTHORIZATION_FAILURE: Displays when authorization fails.
  • CLSCRS_STAT_SUCCESS: Displays if the request completes successfully for all requested entities or if no entities match a filter.
  • CLSCRS_STAT_FAILURE: Displays if at least one resource or resource ID does not start successfully.
  • CLSCRS_STAT_CONNECTION: Displays if there is a communication error.
  • CLSCRS_STAT_WRONG_ACTIVE_VERSION: Displays if you use the API before you have upgraded the cluster to Oracle Clusterware 12c.

CLSCRS_STAT

clscrs_restart_resource(clscrs_splist *ridlist,
                        clscrs_env env, clscrs_msgf2 msgf, void *msgarg,
                        uword flag, clscrs_reslist *op_status);