[rdo-users] Define CPU and RAM allocation ratios

Steven Hardy shardy at redhat.com
Thu Oct 11 10:27:23 UTC 2018


On Thu, Oct 11, 2018 at 4:26 AM Cody <codeology.lab at gmail.com> wrote:
>
> Hi everyone,
>
> If I wish to define CPU and RAM allocation ratios at the time of deployment for the Queens release, which one of the following methods is correct?
>
> # Method 1
> parameter_defaults:
>     ComputeExtraConfig:
>         nova::compute::cpu_allocation_ratio: 10.0
>         nova::compute::ram_allocation_ratio: 1.0

This is the right approach but the hiera keys you're using are wrong I
think - check:

https://github.com/openstack/tripleo-heat-templates/blob/stable/queens/puppet/services/nova-scheduler.yaml
https://github.com/openstack/puppet-nova/blob/master/manifests/init.pp#L385

So something like:

  parameter_defaults:
     ComputeExtraConfig:
         nova::cpu_allocation_ratio: 10.0
         nova::ram_allocation_ratio: 1.0

is probably neeeded - for *ExtraConfig overrides the hiera keys must
always align with the interfaces exposed by the underlying puppet
modules.

>
> # Method 2
> parameter_defaults:
>     NovaCpuAllocationRatio: 10.0
>     NovaRamAllocationRatio: 1.0

I don't think this will work because no parameters with these names
are exposed via tripleo-heat templates (see the link to
nova-scheduler.yaml above for example).

Such an interface could be added though, but we don't expose every
puppet/hiera option as heat parameters (a case can probably be made
for these being common enough to add though).

Hope that helps,

Steve Hardy


More information about the users mailing list