Update HostFactory service configuration

PUT method to dynamically update the HostFactory service configuration. With a dynamic update, you need not restart the HostFactory service for your updates to take effect.

Method URL Description
PUT https://host_name:port/platform/rest/hostfactory/service/configuration Submits HostFactory service configuration for dynamic update. Dynamic updates allow you to HostFactory service configuration without impacting current provisioning requests. Using this method, you can change all parameters, except REST parameters that enable or disable TLS, change the service port, and change security configuration. To update those parameters (typically, those that include the HF_REST_ prefix), you must manually restart the HostFactory service after updating the configuration.

Prerequisite

You must be the cluster administrator or your user account must be assigned the HF_SERVICE_MANAGE permission.

Request

PUT https://host_name:port/platform/rest/hostfactory/service/configuration?parameter
Table 1. Request parameter
Parameter Type Required/Optional Description
hfcsrftoken string Optional CSRF token that is obtained with successful login.
This command takes a JSON request string that must follow this template:
{
  "HF_LOGLEVEL": "LOG_TRACE",
  "HF_REQUESTOR_POLL_INTERVAL": 30,
  "HF_HOUSEKEEPING_LOOP_INTERVAL": 30,
  "HF_REST_TRANSPORT": "TCPIPv4SSL",
  "HF_REST_LISTEN_PORT": 9443,
  "HF_REST_TRANSPORT_ARG": "$EGO_DEFAULT_TS_PARAMS",
  "HF_REQUESTOR_ACTION_TIMEOUT": 240,
  "HF_PROVIDER_ACTION_TIMEOUT": 240,
  "HF_DB_HISTORY_DURATION": 90,
  "HF_REST_RESULT_DEFAULT_PAGESIZE": 2000,
  "HF_REST_RESULT_MAX_PAGESIZE": 10000
}

If you use curl, the command might look like the following example:

curl --header -b /tmp/cookie --cacert /opt/ibm/spectrumcomputing/wlp/usr/shared/resources/security/cacert.pem --tlsv1.2 -X PUT https://myprimaryhost.example.com:9443/platform/rest/hostfactory/service/configuration?hfcsrftoken=915ee7644f431e630dac68b9ab3e40bc -d { "HF_LOGLEVEL":"LOG_TRACE", "HF_REQUESTOR_POLL_INTERVAL":30, "HF_HOUSEKEEPING_LOOP_INTERVAL": 30, "HF_REST_TRANSPORT":"TCPIPv4SSL", "HF_REST_LISTEN_PORT":9443, "HF_REST_TRANSPORT_ARG":"$EGO_DEFAULT_TS_PARAMS", "HF_REQUESTOR_ACTION_TIMEOUT": 240, "HF_PROVIDER_ACTION_TIMEOUT": 240, "HF_DB_HISTORY_DURATION": 90,  "HF_REST_RESULT_DEFAULT_PAGESIZE": 2000, "HF_REST_RESULT_MAX_PAGESIZE": 10000  }'

If the HostFactory service fails over during dynamic update and the client fails to detect being disconnected, you must manually terminate the client connection and try again.

Response

Status code Description
200 OK
500 Internal server error. Check the log files and look for hints in the API response body.