Skip to content

Commit

Permalink
Reboot DPDK compute as part of fab migrate_compute_kernel
Browse files Browse the repository at this point in the history
Change-Id: I468373882a239a15ab66667ed79c2a6a2c3a1d4d
Closes-bug: 1712132
  • Loading branch information
ram-yadav committed Aug 31, 2017
1 parent a035c34 commit 8809641
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fabfile/tasks/kernel.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from fabfile.config import *
from fabfile.utils.fabos import detect_ostype, get_linux_distro
from fabfile.utils.cluster import get_nodes_to_upgrade_pkg, reboot_nodes, get_package_installed_info
from fabfile.utils.cluster import (get_nodes_to_upgrade_pkg, reboot_nodes,
get_package_installed_info, get_compute_migrate_nodes)
from fabfile.tasks.install import apt_install, pkg_install


Expand Down Expand Up @@ -165,7 +166,7 @@ def upgrade_kernel_node(*args, **kwargs):

@task
@EXECUTE_TASK
@roles('compute')
@hosts(get_compute_migrate_nodes())
def migrate_compute_kernel(**kwargs):
execute('create_install_repo_node', env.host_string)
execute('migrate_compute_kernel_node', env.host_string, **kwargs)
Expand Down
13 changes: 13 additions & 0 deletions fabfile/utils/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,19 @@ def get_priority_group_details(compute_host_string):
priority_details = (set_priority, priority_id, priority_bandwidth, priority_scheduling)
return priority_details

def get_compute_migrate_nodes():
"""Identify the list if compute nodes with build host as last in the list.
"""
compute_list = []
for hstr in env.roledefs['compute']:
if hstr == testbed.host_build:
continue
compute_list.append(hstr)
if testbed.host_build in env.roledefs['compute']:
compute_list.append(testbed.host_build)

return compute_list

def get_qos_nodes():
"""Identifies the list of nodes to be provisioned for
Qos in testbed.py.
Expand Down

0 comments on commit 8809641

Please sign in to comment.