Earlier  
Posted Nick Remark
#openstack-nova - 2017-02-09
21:08:49 cfriesen okay, I kind of like the idea of a single "flavor" property with a single dict including a nested dict for extra_specs.
21:09:24 sdague I'm more inclined to instead enhance the flavor filters so you could filter by more things
21:09:31 sdague so you could find a compatible flavor in the cloud
21:09:50 sdague because part of the issue is that people are changing or deleting flavors
21:10:17 mordred s/suggest/request/
21:10:20 sdague mordred: sure
21:10:28 cfriesen I think we could keep the id as a historical data point
21:10:31 sdague but, you do realize it becomes kind of fiction
21:10:52 mriedem i thought we exposed the flavor.id primary key out of the api
21:10:53 mordred I'd be fine with it being None if it's fiction
21:10:54 sdague I'm fine if we document "here was the orginal id, it might be fiction, don't use it"
21:10:59 mriedem but i'm only seeing flavor.flavorid exposed which is the uuid
21:11:24 mordred yah. you expose the flavor id which is the uuid - but it's exposed in server.flavor.id
21:11:27 sdague mordred: well, the issue is, we don't always know it's fiction
21:11:32 mordred sdague: fair
21:11:46 cfriesen mordred: as soon as you boot it could be changed by an admin
21:12:01 mordred sdague: I'll ultimately be fine with any of the things being discussed here - adding flavor details to that dict would be _amaze_
21:12:11 sdague mordred: the big issue is the uuid kind of never goes on the wire today
21:12:25 sdague so all the identifiers could be recycled
21:12:43 sdague but, we can just doc it as "could be historical fiction, don't trust this field too much"
21:12:44 mordred aroo? I get a uuid?
21:12:47 mriedem i think the flavor_id here is the uuid https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/views/servers.py#L259
21:12:49 cfriesen sdague: isnt' that the "id" value returned in the current "flavor"?
21:12:50 mriedem not the primary key
21:12:58 sdague mordred: where?
21:12:58 mordred 'flavor': {u'id': u'bbcb7eb5-5c8d-498f-9d7e-307c575d3566'},
21:13:03 sdague mordred: what cloud
21:13:06 mordred vexxhost
21:13:16 mriedem dansmith: do you remember where the flavor.id primary key is leaked out of the rest api?
21:13:47 sdague mordred: ok, so they chose to make that a uuid
21:13:57 sdague mordred: it's a user settable string
21:14:03 mriedem by default it's a uuid
21:14:18 mriedem https://github.com/openstack/nova/blob/master/nova/compute/flavors.py#L74
21:14:19 mordred gotcha
21:14:21 sdague http://developer.openstack.org/api-ref/compute/?expanded=list-flavor-access-information-for-given-flavor-detail,list-flavors-detail,create-flavor-detail#create-flavor
21:14:30 sdague mriedem: oh, if they don't pass a thing?
21:14:33 cfriesen I get the same thing in ours (mitaka though)
21:14:35 mriedem sdague: correct
21:14:39 sdague right, but it's not *actually* a uuid
21:14:45 mriedem sure
21:14:52 mriedem it could be "squishy-squat"
21:14:56 sdague like you could delete it and rebuild a new one completely different, same id
21:15:15 sdague because the actual internal id is something else
21:15:16 cfriesen sdague: actually I think you can make a new one with the same id without deleting the old one
21:15:30 mriedem true, the unique constraint is on the flavorid https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api_models.py#L178
21:15:35 mriedem so if you delete it and recreate, you're golden
21:15:51 mriedem cfriesen: i don't think so, because of the unique constraint
21:15:52 sdague which is why we have
21:15:55 sdague "The ID of the flavor. While people often make this look like an int, this is really a string.
21:15:55 sdague "
21:16:28 sdague this is definitely one of the grosser hold over points of the original nova code
21:16:39 mriedem sdague: now come on,
21:16:43 mriedem yesterday it was bfv,
21:16:44 mriedem and quotas
21:16:56 sdague heh
21:17:03 sdague well, we all have our own battles
21:17:10 cfriesen mriedem: yes, just checked and the scenario I was looking at was delete-then-create
21:17:13 mriedem let's not forget that the live migration code is terrible
21:17:31 sdague anyway, mordred is ++ on in server, and dedicated dict
21:17:49 mriedem confirmed that you don't have to provide an id on flavor create https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/schemas/flavor_manage.py#L30
21:17:56 sdague so that should be recorded somewhere, as it's a preference from an actual consumer that would make their life better
21:18:07 sdague mriedem: ok, then you need to fix the docs
21:18:11 sdague the docs say it's required
21:18:16 mordred \o/
21:18:16 mriedem i can do that
21:18:30 mriedem mordred: can state his preference in the spec
21:18:32 mordred sdague: not only that - it would save a TON of api calls for clouds that have people using shade to talk to them
21:18:35 mriedem on the representation
21:19:18 mordred mriedem: happy to - have a review link handy? (I can find it otherwise)
21:19:41 cfriesen mordred: I have to propose a spec first. :)
21:19:46 mriedem cfriesen: we have a spec
21:20:06 cfriesen mriedem: isnt' that for the link representation though? or are you talking about rewriting it
21:20:14 sdague mriedem: yeh, but cfriesen going to revive and run with it
21:20:15 mriedem https://review.openstack.org/#/c/265282/
21:20:24 mriedem mordred: ^
21:20:27 mriedem cfriesen: i've restored that
21:20:31 sdague cfriesen: it was for the idea, that was one implementation approach
21:20:32 mriedem move it to pike and clean it up
21:21:15 cfriesen sdague: yeah, I see it in the alternatives. Okay, I can take it and rework it assuming we put it inline in the server representation.
21:22:31 cfriesen sdague: the help text for "nova flavor-create" says that <id> can be a "unique ID" or "auto" to have a UUID get generated
21:22:45 mordred neat. I have that open and starred now
21:23:29 openstackgerrit Matt Riedemann proposed openstack/nova master: libvirt: wait for interface detach from the guest https://review.openstack.org/349014
21:30:35 openstackgerrit Dan Smith proposed openstack/nova master: Remove main_db flavor compatibility https://review.openstack.org/431722
21:33:43 openstackgerrit Matt Riedemann proposed openstack/nova master: api-ref: mark id as optional in POST /flavors https://review.openstack.org/431747
21:36:27 openstackgerrit melanie witt proposed openstack/nova-specs master: CellsV2 - Move quota tables to the API db https://review.openstack.org/431748
21:41:56 openstackgerrit melanie witt proposed openstack/nova-specs master: Proposal to count resources to check quota in API for cells https://review.openstack.org/431749
21:44:43 melwitt mriedem: lol @ your irc mishap post
21:45:11 mriedem true story
21:45:32 dansmith hah
21:46:00 mriedem lovability?
21:46:09 mriedem boyish good looks?!
21:46:28 melwitt both, obviously!
21:46:33 mriedem just ask my wife
21:46:59 dansmith I realized something the other day
21:47:04 dansmith which I had never thought of
21:47:10 dansmith but mriedem actually _is_ Eric Foreman
21:47:49 melwitt hahaha
21:47:50 mriedem my hair gets that big sometimes
21:59:18 mriedem god it's been so long, i don't remember how to tell mox to do multiple returns
21:59:26 openstackgerrit Dan Smith proposed openstack/nova master: Remove main_db flavor compatibility https://review.openstack.org/431722

Earlier   Later