Merge "Add pci-alias option"
This commit is contained in:
commit
10936d59c5
17
config.yaml
17
config.yaml
@ -416,6 +416,23 @@ options:
|
||||
description: |
|
||||
List of filter class names to use for filtering hosts when not specified in
|
||||
the request.
|
||||
pci-alias:
|
||||
type: string
|
||||
default:
|
||||
description: |
|
||||
The pci-passthrough-whitelist option of nova-compute charm is used for
|
||||
specifying which PCI devices are allowed passthrough. pci-alias is more
|
||||
a convenience that can be used in conjunction with Nova flavor properties
|
||||
to automatically assign required PCI devices to new instances. You could,
|
||||
for example, have a GPU flavor or a SR-IOV flavor:
|
||||
|
||||
pci-alias='{"vendor_id":"8086","product_id":"10ca","name":"a1"}'
|
||||
|
||||
This configures a new PCI alias 'a1' which will request a PCI device with
|
||||
a vendor id of 0x8086 and a product id of 10ca.
|
||||
|
||||
For more information about the syntax of pci_alias, refer to
|
||||
https://docs.openstack.org/ocata/config-reference/compute/config-options.html
|
||||
api-rate-limit-rules:
|
||||
type: string
|
||||
default:
|
||||
|
@ -261,6 +261,8 @@ class NovaConfigContext(context.WorkerConfigContext):
|
||||
def __call__(self):
|
||||
ctxt = super(NovaConfigContext, self).__call__()
|
||||
ctxt['scheduler_default_filters'] = config('scheduler-default-filters')
|
||||
if config('pci-alias'):
|
||||
ctxt['pci_alias'] = config('pci-alias')
|
||||
ctxt['cpu_allocation_ratio'] = config('cpu-allocation-ratio')
|
||||
ctxt['ram_allocation_ratio'] = config('ram-allocation-ratio')
|
||||
addr = resolve_address(INTERNAL)
|
||||
|
@ -35,6 +35,9 @@ scheduler_default_filters = {{ scheduler_default_filters }},{{ additional_neutro
|
||||
{% else %}
|
||||
scheduler_default_filters = {{ scheduler_default_filters }}
|
||||
{% endif %}
|
||||
{% if pci_alias %}
|
||||
pci_alias = {{ pci_alias }}
|
||||
{% endif %}
|
||||
cpu_allocation_ratio = {{ cpu_allocation_ratio }}
|
||||
ram_allocation_ratio = {{ ram_allocation_ratio }}
|
||||
|
||||
|
@ -35,6 +35,9 @@ scheduler_default_filters = {{ scheduler_default_filters }},{{ additional_neutro
|
||||
{% else %}
|
||||
scheduler_default_filters = {{ scheduler_default_filters }}
|
||||
{% endif %}
|
||||
{% if pci_alias %}
|
||||
pci_alias = {{ pci_alias }}
|
||||
{% endif %}
|
||||
cpu_allocation_ratio = {{ cpu_allocation_ratio }}
|
||||
ram_allocation_ratio = {{ ram_allocation_ratio }}
|
||||
|
||||
|
@ -32,6 +32,9 @@ scheduler_default_filters = {{ scheduler_default_filters }},{{ additional_neutro
|
||||
{% else %}
|
||||
scheduler_default_filters = {{ scheduler_default_filters }}
|
||||
{% endif %}
|
||||
{% if pci_alias %}
|
||||
pci_alias = {{ pci_alias }}
|
||||
{% endif %}
|
||||
cpu_allocation_ratio = {{ cpu_allocation_ratio }}
|
||||
ram_allocation_ratio = {{ ram_allocation_ratio }}
|
||||
|
||||
|
@ -183,3 +183,8 @@ auth_strategy=keystone
|
||||
|
||||
[wsgi]
|
||||
api_paste_config=/etc/nova/api-paste.ini
|
||||
|
||||
[pci]
|
||||
{% if pci_alias %}
|
||||
alias = {{ pci_alias }}
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user