change the logic of can_upgrade
Merge pull request #110 from michaelnsj/cluster

Merged.