public StandaloneGoalStateProvisioner( StoreManager storeManager, UpgradeOrchestrator orchestrator, CancellationToken cancellationToken) { this.storeManager = storeManager; this.orchestrator = orchestrator; this.cancellationToken = cancellationToken; }
public UpgradeOrchestrationMessageProcessor( StoreManager storeManager, FabricClient fc, UpgradeOrchestrator orchestrator, CancellationToken cancellationToken) { this.storeManager = storeManager; this.fabricClient = fc; this.cancellationToken = cancellationToken; this.orchestrator = orchestrator; }
public override void Setup() { base.Setup(); this.Orchestrator = new UpgradeOrchestrator( this.Upgrader, this.Tracer, this.PrerunChecker, input: null, output: this.Output); this.PrerunChecker.SetCommandToRerun("`gvfs upgrade --confirm`"); }
public override void Setup() { base.Setup(); this.orchestrator = new WindowsUpgradeOrchestrator( this.Upgrader, this.Tracer, this.FileSystem, this.PrerunChecker, input: null, output: this.Output); this.PrerunChecker.SetCommandToRerun("`scalar upgrade --confirm`"); }
public void ReportUnhealthyIfNecessaryTest() { StandAloneCluster cluster = Utility.PopulateStandAloneClusterWithBaselineJson("myClusterConfig.UnSecure.DevCluster.json"); cluster.TargetNodeConfig = new ClusterNodeConfig(null, 0); FabricUpgradeOrchestrationService service = new FabricUpgradeOrchestrationService(new StatefulServiceContext(), "hiahiaEndpoint", false); UpgradeOrchestrator orchestrator = service.Orchestrator; Assert.IsFalse(orchestrator.ReportUnhealthyIfNecessary(cluster)); cluster.TargetCsmConfig.FabricSettings = new List <SettingsSectionDescription>() { new SettingsSectionDescription() { Name = StringConstants.SectionName.UpgradeOrchestrationService, Parameters = new List <SettingsParameterDescription>() { new SettingsParameterDescription() { Name = StringConstants.ParameterName.FaultStep, Value = "1" }, new SettingsParameterDescription() { Name = StringConstants.ParameterName.FaultFlow, Value = "RollingBack" }, } } }; cluster.Pending = new MockUpMultiphaseClusterUpgradeState(2, cluster) { CurrentListIndex = 1 }; Assert.IsFalse(orchestrator.ReportUnhealthyIfNecessary(cluster)); cluster.Pending = new MockUpMultiphaseClusterUpgradeState(2, cluster) { CurrentListIndex = 1, UpgradeUnsuccessful = true, }; bool healthy = true; Assert.IsTrue(orchestrator.ReportUnhealthyIfNecessary(cluster, isHealthy => { healthy = isHealthy; })); Assert.IsFalse(healthy); }
public void Setup() { this.Tracer = new MockTracer(); this.Output = new MockTextWriter(); this.PreRunChecker = new MockInstallerPrerunChecker(this.Tracer); this.PreRunChecker.Reset(); this.MoqUpgrader = this.DefaultUpgrader(); this.orchestrator = new UpgradeOrchestrator( this.MoqUpgrader.Object, this.Tracer, this.PreRunChecker, input: null, output: this.Output); this.SetUpgradeAvailable(new Version(GVFSVersion), error: null); }
public void Setup() { this.Tracer = new MockTracer(); this.FileSystem = new MockFileSystem(new MockDirectory(@"mock:\Scalar.Upgrades\Download", null, null)); this.Output = new MockTextWriter(); this.PreRunChecker = new MockInstallerPrerunChecker(this.Tracer); this.PreRunChecker.Reset(); this.MoqUpgrader = this.DefaultUpgrader(); this.orchestrator = new WindowsUpgradeOrchestrator( this.MoqUpgrader.Object, this.Tracer, this.FileSystem, this.PreRunChecker, input: null, output: this.Output); this.SetUpgradeAvailable(new Version(ScalarVersion), error: null); }