sfctl nodesfctl node

管理构成群集的节点。Manage the nodes that form a cluster.

命令Commands

CommandCommand 说明Description
add-configuration-parameter-overridesadd-configuration-parameter-overrides 在指定节点上添加替代配置列表。Adds the list of configuration overrides on the specified node.
disabledisable 根据指定的停用意图停用 Service Fabric 群集节点。Deactivate a Service Fabric cluster node with the specified deactivation intent.
enableenable 激活当前已停用的 Service Fabric 群集节点。Activate a Service Fabric cluster node that is currently deactivated.
get-configuration-overridesget-configuration-overrides 获取指定节点上的替代配置列表。Gets the list of configuration overrides on the specified node.
healthhealth 获取 Service Fabric 节点的运行状况。Gets the health of a Service Fabric node.
infoinfo 获取有关 Service Fabric 群集中特定节点的信息。Gets the information about a specific node in the Service Fabric cluster.
listlist 获取 Service Fabric 群集中的节点的列表。Gets the list of nodes in the Service Fabric cluster.
loadload 获取 Service Fabric 节点的负载信息。Gets the load information of a Service Fabric node.
remove-configuration-overridesremove-configuration-overrides 删除指定节点上的替代配置。Removes configuration overrides on the specified node.
remove-stateremove-state 告知 Service Fabric,节点上的保留状态已被永久删除或丢失。Notifies Service Fabric that the persisted state on a node has been permanently removed or lost.
report-healthreport-health 发送有关 Service Fabric 节点的运行状况报告。Sends a health report on the Service Fabric node.
restartrestart 重启 Service Fabric 群集节点。Restarts a Service Fabric cluster node.
transitiontransition 启动或停止群集节点。Starts or stops a cluster node.
transition-statustransition-status 获取使用 StartNodeTransition 启动的操作的进度。Gets the progress of an operation started using StartNodeTransition.

sfctl node add-configuration-parameter-overridessfctl node add-configuration-parameter-overrides

在指定节点上添加替代配置列表。Adds the list of configuration overrides on the specified node.

此 api 允许添加指定节点上的所有现有替代配置。This api allows adding all existing configuration overrides on the specified node.

参数Arguments

参数Argument 说明Description
--config-parameter-override-list [必需]--config-parameter-override-list [Required] 添加替代配置列表的说明。Description for adding list of configuration overrides.
--node-name [必需]--node-name [Required] 节点的名称。The name of the node.
--force--force 在指定节点上强制添加替代配置。Force adding configuration overrides on specified nodes.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl node disablesfctl node disable

根据指定的停用意图停用 Service Fabric 群集节点。Deactivate a Service Fabric cluster node with the specified deactivation intent.

