protected override Problem RunCheck()
        {
            if (!Host.IsLive())
            {
                return(new HostNotLiveWarning(this, Host));
            }

            if (update == null || !update.EnforceHomogeneity())
            {
                return(null);
            }

            if (pool.Connection.Cache.Hosts.Any(h => !update.AppliedOn(h) && !selectedServers.Contains(h)))
            {
                return(new ServerSelectionProblem(this, pool));
            }

            return(null);
        }
Example #2
0
        protected override Problem RunHostCheck()
        {
            if (update == null || !update.EnforceHomogeneity())
            {
                return(null);
            }

            //If mixed pool, skip the precheck and issue warning, because the update may not be compatible to all servers.
            if (!pool.IsPoolFullyUpgraded())
            {
                return(new MixedPoolServerSelectionWarning(this, pool));
            }

            if (pool.Connection.Cache.Hosts.Any(h => !update.AppliedOn(h) && !selectedServers.Contains(h)))
            {
                return(new ServerSelectionProblem(this, pool));
            }

            return(null);
        }