// 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: 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]);
 }
Beispiel #4
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);
        }
Beispiel #5
0
 internal void Leaving(string format, params object[] args)
 {
     AmTrace.Leaving(this.PrefixDatabase(format), args);
 }