Earlier  
Posted Nick Remark
#openstack-nova - 2017-02-09
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
21:59:27 openstackgerrit Dan Smith proposed openstack/nova master: Remove flavor_* functions from db/api https://review.openstack.org/431752
21:59:27 mriedem maybe i need to rewrite this turd of a test in mock first...
21:59:34 dansmith have I mentioned how much I hate flavors?
22:03:53 melwitt has anyone else noticed gorpy printings of the "Skipping periodic task _discover_hosts_in_cells ..." when running unit tests? last time this happened it was because of a KeyError in an exception somewhere, I think
22:04:01 mriedem i've noticed it
22:04:54 dansmith would that be in a unit test that starts n-sch? I haven't seen it
22:06:56 melwitt I dunno. I miss that dumb config option that treated the key errors as exceptions
22:07:31 melwitt I tried to do some hacky thing with monkey patching to get the same thing awhile back but it was crap
22:08:14 dansmith well, the discover_hosts_in_cells periodic is in n-sch and disabled by default,
22:08:20 dansmith so I think that message just means we're running through there
22:09:11 cfriesen dansmith: you and jaypipes
22:09:19 cfriesen both hating flavors
22:10:15 dansmith cfriesen: I hate our flavor implementation, I think he hates the concept
22:16:29 dansmith melwitt: check this out: https://github.com/openstack/nova/blob/master/nova/cells/state.py#L301-L301
22:16:39 dansmith melwitt: pretty sure that breaks cellsv1 in newton once you're migrated
22:17:11 melwitt ouch
22:18:46 openstackgerrit Dan Smith proposed openstack/nova master: Remove flavor_* functions from db/api https://review.openstack.org/431752
22:18:47 openstackgerrit Dan Smith proposed openstack/nova master: Remove main_db flavor compatibility https://review.openstack.org/431722
22:21:05 openstackgerrit Ed Leafe proposed openstack/nova master: placement: adds REST API for nested providers https://review.openstack.org/384807

Earlier   Later