Skip to content

Commit

Permalink
For sriov update the nova.conf with scheduler_default_filters
Browse files Browse the repository at this point in the history
during upgrade .

Change-Id: I6ab334fd3c36069865c3b115a508f972f452e3c4
Closes-Bug:#1627203
  • Loading branch information
krharsh committed Mar 31, 2017
1 parent 5ed6732 commit e5d7cc4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions contrail_provisioning/openstack/upgrade.py
Expand Up @@ -83,6 +83,15 @@ def fix_haproxy_config(self):
local("sed -i -e 's/timeout client 24h/timeout client 0/g' %s" % hap_cfg)
local("sed -i -e 's/timeout server 24h/timeout server 0/g' %s" % hap_cfg)

def fix_sriov_nova_config(self):
with settings(warn_only=True):
nova_conf_file = '/etc/nova/nova.conf'
if (self._args.from_rel >= LooseVersion('3.00')):
default_filter= ('RetryFilter, AvailabilityZoneFilter, RamFilter, DiskFilter, '
'ComputeFilter, ComputeCapabilitiesFilter, ImagePropertiesFilter, '
'ServerGroupAntiAffinityFilter, ServerGroupAffinityFilter, PciPassthroughFilter')
local("openstack-config --set %s DEFAULT scheduler_default_filters '%s'" % (nova_conf_file, default_filter))

def upgrade(self):
self.stop()
self._upgrade()
Expand All @@ -99,6 +108,8 @@ def upgrade(self):
self.fix_cmon_config()
self.fix_cmon_param_file()
self.fix_haproxy_config()
if (self._args.sriov):
self.fix_sriov_nova_config()
self.restart()


Expand Down

0 comments on commit e5d7cc4

Please sign in to comment.