| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2018-08-29 | |||
| 13:18:14 | zigo | discover_host was ran, so that's not the issue. | |
| 13:18:37 | zigo | I'm doing the packaging right away for placement client. | |
| 13:19:20 | zigo | Why was it called osc-placement, rather than python-placementclient btw? | |
| 13:19:40 | mriedem | b/c it's an openstack client plugin | |
| 13:19:43 | mriedem | and that's the naming convention | |
| 13:19:50 | mriedem | it's not a python API binding / sdk type thing like novaclient | |
| 13:20:11 | zigo | mriedem: So it will be renamed once placement is extracted from Nova? | |
| 13:20:15 | mriedem | no | |
| 13:20:22 | mriedem | it's only cli, not any python bindings | |
| 13:20:48 | zigo | ok | |
| 13:20:50 | mriedem | there is no python binding client for placement, maybe openstacksdk is working on one, would have to ask mordred or edleafe | |
| 13:24:11 | mriedem | i don't see a placement dir in the sdk yet https://github.com/openstack/openstacksdk/tree/master/openstack | |
| 13:24:15 | mriedem | not sure about plans for one though | |
| 13:26:02 | zigo | FYI, I don't bother doing py2 clients anymore. :) | |
| 13:27:46 | zigo | sphinx>=1.2.1,!=1.3b1,<1.4 # BSD <--- test-requirements.txt needs upgrade ... | |
| 13:27:47 | zigo | :P | |
| 13:36:20 | mriedem | test-reqs in osc-placement? | |
| 13:36:52 | zigo | yep | |
| 13:37:18 | mriedem | please report a bug https://bugs.launchpad.net/placement-osc-plugin | |
| 13:38:02 | edleafe | mriedem: AFAIK that is not being worked on | |
| 13:38:27 | mriedem | edleafe: yeah i didn't see any open reviews | |
| 13:43:20 | openstackgerrit | Matt Riedemann proposed openstack/osc-placement master: Random names for functional tests https://review.openstack.org/542745 | |
| 13:45:48 | zigo | https://bugs.launchpad.net/placement-osc-plugin/+bug/1789649 | |
| 13:45:48 | openstack | Launchpad bug 1789649 in placement-osc-plugin "test-requirements out of date" [Undecided,New] | |
| 13:45:56 | mriedem | zigo: thanks | |
| 13:46:59 | zigo | mriedem: Now that I have the package built and installed, how do I test if placement has resources ? | |
| 13:47:14 | mriedem | as an admin, | |
| 13:47:17 | mriedem | openstack resource provider lst | |
| 13:47:18 | mriedem | *list | |
| 13:47:56 | zigo | Ok, found my host, then? | |
| 13:48:00 | zigo | Show it? | |
| 13:48:24 | mriedem | inventory is more useful | |
| 13:48:25 | zigo | Hum... not much thing shows up then... | |
| 13:48:36 | mriedem | openstack resource provider inventory show <rp_uuid> | |
| 13:48:40 | mriedem | oh wait | |
| 13:48:46 | mriedem | openstack resource provider inventory list <rp_uuid> | |
| 13:48:52 | mriedem | https://docs.openstack.org/osc-placement/latest/cli/index.html#resource-provider-inventory-list | |
| 13:49:06 | mriedem | you should see VCPU, MEMORY_MB and DISK_GB | |
| 13:49:40 | zigo | It works... | |
| 13:49:40 | zigo | http://paste.openstack.org/show/729051/ | |
| 13:49:52 | zigo | But then? How come placement didn't find resources? | |
| 13:50:08 | mriedem | let's make sure the compute node in nova is matching that same uuid | |
| 13:50:13 | mriedem | from nova cli, | |
| 13:50:15 | mriedem | as admin, | |
| 13:50:20 | mriedem | nova hypervisor-list | |
| 13:50:51 | zigo | I see my host, and it's up and enabled. | |
| 13:50:59 | zigo | I did all this before asking! :P | |
| 13:51:03 | mriedem | does it's id equal f9716941-356f-4a2e-b5ea-31c3c1630892 ? | |
| 13:51:10 | zigo | Yup. | |
| 13:51:29 | mriedem | ok what type of flavor did you use when you tried creating the server? | |
| 13:51:32 | zigo | Is it normal that I get allocation_ratio 0.0 for all resources? | |
| 13:51:41 | mriedem | so, | |
| 13:51:54 | mriedem | that sounds exactly like the same problem the xenserver CI guys are having in the ML right now | |
| 13:51:57 | mriedem | and no, | |
| 13:52:01 | mriedem | cpu should be 16.0, | |
| 13:52:02 | zigo | 256 RAM, 5 GB HDD, 1 VCPU | |
| 13:52:05 | mriedem | ram and disk should also be > 0 | |
| 13:52:14 | mriedem | jaypipes: efried: naichuans: ^ | |
| 13:53:49 | mriedem | zigo: using libvirt right? | |
| 13:54:24 | zigo | mriedem: Yeah, normal qemu in a virtualbox right now. | |
| 13:54:38 | zigo | mriedem: Also using it in the OpenStack CI with puppet-openstack stuff ... | |
| 13:55:15 | zigo | mriedem: Is there a way to force something in the allocation_ratio to fix things? | |
| 13:55:36 | mriedem | yes via osc-placement, but i'd have to look it up quick | |
| 13:56:10 | mriedem | https://docs.openstack.org/osc-placement/latest/cli/index.html#resource-provider-inventory-class-set | |
| 13:56:57 | mriedem | so: openstack resource provider inventory class set --allocation_ratio 16.0 --total 4 f9716941-356f-4a2e-b5ea-31c3c1630892 VCPU | |
| 13:57:45 | mriedem | cdent: ever remember talking about making allocation_ratio a minimum of 1.0 in placement? | |
| 13:57:52 | mriedem | allowing anything to set that to 0.0 seems like a bad idea | |
| 13:59:00 | gibi | mriedem: having < 1.0 could make sense for handling overhead, but I agree that 0.0 doesn't make sense | |
| 13:59:18 | zigo | mriedem: The max_unit for VCPUs looks funny now: http://paste.openstack.org/show/729052/ | |
| 13:59:21 | cdent | mriedem: the only vague tickle I have in my mind was "if you have a float, how do you set a min_unit that is the min-est" | |
| 13:59:35 | zigo | Shouldn't it be num-of-vcpu * allocation_ratio ? | |
| 13:59:45 | cdent | What i'm not clear on is how/what is coming along with these 0s | |
| 14:00:09 | mriedem | cdent: i guess it couldn't be done with jsonschema and would have to be in python | |
| 14:00:19 | mriedem | if allocation_ratio <= 0.0: 400 | |
| 14:00:30 | mriedem | or use a custom jsonschema validator | |
| 14:00:42 | zigo | Can I consider there's a bug somewhere, and wait for the fix? :) | |
| 14:00:55 | mriedem | so clearly something in nova is creating resource providers with 0.0 allocation ratios from nova.conf, which is the default, but it should be getting the values from the ComputeNode object | |
| 14:01:00 | cdent | I can't remember any specific conversation about this, but I wonder if 0 was allowed as a way to disable inventory? | |
| 14:01:03 | mriedem | zigo: yes | |
| 14:01:17 | mriedem | zigo: naichuans: if you haven't already, it would be great to have a nova bug for tracking this | |
| 14:01:30 | cdent | (while still keeping a record of the "actual" inventory) | |
| 14:01:32 | mriedem | yeah idk, maybe jaypipes remmebers | |
| 14:02:09 | mriedem | so https://github.com/openstack/nova/blob/6522ea3ecfe99cca3fb33258b11e5a1f34e6e8f0/nova/compute/resource_tracker.py#L84 in the RT is what is supposed to set the default allocation ratio for each inventory on the compute node provider | |
| 14:02:24 | mriedem | assuming the virt driver doesn't provide an allocation ratio override, which neither libvirt nor xenapi do | |
| 14:02:24 | zigo | mriedem: cdent: What is max_unit supposed to represent? Isn't it total * allocation_ratio? | |
| 14:02:43 | jaypipes | mriedem: sorry, reading back was on a call | |
| 14:02:55 | cdent | zigo: no, it is an expression of the largest amount any individual resource allocation can allocate | |
| 14:02:57 | jaypipes | zigo: max_unit is not total * allocation_ratio, no | |
| 14:03:07 | cdent | so in the case of something like disk or vcpu it is generally the max physical amount | |
| 14:03:24 | cdent | as you don't want a single instance to have more than is physically available, regardless of allocation ratio | |
| 14:03:37 | zigo | Ah, great, meaning I can have hosts with up to 2 billion VCUPs ! :) | |
| 14:04:13 | zigo | I can start writing another bug, ok. | |
| 14:04:44 | cdent | total: the real physical amount, allocation ratio: multiplier for over or under commit, min_unit: smallest individual request, max_unit: largest individual request, reserved: what the system is using for itself | |
| 14:06:24 | mriedem | i wonder if there is a bug in ProviderTree.update_inventory where it's not updating the allocation_ratio when we create/update the provider in placement | |
| 14:07:23 | mriedem | zigo: you're testing with rocky right? | |
| 14:10:55 | zigo | https://bugs.launchpad.net/nova/+bug/1789654 | |
| 14:10:55 | openstack | Launchpad bug 1789654 in OpenStack Compute (nova) "placement allocation_ratio initialized with 0.0" [Undecided,New] | |
| 14:10:59 | zigo | mriedem: Correct ! | |
| 14:11:15 | zigo | mriedem: Fresh packages just built this and last week in a record time. | |
| 14:11:24 | zigo | It took me less than 2 weeks, this time ... :P | |