예제 #1
0
 internal static void ActOnClusDbHang(LatencyChecker.ClusDbHungAction action)
 {
     if (action != null && action.TakeAction && action.HungInfo != null)
     {
         ReplayCrimsonEvents.HungNodeRecoveryActionStart.Log <string>(LatencyChecker.ConvertAmServerNamesToString(action.TargetNodes));
         bool flag;
         if (RegistryParameters.IsKillClusterServiceOnClusApiHang)
         {
             flag = true;
             if (action.TargetNodes != null && action.TargetNodes.Length > 0)
             {
                 AmServerName             amServerName = action.TargetNodes[0];
                 RpcKillServiceImpl.Reply reply        = RpcKillServiceImpl.SendKillRequest(amServerName.Fqdn, "Clussvc", action.HungInfo.ApiHungStartTime.LocalTime, false, RegistryParameters.RpcKillServiceTimeoutInMSec);
                 flag = (reply != null && reply.IsSucceeded && reply.IsSucceeded);
             }
         }
         else
         {
             flag = false;
             ReplayCrimsonEvents.SkippedSendingClussvcKillRequest.LogPeriodic(action.HungInfo.ApiName, TimeSpan.FromMinutes(15.0));
         }
         if (!flag)
         {
             string text = LatencyChecker.ConvertAmServerNamesToString(action.TargetNodes);
             ReplayCrimsonEvents.HungNodeRebootRequested.Log <string>(text);
             LatencyChecker.TriggerNodeRestart(action.HungInfo.CurrentGumId.ToString(), (action.HungInfo.CurrentLockOwnerName != null) ? action.HungInfo.CurrentLockOwnerName.NetbiosName : "NULL", text, action.HungInfo, action);
             return;
         }
     }
     else if (action == null || action.HungInfo == null)
     {
         ReplayCrimsonEvents.GenericMessage.Log <string>("ActOnClusDbHang: Action is null or action.HungInfo is null");
     }
 }
예제 #2
0
        public static void HandleRequest(RpcGenericRequestInfo requestInfo, ref RpcGenericReplyInfo replyInfo)
        {
            RpcGenericReplyInfo tmpReplyInfo = null;

            RpcKillServiceImpl.Request req = null;
            RpcKillServiceImpl.Reply   rep = new RpcKillServiceImpl.Reply();
            Exception ex = AmHelper.HandleKnownExceptions(delegate(object param0, EventArgs param1)
            {
                req = ActiveManagerGenericRpcHelper.ValidateAndGetAttachedRequest <RpcKillServiceImpl.Request>(requestInfo, 1, 0);
                ReplayCrimsonEvents.ReceivedRequestToKillService.Log <string, string, RpcKillServiceImpl.Request>(req.ServiceName, req.OriginatingServerName, req);
                lock (RpcKillServiceImpl.locker)
                {
                    RpcKillServiceImpl.HandleRequestInternal(req, rep);
                }
                tmpReplyInfo = ActiveManagerGenericRpcHelper.PrepareServerReply(requestInfo, rep, 1, 0);
            });

            if (tmpReplyInfo != null)
            {
                replyInfo = tmpReplyInfo;
            }
            if (ex != null)
            {
                throw new AmServerException(ex.Message, ex);
            }
        }
예제 #3
0
        // Token: 0x060001B6 RID: 438 RVA: 0x0000B2F4 File Offset: 0x000094F4
        internal void GenericRpcDispatch(RpcGenericRequestInfo requestInfo, ref RpcGenericReplyInfo replyInfo)
        {
            switch (requestInfo.CommandId)
            {
            case 1:
                RpcKillServiceImpl.HandleRequest(requestInfo, ref replyInfo);
                return;

            case 2:
                RpcUpdateLastLogImpl.HandleRequest(requestInfo, ref replyInfo);
                return;

            default:
                throw new ActiveManagerUnknownGenericRpcCommandException(requestInfo.ServerVersion, ActiveManagerGenericRpcHelper.LocalServerVersion, requestInfo.CommandId);
            }
        }