// Token: 0x06000059 RID: 89 RVA: 0x00002D7C File Offset: 0x00000F7C
 protected override void RunInternal()
 {
     AmTrace.Entering("AmStartupAutoMounter.RunInternal()", new object[0]);
     this.DelayFirstStartup();
     if (AmSystemManager.Instance.DbNodeAttemptTable != null)
     {
         AmSystemManager.Instance.DbNodeAttemptTable.ClearFailedTime();
     }
     this.RunInternalCommon();
     AmTrace.Leaving("AmStartupAutoMounter.RunInternal()", new object[0]);
 }
        // Token: 0x060003FA RID: 1018 RVA: 0x000156E4 File Offset: 0x000138E4
        protected override void TimerCallbackInternal()
        {
            AmTrace.Entering("AmPamMonitor.TimerCallbackInternal", new object[0]);
            switch (this.phase)
            {
            case AmPamMonitor.PamMonitorPhase.Verification:
                this.PerformVerification();
                break;

            case AmPamMonitor.PamMonitorPhase.Recovery:
                this.PerformRecovery();
                break;
            }
            AmTrace.Leaving("AmPamMonitor.TimerCallbackInternal", new object[0]);
        }
 // Token: 0x060000DB RID: 219 RVA: 0x00006200 File Offset: 0x00004400
 protected override void PollerThread()
 {
     AmTrace.Entering("ClusterEventManager.PollerThread", new object[0]);
     try
     {
         lock (this.m_locker)
         {
             if (!this.m_fShutdown)
             {
                 this.CleanupClusterNotify();
                 this.m_isMonitoring = this.InitializeClusterNotify();
                 if (!this.m_isMonitoring)
                 {
                     AmTrace.Error("Failed to initialize cluster notification", new object[0]);
                 }
             }
         }
         if (!this.m_fShutdown && this.m_isMonitoring)
         {
             this.MonitorClusterEvents();
         }
     }
     catch (ClusterException ex)
     {
         AmTrace.Error("MonitorForClusterEvents() got a cluster api exception: {0}", new object[]
         {
             ex
         });
     }
     catch (AmServerNameResolveFqdnException ex2)
     {
         AmTrace.Error("MonitorForClusterEvents() got a AmGetFqdnFailedADErrorException exception: {0}", new object[]
         {
             ex2
         });
     }
     lock (this.m_locker)
     {
         this.CleanupClusterNotify();
         this.m_isMonitoring = false;
     }
     if (!this.m_fShutdown)
     {
         AmClusterEventManager.Tracer.TraceDebug(0L, "Triggering refresh for error recovery");
         AmSystemManager.Instance.ConfigManager.TriggerRefresh(true);
     }
     AmClusterEventManager.Tracer.TraceDebug(0L, "Leaving ClusterEventManager.PollerThread");
 }
 // Token: 0x06000045 RID: 69 RVA: 0x00002878 File Offset: 0x00000A78
 internal void Run()
 {
     AmTrace.Entering("AmBatchOperationBase.Run()", new object[0]);
     if (RegistryParameters.AmDisableBatchOperations)
     {
         ReplayCrimsonEvents.BatchMounterOperationsDisabled.Log();
         AmTrace.Leaving("AmBatchOperationBase.Run(), BatchMounterOperationsDisabled", new object[0]);
         return;
     }
     lock (this.m_locker)
     {
         try
         {
             this.m_isDebugOptionEnabled = this.m_amConfig.IsDebugOptionsEnabled();
             this.LogStartupInternal();
             Exception ex = AmHelper.HandleKnownExceptions(delegate(object param0, EventArgs param1)
             {
                 this.RunInternal();
             });
             if (ex != null)
             {
                 AmTrace.Error("Batch mounter operation {0} got an exception {1}", new object[]
                 {
                     base.GetType().Name,
                     ex
                 });
                 ReplayCrimsonEvents.BatchMounterOperationFailed.Log <string>(ex.Message);
             }
         }
         finally
         {
             if (!this.m_derivedManagesAllDone && (this.m_opList == null || this.m_opList.Count == 0))
             {
                 this.MarkAllDone();
             }
         }
     }
     AmTrace.Leaving("AmBatchOperationBase.Run()", new object[0]);
 }