根据指定的停用意图停用 Service Fabric 群集节点。Deactivate a Service Fabric cluster node with the specified deactivation intent. 在停用的过程中,可以提高而不能降低停用意图(例如,根据 Pause 意图停用的节点可以进一步根据 Restart 停用,但反过来不行)。Once the deactivation is in progress, the deactivation intent can be increased, but not decreased (for example, a node that is deactivated with the Pause intent can be deactivated further with Restart, but not the other way around. 停用节点后,随时可以使用“激活节点”操作将其重新激活。Nodes may be reactivated using the Activate a node operation any time after they are deactivated. 如果停用操作未完成,则会取消停用。If the deactivation is not complete, this will cancel the deactivation. 在已关闭并在停用状态下恢复启动的节点上放置服务之前,仍需重新激活该节点,A node that goes down and comes back up while deactivated will still need to be reactivated before services will be placed on that node.

参数Arguments

参数Argument 说明Description
--node-name [必需]--node-name [Required] 节点的名称。The name of the node.
--deactivation-intent--deactivation-intent 描述停用节点的意图或原因。Describes the intent or reason for deactivating the node. 可能的值如下。The possible values are following.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl node enablesfctl node enable

激活当前已停用的 Service Fabric 群集节点。Activate a Service Fabric cluster node that is currently deactivated.

激活当前已停用的 Service Fabric 群集节点。Activates a Service Fabric cluster node that is currently deactivated. 激活后,该节点再次成为可放置新副本的有效目标,该节点上剩余的所有已停用副本会重新激活。Once activated, the node will again become a viable target for placing new replicas, and any deactivated replicas remaining on the node will be reactivated.

参数Arguments

参数Argument 说明Description
--node-name [必需]--node-name [Required] 节点的名称。The name of the node.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl node get-configuration-overridessfctl node get-configuration-overrides

获取指定节点上的替代配置列表。Gets the list of configuration overrides on the specified node.

此 api 允许获取指定节点上的所有现有替代配置。This api allows getting all existing configuration overrides on the specified node.

参数Arguments

参数Argument 说明Description
--node-name [必需]--node-name [Required] 节点的名称。The name of the node.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl node healthsfctl node health

获取 Service Fabric 节点的运行状况。Gets the health of a Service Fabric node.

获取 Service Fabric 节点的运行状况。Gets the health of a Service Fabric node. 使用 EventsHealthStateFilter 可以根据运行状态筛选针对节点报告的运行状况事件的集合。Use EventsHealthStateFilter to filter the collection of health events reported on the node based on the health state. 如果按名称指定的节点不在运行状况存储中,则会返回错误。If the node that you specify by name does not exist in the health store, this returns an error.

参数Arguments

参数Argument 说明Description
--node-name [必需]--node-name [Required] 节点的名称。The name of the node.
--events-health-state-filter--events-health-state-filter 用于根据运行状况筛选返回的 HealthEvent 对象集合。Allows filtering the collection of HealthEvent objects returned based on health state. 此参数的可能值包括以下运行状态之一的整数值。The possible values for this parameter include integer value of one of the following health states. 仅返回与筛选器匹配的事件。Only events that match the filter are returned. 所有事件用于评估聚合运行状态。All events are used to evaluate the aggregated health state. 如果未指定,则返回所有项。If not specified, all entries are returned. 状态值为基于标志的枚举,因此该值可以是使用按位“OR”运算符获取的值的组合。The state values are flag-based enumeration, so the value could be a combination of these values, obtained using the bitwise 'OR' operator. 例如,如果提供的值为 6,则返回 HealthState 值为 OK (2) 和 Warning (4) 的所有事件。For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.
- Default - 默认值。- Default - Default value. 匹配任何 HealthState。Matches any HealthState. 值为 0。The value is zero.
- None - 不与任何 HealthState 值匹配的筛选器。- None - Filter that doesn't match any HealthState value. 未返回有关给定状态集合的结果时使用。Used in order to return no results on a given collection of states. 值为 1。The value is 1.
- Ok - 与 HealthState 值为 OK 的输入匹配的筛选器。- Ok - Filter that matches input with HealthState value Ok. 值为 2。The value is 2.
- Warning - 与 HealthState 值为 Warning 的输入匹配的筛选器。- Warning - Filter that matches input with HealthState value Warning. 值为 4。The value is 4.
- Error - 与 HealthState 值为 Error 的输入匹配的筛选器。- Error - Filter that matches input with HealthState value Error. 值为 8。The value is 8.
- All - 与具有任意 HealthState 值的输入匹配的筛选器。- All - Filter that matches input with any HealthState value. 值为 65535。The value is 65535.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl node infosfctl node info

获取有关 Service Fabric 群集中特定节点的信息。Gets the information about a specific node in the Service Fabric cluster.

响应包括有关节点的名称、状态、ID、运行状况、运行时间和其他详细信息。The response includes the name, status, ID, health, uptime, and other details about the node.

参数Arguments

参数Argument 说明Description
--node-name [必需]--node-name [Required] 节点的名称。The name of the node.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl node listsfctl node list

获取 Service Fabric 群集中的节点的列表。Gets the list of nodes in the Service Fabric cluster.

响应包括有关节点的名称、状态、ID、运行状况、运行时间和其他详细信息。The response includes the name, status, ID, health, uptime, and other details about the nodes.

参数Arguments

参数Argument 说明Description
--continuation-token--continuation-token 继续标记参数用于获取下一组结果。The continuation token parameter is used to obtain next set of results. 如果单个响应无法容纳来自系统的结果,则 API 响应中包括含有非空值的继续标记。A continuation token with a non-empty value is included in the response of the API when the results from the system do not fit in a single response. 当此值传递到下一个 API 调用时,API 返回下一组结果。When this value is passed to the next API call, the API returns next set of results. 如果没有更多结果,则该继续标记不包含值。If there are no further results, then the continuation token does not contain a value. 不应将此参数的值进行 URL 编码。The value of this parameter should not be URL encoded.
--max-results--max-results 作为分页查询的一部分返回的最大结果数。The maximum number of results to be returned as part of the paged queries. 此参数定义返回结果数的上限。This parameter defines the upper bound on the number of results returned. 如果根据配置中定义的最大消息大小限制,无法将这些结果容纳到消息中,则返回的结果数可能小于指定的最大结果数。The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. 如果此参数为零或者未指定,则分页查询包含返回消息中最多可容纳的结果数。If this parameter is zero or not specified, the paged query includes as many results as possible that fit in the return message.
--node-status-filter--node-status-filter 用于根据 NodeStatus 筛选节点。Allows filtering the nodes based on the NodeStatus. 仅返回与指定的筛选器值匹配的节点。Only the nodes that are matching the specified filter value will be returned. 筛选器值可以是下列项之一。The filter value can be one of the following. 默认值: default。Default: default.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl node loadsfctl node load

获取 Service Fabric 节点的负载信息。Gets the load information of a Service Fabric node.

在 Service Fabric 节点的负载信息中检索已定义负载或容量的所有指标。Retrieves the load information of a Service Fabric node for all the metrics that have load or capacity defined.

参数Arguments

参数Argument 说明Description
--node-name [必需]--node-name [Required] 节点的名称。The name of the node.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl node remove-configuration-overridessfctl node remove-configuration-overrides

删除指定节点上的替代配置。Removes configuration overrides on the specified node.

此 api 允许删除指定节点上的所有现有替代配置。This api allows removing all existing configuration overrides on specified node.

参数Arguments

参数Argument 说明Description
--node-name [必需]--node-name [Required] 节点的名称。The name of the node.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl node remove-statesfctl node remove-state

告知 Service Fabric,节点上的保留状态已被永久删除或丢失。Notifies Service Fabric that the persisted state on a node has been permanently removed or lost.

这意味着无法恢复该节点的保留状态。This implies that it is not possible to recover the persisted state of that node. 如果硬盘已擦除干净或者硬盘崩溃,通常会出现这种情况。This generally happens if a hard disk has been wiped clean, or if a hard disk crashes. 节点必须已关闭,此操作才能成功。The node has to be down for this operation to be successful. 此操作让 Service Fabric 知道该节点上的副本不再存在,并且 Service Fabric 应停止等待这些副本恢复。This operation lets Service Fabric know that the replicas on that node no longer exist, and that Service Fabric should stop waiting for those replicas to come back up. 如果未删除节点上的状态并且节点能够以原状态恢复,则不要运行此 cmdlet。Do not run this cmdlet if the state on the node has not been removed and the node can come back up with its state intact. 自 Service Fabric 6.5 起,若要将此 API 用于种子节点,请将这些种子节点更改为常规节点(非种子节点),然后调用此 API 以删除节点状态。Starting from Service Fabric 6.5, in order to use this API for seed nodes, please change the seed nodes to regular (non-seed) nodes and then invoke this API to remove the node state. 如果群集正在 Azure 上运行,当种子节点发生故障后,Service Fabric 将尝试自动将其更改为非种子节点。If the cluster is running on Azure, after the seed node goes down, Service Fabric will try to change it to a non-seed node automatically. 若要实现这一点,请确保主节点类型中的非种子节点数不少于“发生故障”的种子节点数。To make this happen, make sure the number of non-seed nodes in the primary node type is no less than the number of Down seed nodes. 如有必要,请将更多节点添加到主节点类型以实现这一目标。If necessary, add more nodes to the primary node type to achieve this. 对于独立群集,如果“发生故障”的种子节点在其状态保持不变的情况下预计不会恢复正常,请从该群集中删除此节点,请参阅 https://docs.azure.cn/service-fabric/service-fabric-cluster-windows-server-add-remove-nodes。For standalone cluster, if the Down seed node is not expected to come back up with its state intact, please remove the node from the cluster, see https://docs.azure.cn/service-fabric/service-fabric-cluster-windows-server-add-remove-nodes.

参数Arguments

参数Argument 说明Description
--node-name [必需]--node-name [Required] 节点的名称。The name of the node.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl node report-healthsfctl node report-health

发送有关 Service Fabric 节点的运行状况报告。Sends a health report on the Service Fabric node.

报告指定的 Service Fabric 节点的运行状况状态。Reports health state of the specified Service Fabric node. 该报告必须包含有关运行状况报告及其所报告属性的源的信息。The report must contain the information about the source of the health report and property on which it is reported. 该报告将发送到 Service Fabric 网关节点,后者会将其转发到运行状况存储。The report is sent to a Service Fabric gateway node, which forwards to the health store. 该报告可能被网关接受但被运行状况存储在执行额外的验证后拒绝。The report may be accepted by the gateway, but rejected by the health store after extra validation. 例如,运行状况存储可能会由于无效的参数(如过时的序列号)而拒绝该报告。For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. 若要了解该报告是否已应用于运行状况存储中,请检查该报告是否显示在 HealthEvents 部分中。To see whether the report was applied in the health store, check that the report appears in the HealthEvents section.

参数Arguments

参数Argument 说明Description
--health-property [必需]--health-property [Required] 运行状况信息的属性。The property of the health information.

一个实体可以有不同属性的运行状况报告。An entity can have health reports for different properties. 该属性是一个字符串,不是固定的枚举,因此可使报告器灵活地对触发报告的状态条件进行分类。The property is a string and not a fixed enumeration to allow the reporter flexibility to categorize the state condition that triggers the report. 例如,SourceId 为“LocalWatchdog”的报告器可以监视节点上的可用磁盘的状态,因此它可以报告该节点的“AvailableDisk”属性。For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available disk on a node, so it can report "AvailableDisk" property on that node. 同一报告器可以监视节点连接,因此它可以报告同一节点的“Connectivity”属性。The same reporter can monitor the node connectivity, so it can report a property "Connectivity" on the same node. 在运行状况存储中,这些报告均被视为指定节点的单独运行状况事件。In the health store, these reports are treated as separate health events for the specified node. 与 SourceId 一起,该属性唯一地标识运行状况信息。Together with the SourceId, the property uniquely identifies the health information.
--health-state [必需]--health-state [Required] 可能的值包括:“Invalid”、“Ok”、“Warning”、“Error”、“Unknown”。Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'.
--node-name [必需]--node-name [Required] 节点的名称。The name of the node.
--source-id [必需]--source-id [Required] 标识已生成运行状况信息的客户端/监视程序/系统组件的源名称。The source name that identifies the client/watchdog/system component that generated the health information.
--description--description 运行状况信息的说明。The description of the health information.

它表示用于添加有关该报告的用户可读信息的自定义文本。It represents free text used to add human readable information about the report. 该说明的最大字符串长度为 4096 个字符。The maximum string length for the description is 4096 characters. 如果所提供字符串的长度大于该值,它将被自动截断。If the provided string is longer, it will be automatically truncated. 截断时,该说明的末尾字符包含一个标记“[Truncated]”,并且总字符串大小为 4096 个字符。When truncated, the last characters of the description contain a marker "[Truncated]", and total string size is 4096 characters. 该标记的存在向用户指示截断已发生。The presence of the marker indicates to users that truncation occurred. 请注意,当截断时,该说明包含来自原始字符串的 4096 个以内的字符。Note that when truncated, the description has less than 4096 characters from the original string.
--immediate--immediate 一个用于指示是否应立即发送报告的标志。A flag that indicates whether the report should be sent immediately.

运行状况报告将发送到 Service Fabric 网关应用程序,后者会将其转发到运行状况存储。A health report is sent to a Service Fabric gateway Application, which forwards to the health store. 如果 Immediate 设置为 true,则报告将立即从 HTTP 网关发送至运行状况存储,而无论 HTTP 网关应用程序使用的 Fabric 客户端设置如何。If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. 这对于应尽快发送的关键报告十分有用。This is useful for critical reports that should be sent as soon as possible. 由于计时和其他情况,发送报告可能仍会失败,例如,在 HTTP 网关已关闭或消息无法到达网关的情况下。Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. 如果 Immediate 设置为 false,则报告将基于来自 HTTP 网关的运行状况客户端设置发送。If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. 因此,系统将根据 HealthReportSendInterval 配置对其进行批处理。Therefore, it will be batched according to the HealthReportSendInterval configuration. 这是建议的设置,因为它可让运行状况客户端优化发往运行状况存储的运行状况报告消息以及运行状况报告处理。This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. 默认情况下,报告不立即发送。By default, reports are not sent immediately.
--remove-when-expired--remove-when-expired 该值指示是否在报告过期时从运行状况存储删除该报告。Value that indicates whether the report is removed from health store when it expires.

如果设置为 true,报告在过期后将从运行状况存储中删除。If set to true, the report is removed from the health store after it expires. 如果设置为 false,报告在过期时将被视为错误。If set to false, the report is treated as an error when expired. 此属性的值在默认情况下为 false。The value of this property is false by default. 当客户端定期报告时,它们应将 RemoveWhenExpired 设置为 false(默认值)。When clients report periodically, they should set RemoveWhenExpired false (default). 这样,如果报告器有问题(例如死锁)并且无法报告,那么在运行状况报告过期时该实体就会被评估为处于错误状态。This way, is the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated at error when the health report expires. 这会将该实体标记为处于“Error”运行状况状态。This flags the entity as being in Error health state.
--sequence-number--sequence-number 此运行状况报告的序列号(采用数字字符串形式)。The sequence number for this health report as a numeric string.

报告序列号由运行状况存储用来检测过时的报告。The report sequence number is used by the health store to detect stale reports. 如果未指定,序列号将在报告被添加时由运行状况客户端自动生成。If not specified, a sequence number is auto-generated by the health client when a report is added.
--timeout -t--timeout -t 默认值: 60。Default: 60.
--ttl--ttl 此运行状况报告保持有效的持续时间。The duration for which this health report is valid. 此字段将 ISO8601 格式用于指定该持续时间。This field uses ISO8601 format for specifying the duration.

当客户端定期报告时,它们应以高于生存时间的频率发送报告。When clients report periodically, they should send reports with higher frequency than time to live. 如果客户端以非定期的方式报告,它们可以将生存时间设置为无限。If clients report on transition, they can set the time to live to infinite. 生存时间过期时,包含运行状况信息的运行状况事件将从运行状况存储中删除(如果 RemoveWhenExpired 为 true),或者将会评估为处于错误状态(如果 RemoveWhenExpired 为 false)。When time to live expires, the health event that contains the health information is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired false. 如果未指定,生存时间将默认为无限值。If not specified, time to live defaults to infinite value.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl node restartsfctl node restart

重启 Service Fabric 群集节点。Restarts a Service Fabric cluster node.

重启已启动的 Service Fabric 群集节点。Restarts a Service Fabric cluster node that is already started.

参数Arguments

参数Argument 说明Description
--node-name [必需]--node-name [Required] 节点的名称。The name of the node.
--create-fabric-dump--create-fabric-dump 指定 True 会创建结构节点进程的转储。Specify True to create a dump of the fabric node process. 此参数区分大小写。This is case-sensitive. 默认值: falseDefault: False.
--node-instance-id--node-instance-id 目标节点的实例 ID。The instance ID of the target node. 如果指定了实例 ID,则仅当该 ID 与节点的当前实例匹配时,才重启该节点。If instance ID is specified the node is restarted only if it matches with the current instance of the node. 默认值“0”会匹配任何实例 ID。A default value of "0" would match any instance ID. 可以使用 get node 查询获取实例 ID。The instance ID can be obtained using get node query. 默认值: 0。Default: 0.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl node transitionsfctl node transition

启动或停止群集节点。Starts or stops a cluster node.

启动或停止群集节点。Starts or stops a cluster node. 群集节点是一个进程,而不是 OS 实例本身。A cluster node is a process, not the OS instance itself. 若要启动节点,请为 NodeTransitionType 参数传入“Start”。To start a node, pass in "Start" for the NodeTransitionType parameter. 若要停止节点,请为 NodeTransitionType 参数传入“Stop”。To stop a node, pass in "Stop" for the NodeTransitionType parameter. 此 API 启动操作 - API 返回时,节点可能尚未完成转换。This API starts the operation - when the API returns the node may not have finished transitioning yet. 结合相同的 OperationId 调用 GetNodeTransitionProgress 可获取操作进度。Call GetNodeTransitionProgress with the same OperationId to get the progress of the operation.

参数Arguments

参数Argument 说明Description
--node-instance-id [必需]--node-instance-id [Required] 目标节点的节点实例 ID。The node instance ID of the target node. 可通过 GetNodeInfo API 确定此信息。This can be determined through GetNodeInfo API.
--node-name [必需]--node-name [Required] 节点的名称。The name of the node.
--node-transition-type [必需]--node-transition-type [Required] 指示要执行的转换类型。Indicates the type of transition to perform. NodeTransitionType.Start 将启动已停止的节点。NodeTransitionType.Start will start a stopped node. NodeTransitionType.Stop 将停止已启动的节点。NodeTransitionType.Stop will stop a node that is up.
--operation-id [必需]--operation-id [Required] 用于标识此 API 的调用的 GUID。A GUID that identifies a call of this API. 需将此参数传入相应的 GetProgress API。This is passed into the corresponding GetProgress API.
--stop-duration-in-seconds [必需]--stop-duration-in-seconds [Required] 使节点保持停止状态的持续时间,以秒为单位。The duration, in seconds, to keep the node stopped. 最小值为 600,最大值为 14400。The minimum value is 600, the maximum is 14400. 此时间过后,节点将自动恢复启动状态。After this time expires, the node will automatically come back up.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl node transition-statussfctl node transition-status

获取使用 StartNodeTransition 启动的操作的进度。Gets the progress of an operation started using StartNodeTransition.

使用提供的 OperationId 获取通过 StartNodeTransition 启动的操作的进度。Gets the progress of an operation started with StartNodeTransition using the provided OperationId.

参数Arguments

参数Argument 说明Description
--node-name [必需]--node-name [Required] 节点的名称。The name of the node.
--operation-id [必需]--operation-id [Required] 用于标识此 API 的调用的 GUID。A GUID that identifies a call of this API. 需将此参数传入相应的 GetProgress API。This is passed into the corresponding GetProgress API.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

后续步骤Next steps