Run dist-upgrade
This commit is contained in:
@@ -97,14 +97,17 @@ def apt_install(packages, options=None, fatal=False):
|
|||||||
subprocess.call(cmd, env=env)
|
subprocess.call(cmd, env=env)
|
||||||
|
|
||||||
|
|
||||||
def apt_upgrade(options=None, fatal=False):
|
def apt_upgrade(options=None, fatal=False, dist=False):
|
||||||
"""Install one or more packages"""
|
"""Upgrade all packages"""
|
||||||
if options is None:
|
if options is None:
|
||||||
options = ['--option=Dpkg::Options::=--force-confold']
|
options = ['--option=Dpkg::Options::=--force-confold']
|
||||||
|
|
||||||
cmd = ['apt-get', '--assume-yes']
|
cmd = ['apt-get', '--assume-yes']
|
||||||
cmd.extend(options)
|
cmd.extend(options)
|
||||||
cmd.append('upgrade')
|
if dist:
|
||||||
|
cmd.append('dist-upgrade')
|
||||||
|
else:
|
||||||
|
cmd.append('upgrade')
|
||||||
log("Upgrading with options: {}".format(options))
|
log("Upgrading with options: {}".format(options))
|
||||||
|
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
|
|||||||
@@ -352,7 +352,7 @@ def do_openstack_upgrade(configs):
|
|||||||
'--option', 'Dpkg::Options::=--force-confdef',
|
'--option', 'Dpkg::Options::=--force-confdef',
|
||||||
]
|
]
|
||||||
apt_update()
|
apt_update()
|
||||||
apt_upgrade(options=dpkg_opts, fatal=True)
|
apt_upgrade(options=dpkg_opts, fatal=True, dist=True)
|
||||||
|
|
||||||
# set CONFIGS to load templates from new release and regenerate config
|
# set CONFIGS to load templates from new release and regenerate config
|
||||||
configs.set_release(openstack_release=new_os_rel)
|
configs.set_release(openstack_release=new_os_rel)
|
||||||
|
|||||||
Reference in New Issue
Block a user