mirror of
https://github.com/ceph/ceph
synced 2025-02-23 11:07:35 +00:00
mgr/cephadm: report exception during upgrade in upgrade status
Fixes: https://tracker.ceph.com/issues/50361 Signed-off-by: Adam King <adking@redhat.com>
This commit is contained in:
parent
648f9e11a6
commit
6119294b28
@ -80,6 +80,7 @@ class CephadmUpgrade:
|
||||
'UPGRADE_FAILED_PULL',
|
||||
'UPGRADE_REDEPLOY_DAEMON',
|
||||
'UPGRADE_BAD_TARGET_VERSION',
|
||||
'UPGRADE_EXCEPTION'
|
||||
]
|
||||
|
||||
def __init__(self, mgr: "CephadmOrchestrator"):
|
||||
@ -250,7 +251,16 @@ class CephadmUpgrade:
|
||||
:return:
|
||||
"""
|
||||
if self.upgrade_state and not self.upgrade_state.paused:
|
||||
self._do_upgrade()
|
||||
try:
|
||||
self._do_upgrade()
|
||||
except Exception as e:
|
||||
self._fail_upgrade('UPGRADE_EXCEPTION', {
|
||||
'severity': 'error',
|
||||
'summary': 'Upgrade: failed due to an unexpected exception',
|
||||
'count': 1,
|
||||
'detail': [f'Unexpected exception occurred during upgrade process: {str(e)}'],
|
||||
})
|
||||
return False
|
||||
return True
|
||||
return False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user