Separate uploading packages for patching
- RPM packages are uploaded after Fuel admin node bootstrapped,
as previous;
- DEB packages are uploaded after Fuel admin node deployed and
'auxiliary' repository initialized.
Change-Id: I5c423529e175ef6ddfc9ac5f5e2359e1e0b6d32f
Closes-Bug:#1502242
(cherry picked from commit a8c4492e12
)
This commit is contained in:
parent
36318fba9e
commit
e5e5c1ed43
|
@ -163,7 +163,7 @@ def upload_manifests(func):
|
|||
return wrapper
|
||||
|
||||
|
||||
def update_packages(func):
|
||||
def update_rpm_packages(func):
|
||||
@functools.wraps(func)
|
||||
def wrapper(*args, **kwargs):
|
||||
result = func(*args, **kwargs)
|
||||
|
@ -200,7 +200,7 @@ def update_packages(func):
|
|||
environment.admin_actions.upload_packages(
|
||||
local_packages_dir=settings.UPDATE_FUEL_PATH,
|
||||
centos_repo_path=settings.LOCAL_MIRROR_CENTOS,
|
||||
ubuntu_repo_path=settings.LOCAL_MIRROR_UBUNTU)
|
||||
ubuntu_repo_path=None)
|
||||
|
||||
if centos_files_count == 0:
|
||||
return result
|
||||
|
|
|
@ -208,20 +208,26 @@ class AdminActions(BaseActions):
|
|||
ubuntu_repo_path):
|
||||
logger.info("Upload fuel's packages from directory {0}."
|
||||
.format(local_packages_dir))
|
||||
centos_files_count = cond_upload(
|
||||
self.admin_remote, local_packages_dir,
|
||||
os.path.join(centos_repo_path, 'Packages'),
|
||||
"(?i).*\.rpm$")
|
||||
|
||||
ubuntu_files_count = cond_upload(
|
||||
self.admin_remote, local_packages_dir,
|
||||
os.path.join(ubuntu_repo_path, 'pool/main'),
|
||||
"(?i).*\.deb$")
|
||||
centos_files_count = 0
|
||||
ubuntu_files_count = 0
|
||||
|
||||
if centos_repo_path:
|
||||
centos_files_count = cond_upload(
|
||||
self.admin_remote, local_packages_dir,
|
||||
os.path.join(centos_repo_path, 'Packages'),
|
||||
"(?i).*\.rpm$")
|
||||
if centos_files_count > 0:
|
||||
regenerate_centos_repo(self.admin_remote, centos_repo_path)
|
||||
|
||||
if ubuntu_repo_path:
|
||||
ubuntu_files_count = cond_upload(
|
||||
self.admin_remote, local_packages_dir,
|
||||
os.path.join(ubuntu_repo_path, 'pool/main'),
|
||||
"(?i).*\.deb$")
|
||||
if ubuntu_files_count > 0:
|
||||
regenerate_ubuntu_repo(self.admin_remote, ubuntu_repo_path)
|
||||
|
||||
if centos_files_count > 0:
|
||||
regenerate_centos_repo(self.admin_remote, centos_repo_path)
|
||||
if ubuntu_files_count > 0:
|
||||
regenerate_ubuntu_repo(self.admin_remote, ubuntu_repo_path)
|
||||
return centos_files_count, ubuntu_files_count
|
||||
|
||||
@logwrap
|
||||
|
|
|
@ -28,7 +28,7 @@ from proboscis.asserts import assert_true
|
|||
from fuelweb_test.helpers import checkers
|
||||
from fuelweb_test.helpers.decorators import revert_info
|
||||
from fuelweb_test.helpers.decorators import retry
|
||||
from fuelweb_test.helpers.decorators import update_packages
|
||||
from fuelweb_test.helpers.decorators import update_rpm_packages
|
||||
from fuelweb_test.helpers.decorators import upload_manifests
|
||||
from fuelweb_test.helpers.eb_tables import Ebtables
|
||||
from fuelweb_test.helpers.fuel_actions import AdminActions
|
||||
|
@ -365,6 +365,14 @@ class EnvironmentModel(object):
|
|||
self.set_admin_ssh_password()
|
||||
self.admin_actions.modify_configs(self.d_env.router())
|
||||
self.wait_bootstrap()
|
||||
|
||||
if settings.UPDATE_FUEL:
|
||||
# Update Ubuntu packages
|
||||
self.admin_actions.upload_packages(
|
||||
local_packages_dir=settings.UPDATE_FUEL_PATH,
|
||||
centos_repo_path=None,
|
||||
ubuntu_repo_path=settings.LOCAL_MIRROR_UBUNTU)
|
||||
|
||||
self.docker_actions.wait_for_ready_containers()
|
||||
time.sleep(10)
|
||||
self.set_admin_keystone_password()
|
||||
|
@ -402,7 +410,7 @@ class EnvironmentModel(object):
|
|||
"xargs -n1 -i sed '$aenabled=0' -i {}"
|
||||
self.execute_remote_cmd(remote, cmd)
|
||||
|
||||
@update_packages
|
||||
@update_rpm_packages
|
||||
@upload_manifests
|
||||
def wait_for_provisioning(self):
|
||||
_wait(lambda: _tcp_ping(
|
||||
|
|
Loading…
Reference in New Issue