Example #5
0
        // Token: 0x060001A2 RID: 418 RVA: 0x0000A078 File Offset: 0x00008278
        internal static bool AttemptServerSwitchoverOnShutdown()
        {
            AmTrace.Entering("ActiveManagerCore.AttemptServerSwitchoverOnShutdown", new object[0]);
            ExDateTime utcNow = ExDateTime.UtcNow;

            ReplayEventLogConstants.Tuple_PreShutdownStart.LogEvent(null, new object[0]);
            Exception ex     = null;
            bool      result = false;

            try
            {
                AmConfig config = AmSystemManager.Instance.Config;
                if (config.IsPamOrSam)
                {
                    string fqdn = config.DagConfig.CurrentPAM.Fqdn;
                    AmTrace.Debug("{0} Trying to mount all the databases on other servers", new object[]
                    {
                        ExDateTime.Now
                    });
                    AmRpcClientHelper.ServerSwitchOver(fqdn, AmServerName.LocalComputerName.Fqdn);
                    if (config.IsPAM)
                    {
                        AmTrace.Debug("{0} Trying to move PAM off this node", new object[]
                        {
                            ExDateTime.Now
                        });
                        using (IAmCluster amCluster = ClusterFactory.Instance.Open())
                        {
                            using (IAmClusterGroup amClusterGroup = amCluster.FindCoreClusterGroup())
                            {
                                TimeSpan ts       = ExDateTime.UtcNow.Subtract(utcNow);
                                TimeSpan timeSpan = TimeSpan.FromSeconds(115.0).Subtract(ts);
                                if (!(timeSpan <= TimeSpan.Zero))
                                {
                                    if (amClusterGroup.MoveGroupToReplayEnabledNode((string targetNode) => AmHelper.IsReplayRunning(targetNode), "Network Name", timeSpan, out fqdn))
                                    {
                                        ReplayEventLogConstants.Tuple_SuccMovePAM.LogEvent(null, new object[]
                                        {
                                            Environment.MachineName,
                                            fqdn
                                        });
                                        AmTrace.Debug("{0} Moved PAM to another node", new object[]
                                        {
                                            ExDateTime.Now
                                        });
                                        goto IL_197;
                                    }
                                }
                                ReplayEventLogConstants.Tuple_FailedMovePAM.LogEvent(null, new object[]
                                {
                                    Environment.MachineName
                                });
                                IL_197 :;
                            }
                        }
                    }
                    result = true;
                    ReplayEventLogConstants.Tuple_PreShutdownOK.LogEvent(null, new object[0]);
                }
            }
            catch (ClusterException ex2)
            {
                ex = ex2;
            }
            catch (AmRpcException ex3)
            {
                ex = ex3;
            }
            catch (AmServerTransientException ex4)
            {
                ex = ex4;
            }
            catch (AmServerException ex5)
            {
                ex = ex5;
            }
            finally
            {
                if (ex != null)
                {
                    ReplayEventLogConstants.Tuple_PreShutdownFailed.LogEvent(null, new object[]
                    {
                        ex.Message
                    });
                }
                AmTrace.Leaving("ActiveManagerCore.AttemptServerSwitchoverOnShutdown", new object[0]);
            }
            return(result);
        }
Example #6
0
 internal void Entering(string format, params object[] args)
 {
     AmTrace.Entering(this.PrefixDatabase(format), args);
 }
 // Token: 0x060003F8 RID: 1016 RVA: 0x000156A9 File Offset: 0x000138A9
 internal AmPamMonitor(TimeSpan checkPeriod) : base(checkPeriod, checkPeriod, "AmPamMonitor")
 {
     AmTrace.Entering("Constructor of AmPamMonitor", new object[0]);
     this.checkPeriod = checkPeriod;
 }