remove trusty requirement to allow xenial upgrades
Closes-Bug: #1709962 Closes-Bug: #1710645 Change-Id: I8274e40f36ac8c916b15efb6bb3d6f3b5d3af386
This commit is contained in:
parent
1932280ca3
commit
d259b894b2
|
@ -24,7 +24,6 @@ from ceph.broker import (
|
|||
process_requests
|
||||
)
|
||||
|
||||
from charmhelpers.core import host
|
||||
from charmhelpers.core import hookenv
|
||||
from charmhelpers.core.hookenv import (
|
||||
log,
|
||||
|
@ -112,12 +111,6 @@ def check_for_upgrade():
|
|||
log("Ceph is not bootstrapped, skipping upgrade checks.")
|
||||
return
|
||||
|
||||
release_info = host.lsb_release()
|
||||
if not release_info['DISTRIB_CODENAME'] == 'trusty':
|
||||
log("Invalid upgrade path from {}. Only trusty is currently "
|
||||
"supported".format(release_info['DISTRIB_CODENAME']))
|
||||
return
|
||||
|
||||
c = hookenv.config()
|
||||
old_version = c.previous('source')
|
||||
log('old_version: {}'.format(old_version))
|
||||
|
|
|
@ -23,20 +23,15 @@ class UpgradeRollingTestCase(unittest.TestCase):
|
|||
@patch('ceph_hooks.ceph.roll_monitor_cluster')
|
||||
@patch('ceph_hooks.ceph.wait_for_all_monitors_to_upgrade')
|
||||
@patch('ceph_hooks.hookenv')
|
||||
@patch('ceph_hooks.host')
|
||||
@patch('ceph_hooks.ceph.roll_osd_cluster')
|
||||
def test_check_for_upgrade(self,
|
||||
roll_osd_cluster,
|
||||
host,
|
||||
hookenv,
|
||||
wait_for_mons,
|
||||
roll_monitor_cluster,
|
||||
log,
|
||||
is_bootstrapped):
|
||||
is_bootstrapped.return_value = True
|
||||
host.lsb_release.return_value = {
|
||||
'DISTRIB_CODENAME': 'trusty',
|
||||
}
|
||||
previous_mock = MagicMock().return_value
|
||||
previous_mock.previous.return_value = "cloud:trusty-juno"
|
||||
hookenv.config.side_effect = [previous_mock,
|
||||
|
@ -70,20 +65,15 @@ class UpgradeRollingTestCase(unittest.TestCase):
|
|||
@patch('ceph_hooks.ceph.roll_monitor_cluster')
|
||||
@patch('ceph_hooks.ceph.wait_for_all_monitors_to_upgrade')
|
||||
@patch('ceph_hooks.hookenv')
|
||||
@patch('ceph_hooks.host')
|
||||
@patch('ceph_hooks.ceph.roll_osd_cluster')
|
||||
def test_check_for_upgrade_not_bootstrapped(self,
|
||||
roll_osd_cluster,
|
||||
host,
|
||||
hookenv,
|
||||
wait_for_mons,
|
||||
roll_monitor_cluster,
|
||||
log,
|
||||
is_bootstrapped):
|
||||
is_bootstrapped.return_value = False
|
||||
host.lsb_release.return_value = {
|
||||
'DISTRIB_CODENAME': 'trusty',
|
||||
}
|
||||
previous_mock = MagicMock().return_value
|
||||
previous_mock.previous.return_value = "cloud:trusty-juno"
|
||||
hookenv.config.side_effect = [previous_mock,
|
||||
|
|
Loading…
Reference in New Issue