On 08/01/2018 02:22 PM, Matt Riedemann wrote:
On 8/1/2018 12:06 PM, Ben Nemec wrote:
To close the loop on the problem I was having, it looks like the
allocation_ratio config opts are now just defaults, and if you want to
change ratios after the initial deployment you need to do so with the
client.
You mean how
https://docs.openstack.org/nova/latest/configuration/config.html#DEFAULT.disk_allocation_ratio
defaults to 0.0 and that's used in the ResourceTracker to set the
inventory?
https://github.com/openstack/nova/blob/31e6e715e00571925b1163950ea028bdade60d76/nova/compute/resource_tracker.py#L120
That should get defaulted to 1.0 if you didn't change the config option:
https://github.com/openstack/nova/blob/31e6e715e00571925b1163950ea028bdade60d76/nova/objects/compute_node.py#L207
If you wanted 2.0, then you should set the disk_allocation_ratio config
option to 2.0 on that host - I don't think that is a behavior change is it?
I changed disk_allocation_ratio to 2.0 in the config file and it had no
effect on the existing resource provider. I assume that is because I
had initially deployed with it unset, so I got 1.0, and when I later
wanted to change it the provider already existed with the default value.
So in the past I could do the following:
1) Change disk_allocation_ratio in nova.conf
2) Restart nova-scheduler and/or nova-compute
Now it seems like I need to do:
1) Change disk_allocation_ratio in nova.conf
2) Restart nova-scheduler, nova-compute, and nova-placement (or some
subset of those?)
3) Use osc-placement to fix up the ratios on any existing resource providers
I will note that it's a little annoying that you have to specify all
of the fields on this call.
I agree with you. The "openstack resource provider inventory set"
command is similar in that it is a total overwrite of all inventory for
the provider:
https://docs.openstack.org/osc-placement/latest/cli/index.html#resource-provider-inventory-set
So if you want to add just one inventory class (or change one) then you
have to repeat all of the existing inventory if you don't want to lose
that. And I don't think "openstack resource provider inventory class
set" lets you add new inventory classes, it only lets you update
existing ones.
So we probably need something like an --amend option on both commands
which are sort of meta commands to retain everything else about the
inventory for the provider but only changes the fields that the user
specifies.
We've mostly just been trying to get out *any* CLI support at all, so
what is there now is basic functionality, warts and all, and we can
iterate over time to make the tools more usable.
To track this, I've created an RFE bug in launchpad:
https://bugs.launchpad.net/placement-osc-plugin/+bug/1784932
Cool, thanks.
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev