Exemplo n.º 1
0
        // Token: 0x060008B6 RID: 2230 RVA: 0x00029CF0 File Offset: 0x00027EF0
        internal static void InstallFailoverClustering(out string verboseLog)
        {
            HaTaskStringBuilderOutputHelper haTaskStringBuilderOutputHelper = new HaTaskStringBuilderOutputHelper("m.e.cluster.replay.dll!InstallFailoverClustering");

            ExTraceGlobals.ClusterTracer.TraceDebug(0L, "Going to InstallFailoverClustering() on this machine.");
            haTaskStringBuilderOutputHelper.WriteProgressSimple(ReplayStrings.DagTaskInstallingFailoverClustering(AmServerName.LocalComputerName.NetbiosName));
            try
            {
                OsComponentManager osComponentManager = new OsComponentManager(null, haTaskStringBuilderOutputHelper);
                osComponentManager.AddWindowsFeature(OsComponent.ComponentRSATClustering);
                osComponentManager.AddWindowsFeature(OsComponent.ComponentFailoverClustering);
            }
            catch (DagTaskServerException ex)
            {
                ExTraceGlobals.ClusterTracer.TraceError <DagTaskServerException>(0L, "InstallFailoverClustering() failed: {0}", ex);
                haTaskStringBuilderOutputHelper.WriteErrorSimple(ex);
                throw ex;
            }
            catch (DagTaskServerTransientException ex2)
            {
                ExTraceGlobals.ClusterTracer.TraceError <DagTaskServerTransientException>(0L, "InstallFailoverClustering() failed: {0}", ex2);
                haTaskStringBuilderOutputHelper.WriteErrorSimple(ex2);
                throw ex2;
            }
            haTaskStringBuilderOutputHelper.WriteProgressSimple(ReplayStrings.DagTaskInstalledFailoverClustering);
            verboseLog = haTaskStringBuilderOutputHelper.ToString();
        }
Exemplo n.º 2
0
        // Token: 0x060008B5 RID: 2229 RVA: 0x00029C34 File Offset: 0x00027E34
        internal static void DestroyDagCluster(string clusterName, out string verboseLog)
        {
            HaTaskStringBuilderOutputHelper haTaskStringBuilderOutputHelper = new HaTaskStringBuilderOutputHelper("m.e.cluster.replay.dll!DestroyDagCluster");

            ExTraceGlobals.ClusterTracer.TraceDebug <string>(0L, "Going to DestroyCluster( {0} ) on this machine.", clusterName);
            GCHandle  value = GCHandle.Alloc(haTaskStringBuilderOutputHelper);
            Exception ex    = null;

            try
            {
                haTaskStringBuilderOutputHelper.LastException = null;
                haTaskStringBuilderOutputHelper.MaxPercentageDuringCallback = 0;
                using (IAmCluster amCluster = ClusterFactory.Instance.Open())
                {
                    amCluster.DestroyExchangeCluster(haTaskStringBuilderOutputHelper, GCHandle.ToIntPtr(value), out ex, true);
                }
                if (ex != null)
                {
                    haTaskStringBuilderOutputHelper.WriteErrorSimple(ex);
                }
            }
            catch (LocalizedException exception)
            {
                DagHelper.ThrowDagTaskOperationWrapper(exception);
            }
            finally
            {
                verboseLog = haTaskStringBuilderOutputHelper.ToString();
                value.Free();
            }
        }
Exemplo n.º 3
0
        // Token: 0x060008B3 RID: 2227 RVA: 0x00029B08 File Offset: 0x00027D08
        internal static IAmCluster CreateDagCluster(string clusterName, AmServerName firstNodeName, string[] ipAddresses, uint[] netmasks, out string verboseLog)
        {
            IAmCluster result = null;
            HaTaskStringBuilderOutputHelper haTaskStringBuilderOutputHelper = new HaTaskStringBuilderOutputHelper("m.e.cluster.replay.dll!CreateDagCluster");
            GCHandle  value = GCHandle.Alloc(haTaskStringBuilderOutputHelper);
            Exception ex    = null;

            try
            {
                haTaskStringBuilderOutputHelper.WriteProgressSimple(ReplayStrings.DagTaskFormingClusterProgress(clusterName, firstNodeName.NetbiosName));
                haTaskStringBuilderOutputHelper.LastException = null;
                haTaskStringBuilderOutputHelper.MaxPercentageDuringCallback = 0;
                result = ClusterFactory.Instance.CreateExchangeCluster(clusterName, firstNodeName, ipAddresses, netmasks, haTaskStringBuilderOutputHelper, GCHandle.ToIntPtr(value), out ex, true);
                if (ex != null)
                {
                    haTaskStringBuilderOutputHelper.WriteErrorSimple(ex);
                }
            }
            catch (LocalizedException exception)
            {
                DagHelper.ThrowDagTaskOperationWrapper(exception);
            }
            finally
            {
                verboseLog = haTaskStringBuilderOutputHelper.ToString();
                value.Free();
            }
            return(result);
        }
Exemplo n.º 4
0
 // Token: 0x060008B8 RID: 2232 RVA: 0x00029E34 File Offset: 0x00028034
 private static void AddDagClusterNodeInternal(HaTaskStringBuilderOutputHelper output, AmServerName mailboxServerName, out string verboseLog)
 {
     try
     {
         Exception ex = null;
         output.AppendLogMessage("Opening a local AmCluster handle.", new object[0]);
         using (IAmCluster amCluster = ClusterFactory.Instance.Open())
         {
             output.WriteProgressSimple(ReplayStrings.DagTaskAddingServerToDag(mailboxServerName.NetbiosName, amCluster.Name));
             GCHandle value = GCHandle.Alloc(output);
             try
             {
                 output.LastException = null;
                 output.MaxPercentageDuringCallback = 0;
                 amCluster.AddNodeToCluster(mailboxServerName, output, GCHandle.ToIntPtr(value), out ex, true);
             }
             finally
             {
                 value.Free();
             }
         }
         if (output.LastException != null)
         {
             output.WriteErrorSimple(output.LastException);
         }
         if (ex != null)
         {
             output.WriteErrorSimple(ex);
         }
         output.WriteProgressSimple(ReplayStrings.DagTaskJoinedNodeToCluster(mailboxServerName.NetbiosName));
     }
     catch (LocalizedException exception)
     {
         DagHelper.ThrowDagTaskOperationWrapper(exception);
     }
     finally
     {
         verboseLog = output.ToString();
     }
 }