private async Task CompleteAndPersistBaselineStateAsync(StandAloneCluster cluster, CancellationToken cancellationToken)
        {
            /* For standalone scenarios, baseline upgrade is performed automatically by CM when cluster bootstraps.
             * No need to perform an upgrade again. Persist state and return. */
            UpgradeOrchestrationTrace.TraceSource.WriteInfo(TraceType, "Baseline upgrade detected. Skipping actual upgrade and simply persisting state.");

            cluster.ClusterUpgradeCompleted();
            ReleaseAssert.AssertIfNot(cluster.Pending == null, "cluster.Pending is not null after baseline upgrade completed. Investigate why cluster.Pending is not null.");
            UpgradeOrchestrationTrace.TraceSource.WriteInfo(TraceType, "State machine reports no pending upgrade. Status is reset.");
            cluster.Reset();

            await this.storeManager.PersistClusterResourceAsync(Constants.ClusterReliableDictionaryKey, cluster, cancellationToken)
            .ConfigureAwait(false);
        }
Ejemplo n.º 2
0
        public static void DryRunConfigUpgrade(StandAloneCluster cluster)
        {
            UpgradeOrchestrationTrace.TraceSource.WriteInfo(FabricUpgradeOrchestrationService.TraceType, "In data loss state. Starting dry run config upgrade in order to recover FUOS state");

            // 1-step baseline upgrade with non-baseline config
            if (cluster.RunStateMachine())
            {
                cluster.ClusterUpgradeCompleted();
                cluster.Reset();
                UpgradeOrchestrationTrace.TraceSource.WriteInfo(FabricUpgradeOrchestrationService.TraceType, "Dry run config upgrade completed");
            }
            else
            {
                UpgradeOrchestrationTrace.TraceSource.WriteError(FabricUpgradeOrchestrationService.TraceType, "Unexpected. Dry run config upgrade is skipped");
            }
        }