Unhealthy ceph don't break upgrade

Bad health ceph status shouldn't stop node upgrade.
The reason is fuel overestimates ceph default value for pool
placement groups number.

Change-Id: Iff301ffeedd26a6f532dbbd480a6395cd774181a
Related-Bug: 1464656
(cherry picked from commit ff7a897aa4)
This commit is contained in:
Sergey Abramov 2016-05-11 17:46:47 +03:00
parent 7c3db083a8
commit 90719da0b5
1 changed files with 10 additions and 1 deletions

View File

@ -10,15 +10,24 @@
# License for the specific language governing permissions and limitations
# under the License.
import logging
from octane.handlers import upgrade
from octane.util import ceph
from octane.util import node as node_util
from octane.util import puppet
from octane.util import subprocess
LOG = logging.getLogger(__name__)
class CephOsdUpgrade(upgrade.UpgradeHandler):
def preupgrade(self):
ceph.check_cluster(self.node)
try:
ceph.check_cluster(self.node)
except subprocess.CalledProcessError as exc:
LOG.warning("Ceph cluster health is not OK, ignoring: %s", exc)
def prepare(self):
self.preserve_partition()