Skip to content

Commit

Permalink
Merge "Closes-Bug:1564691. Upgrade collector fails if we run upgrade …
Browse files Browse the repository at this point in the history
…command twice"
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Apr 4, 2016
2 parents 32a1923 + 8afe213 commit 6cd9962
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions contrail_provisioning/common/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import argparse
import stat
from distutils.version import LooseVersion

from fabric.api import settings
from fabric.api import local

class ContrailUpgrade(object):
Expand Down Expand Up @@ -161,8 +161,9 @@ def _replace_package(self):
rem_pkgs = ' '.join([x for (x,y) in self.upgrade_data['replace']])
add_pkgs = ' '.join([y for (x,y) in self.upgrade_data['replace']])
if self.pdist in ['Ubuntu']:
local('DEBIAN_FRONTEND=noninteractive apt-get -y remove --purge\
%s' % rem_pkgs)
with settings(warn_only=True):
local('DEBIAN_FRONTEND=noninteractive apt-get -y remove --purge\
%s' % rem_pkgs)
local('DEBIAN_FRONTEND=noninteractive apt-get -y install --reinstall\
%s' % add_pkgs)
else:
Expand Down

0 comments on commit 6cd9962

Please sign in to comment.