CN113687929B

Abnormality processing method and related device

Abstract

The present application discloses an exception handling method, including: when a service self-check component detects an exception in a target service, determining whether there is an exception handling process that performs operations on the target service; when there is no exception handling process, obtaining the status information of the target service; when the status information is inactive, performing an exception handling operation on the target service through the service self-check component. By determining whether there is an exception handling process that performs operations on the target service when the service self-check component detects an exception, and determining whether the status information is inactive when there is no exception handling process, it is avoided that there are exception handling processes that perform operations at the same time, and it is also avoided that other processes have just completed processing the target service and do not need to perform exception processing on the target service again, avoiding mutual exclusion problems and improving the experience of operating the file system. The present application also discloses an exception handling device, a server, and a computer-readable storage medium, which have the above beneficial effects.

CN113687929B, drawing sheet 1
Sheet 1 of 1

Term

14.9 yearsleft in the term

Expires 24 August 2041.

  1. Priority and filed
  2. Granted
  3. Today
  4. Expires

5 claims: 5 independent, 0 dependent

  1. 1
    一种异常处理方法,其特征在于,应用于ctdb对于smb异常进行处理的场景,包括: 当服务自检组件检测到目标服务出现异常时,判断是否存在对所述目标服务执行操作的异常处理进程;所述服务自检组件为ctdb,所述目标服务为smb服务; 当不存在所述异常处理进程时,获取所述目标服务的状态信息;其中,所述状态信息包括活动和未活动,所述状态信息为活动时用于表征所述目标服务刚刚被异常处理完成,所述状态信息为未活动时用于表征所述目标服务还没有被执行相应的异常处理操作; 当所述状态信息为未活动时,通过所述服务自检组件对所述目标服务执行异常处理操作; 其中,当服务自检组件检测到目标服务出现异常时,判断是否存在对所述目标服务执行操作的异常处理进程,包括: 当所述服务自检组件检测到所述目标服务的端口未被占用时,判断是否存在管理软件下发的所述异常处理进程; 其中,当所述服务自检组件检测到所述目标服务的端口未被占用时,判断是否存在管理软件下发的所述异常处理进程,包括: 当所述服务自检组件检测到所述目标服务的端口未被占用时,判断是否存在所述管理软件下发的ism_pid进程; 其中,还包括: 当存在所述异常处理进程时,对所述服务自检组件的异常处理操作执行终止操作,并通过所述异常处理进程对所述目标服务进行异常处理; 其中,当所述状态信息为未活动时,通过所述服务自检组件对所述目标服务执行异常处理操作,包括: 当所述状态信息为未活动时,通过所述服务自检组件对所述目标服务执行重启操作; 其中,还包括: 当所述状态信息为活动时,对所述服务自检组件的异常处理操作执行终止操作。
  2. 2
    根据权利要求1所述的异常处理方法,其特征在于,当不存在所述异常处理进程时, 获取所述目标服务的状态信息,包括: 当不存在所述异常处理进程时,通过查询命令获取所述目标服务的状态信息。
  3. 3
    一种异常处理装置,其特征在于,应用于ctdb对于smb异常进行处理的场景,包括: 进程判断模块,用于当服务自检组件检测到目标服务出现异常时,判断是否存在对所述目标服务执行操作的异常处理进程;所述服务自检组件为ctdb,所述目标服务为smb服务; 状态获取模块,用于当不存在所述异常处理进程时,获取所述目标服务的状态信息;其中,所述状态信息包括活动和未活动,所述状态信息为活动时用于表征所述目标服务刚刚被异常处理完成,所述状态信息为未活动时用于表征所述目标服务还没有被执行相应的异常处理操作; 异常处理模块,用于当所述状态信息为未活动时,通过所述服务自检组件对所述目标服务执行异常处理操作; 其中,所述进程判断模块,具体用于当服务自检组件检测到目标服务的端□未被占用时,判断是否存在管理软件下发的异常处理进程; 其中,所述进程判断模块,具体用于当服务自检组件检测到目标服务的端□未被占用时,判断是否存在管理软件下发的ism_pid进程; 其中,第一终止模块,用于当存在异常处理进程时,对服务自检组件的异常处理操作执行终止操作,并通过异常处理进程对目标服务进行异常处理; 其中,所述异常处理模块,具体用于当状态信息为未活动时,通过服务自检组件对目标服务执行重启操作; 其中,第二终止模块,用于当状态信息为活动时,对服务自检组件的异常处理操作执行终止操作。
  4. 4
    一种服务器,其特征在于,包括: 存储器,用于存储计算机程序; 处理器,用于执行所述计算机程序时实现如权利要求1至2任一项所述的异常处理方法的步骤。
  5. 5
    一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至2任一项所述的异常处理方法的步骤。
Independent claims5