Beispiel #1
0
        public static bool ShouldReportUnhealthy(ClusterUpgradeStateBase upgradeState, UpgradeFlow currentUpgradeFlow, FaultInjectionConfig faultInjectionConfig)
        {
            MultiphaseClusterUpgradeState multiPhaseUpgradeState = upgradeState as MultiphaseClusterUpgradeState;
            int currentStep = 0;

            if (multiPhaseUpgradeState != null)
            {
                currentStep = multiPhaseUpgradeState.CurrentListIndex;
            }

            return(faultInjectionConfig.Equals(new FaultInjectionConfig(currentUpgradeFlow, currentStep)));
        }
Beispiel #2
0
        public static UpgradeFlow GetUpgradeFlow(ClusterUpgradeStateBase upgradeState)
        {
            MultiphaseClusterUpgradeState multiPhaseUpgradeState = upgradeState as MultiphaseClusterUpgradeState;

            if (multiPhaseUpgradeState != null && multiPhaseUpgradeState.UpgradeUnsuccessful)
            {
                return(UpgradeFlow.RollingBack);
            }
            else
            {
                return(UpgradeFlow.RollingForward);
            }
        }