Add doNotPerformUpgrade setting and enhance upgrade warning messages (#2327)