Tuesday, 2016-12-13

*** rcarrillocruz has joined #openstack-shade00:05
*** jamielennox has joined #openstack-shade00:33
jamielennoxmordred: here's my associate task: https://etherpad.openstack.org/p/CkDOrWTIUr00:34
jamielennoxwhich is a little abstracted i guess00:35
jamielennoxmordred: but you can see invocation that i asked for device /dev/xdva (which was supposed to be xvda - but whatever, didn't work that way either)00:39
jamielennoxand it returned attachments.0.device == /dev/vdb00:39
jamielennoxi don't have access to the logs of that OS deployment, can i make shade/ansible give me logs?00:40
mordredjamielennox: no - sadly the openstack apis do not provide any mechanism to get logs00:41
mordredjamielennox: also - sadly enough - specifying a device name also does not always work AIUI and is somewhat driver specific00:42
jamielennoxmordred: i didn't expect server side logs, i just thought maybe i could see the shade debug output or something00:42
mordredoh! shade debug output :)00:42
mordredno - but it's a thing I was just running up against a couple of days ago and think we should ad00:42
mordredadd00:42
jamielennoxbut ugh, specifying device name not being respected is terrible00:42
mordred(basically, something that would collect logger info and return it in a variable or something)00:43
mordredjamielennox: I'm about to EOD/AFK - but can take a first stab at getting shade debug logs returned in os_ modules when I wake up00:43
jamielennoxmordred: it'd be interesting to have - thanks, it sounds like either way i'm going to have to work around it00:44
mordredyah. sorry I can't be more immediate help00:46
mordredclarkb: ^^ do you remember any specific pain about cinder volume device name stuff ?00:46
mordredclarkb: (other than "it makes us want to stab our eyes out" ?)00:46
jamielennoxmordred: the same things seems to be happening with OSC so i'm guessing it's not shade's fault after all00:47
mordredjamielennox: \o/00:47
clarkbmordred: yes xen is different than kvm00:47
mordredjamielennox: completely unrelated - but I _LOVE_ requests_mock .. thank you00:47
clarkbyou haveyo use api for xenhave to use dev name stuff for kvm00:47
clarkbif you dont the info for the other may be wrong00:48
jamielennoxmordred: :) i'm actually really happy with how that's turned out00:48
jamielennoxi do need to doc it better, there were some definite improvements to the API that are mentioned in the docs but not the main way operations are shown00:48
jamielennoxclarkb: i didn't follow that00:49
jamielennoxi'm getting it's out of my control, but the xen/kvm api stuff00:49
clarkbjamielennox: with xen the only way to find out what deviceyou atta hed to is via nova/cinder apu00:49
clarkbwith kvm that api is often wrong00:50
jamielennox:(00:50
jamielennoxthe mind boggles that any of this actually works00:50
clarkbyou have to use /dev/disk/by-name orsomething instead with kvm00:50
clarkbwhere you get a name that is the prefix of the cinder uuid00:51
clarkbbut its not q full uuid bcause /dev entries cant be that long00:51
jamielennoxyea, that comes up, but i'm creating some servers via ansible so i'm not sure how i can mount/format that reliably by id00:51
mordredjamielennox: I _think_ under kvm it shows up as /dev/disk/by-name/{name-of-device-in-cinder} or something00:51
mordredjamielennox: like, on review.openstack.org, our volume for gerrit is at /dev/disk/by-label/gerrit00:52
mordredthis only works for kvm - but I'm guessing yo udon't have any xen clouds laying around00:52
clarkboh it might be by-label not by name00:52
jamielennoxgah, ok so00:53
jamielennoxubuntu@logs:/dev/disk/by-id$ ls00:53
jamielennoxvirtio-8626f2fb-3c7a-4218-800:53
mordredjamielennox: try ls in /dev/disk/by-label00:53
jamielennoxand volume list is 8626f2fb-3c7a-4218-8c0c-c553d9269655 | bonnyci-logs00:53
mordredhahahahaha00:53
mordredyay! let's just truncate00:53
jlkoof00:53
jlkhow does AWS do this?  /me ducks00:53
jamielennoxactually by-label just has cloudimg-rootfs00:53
mordredlovely00:54
mordredjlk: don't even get me started :)00:54
jamielennoxpaste00:54
jamielennoxubuntu@logs:/dev/disk$ tree00:54
jamielennox.00:54
jamielennox├── by-id00:54
jamielennox│   └── virtio-8626f2fb-3c7a-4218-8 -> ../../vdb00:54
jamielennox├── by-label00:54
jamielennox│   └── cloudimg-rootfs -> ../../vda100:54
jamielennox├── by-path00:54
jamielennox│   ├── virtio-pci-0000:00:04.0 -> ../../vda00:54
jamielennox│   ├── virtio-pci-0000:00:04.0-part1 -> ../../vda100:54
mordredjlk: you know how AWS solves our hard problem of figuring out what IP to use right? ... they use ... DNS00:54
jamielennox│   └── virtio-pci-0000:00:06.0 -> ../../vdb00:54
jamielennox└── by-uuid00:54
jamielennox    └── a891cf8e-833a-4851-ad1e-39cf54e4b8b0 -> ../../vda100:54
jamielennoxwhich is just inconsistent afaict00:55
mordredjamielennox: it seems like _maybe_ /dev/disk/by-id/virtio-{id}.format(id=id[:20])00:55
jamielennoxthe volume is only in by-id and by-path00:55
mordredmight work and be consistentish at least on jvm00:55
mordredkvm00:55
jamielennoxif i needed to know this much about kvm i might have just used it directly...00:56
mordredjamielennox: if it makes you feel any better, I got involved with ansible modules and started writing shade because booting a vm and attaching a volume was too hard :)00:56
jamielennoxmordred: not that much better really00:56
mordredyah. me either00:57
jamielennoxalright - so it's not shade's fault, but i need to figure out a different way to do this00:57
jamielennoxthanks guys00:57
mordredI wonder if we could write a shade function that would return you what the device name of your device is most likely to actually be00:57
mordredthat could have some different logic for different clouds00:57
jamielennoxmordred: it does seem to be in the cinder response00:58
mordredI mean - we exist to paper over this crap - even if our code is terrible00:58
mordredjamielennox: oh good100:58
mordred!00:58
jamielennoxand the os_server_volume response00:58
mordredso it's just that the tell it what device to use bit is bong00:58
jamielennoxit's just that i now have to save that somehow between two fairly distinct parts of ansible00:58
jamielennoxrather than put a device name in a var somewhere00:59
mordredyah00:59
jlkoh eww00:59
clarkbjamielennox: hat is cinder uuid?00:59
clarkboh further sb shows it00:59
clarkbso ya thats how you do it00:59
clarkbits a prefix because you cant do the full name there for some reason00:59
clarkbdevfs related iirc00:59
jamielennoxyea, it just makes my 2 minute fix not so 2 minute01:00
clarkband I have argued with nova that they should fix the api and been told they cant so the api is going away insteaf01:01
jamielennoxclarkb: the attach volume api?01:02
clarkbthe where is my volume attached api01:03
clarkbwhich is a cinder api but data comes from nova iirc01:03
clarkb(also I submitted the bug to cinder first and they passed it off to nova)01:06
*** jeblair has joined #openstack-shade01:32
jamielennoxfeature request: security groups on a server aren't changed when a server is updated, just when the server is created02:31
*** abregman has joined #openstack-shade06:52
*** yfried has joined #openstack-shade06:55
*** gouthamr has joined #openstack-shade09:06
*** gouthamr has quit IRC09:33
*** cdent has joined #openstack-shade11:00
openstackgerritMonty Taylor proposed openstack-infra/shade: Add new attributes to floating ips  https://review.openstack.org/41022914:10
*** cdent has quit IRC14:46
*** cdent has joined #openstack-shade15:31
*** abregman has quit IRC16:04
-openstackstatus- NOTICE: Launchpad SSO is not currently working, so logins to our services like review.openstack.org and wiki.openstack.org are failing; the admins at Canonical are looking into the issue but there is no estimated time for a fix yet.16:26
-openstackstatus- NOTICE: Canonical admins have resolved the issue with login.launchpad.net, so authentication should be restored now.17:02
*** yfried has quit IRC17:07
morganmordred: ftr, if there is a bug in requests mock, I can help fix it too (not that there is)18:17
morganmordred: also, coffee and code today! woot18:17
mordredmorgan: \o/18:20
morganmordred: i hope i can get that fixture change we talked about done today18:20
morgan*hope*18:21
clarkbmorgan: forecast is looking a lot less apocalyptic now18:21
clarkbtypical portland weather18:21
morganclarkb: yeah 1-3"18:21
clarkb"DOOM! just kidding"18:21
morganwhich is still "omg damn snow" for PDX18:21
clarkbyes18:21
clarkbbut way better than 8"18:21
morganbut not "shut the city down for a week or so"18:21
morgan:)18:21
openstackgerritMonty Taylor proposed openstack-infra/shade: Add new attributes to floating ips  https://review.openstack.org/41022918:24
openstackgerritMonty Taylor proposed openstack-infra/shade: Skip volume backup tests on clouds without swift  https://review.openstack.org/41035118:25
jlkisn't every day "coffee and code" day?18:26
mordredjlk: something something portland something something18:30
jlkoh, a meetup kind of thing18:31
Shrewsis coding WITHOUT coffee an option?18:32
mordredShrews: nope18:32
Shrewsthought so18:32
mordredjlk: I was (unsuccessfully) making a dig at portland people not being as coffee obsessed as they should be18:32
jlkI'm coding, in a coffee shop right now!18:33
morganno18:44
morganjlk: i'm just mostly done packing for my move18:44
morganmeaning i can camp at a coffee shop for a chunk of the day :)18:45
jlkOIC18:45
morganalso i don't have much space to sit :P18:45
*** cdent has quit IRC19:04
*** yfried has joined #openstack-shade19:07
*** cdent has joined #openstack-shade20:04
*** yfried has quit IRC20:32
*** cdent has quit IRC21:02
* morgan grumps about ffi.h21:04
openstackgerritMerged openstack-infra/shade: Skip volume backup tests on clouds without swift  https://review.openstack.org/41035121:06
openstackgerritMerged openstack-infra/shade: Change image update to REST  https://review.openstack.org/38519321:28
openstackgerritMerged openstack-infra/shade: Remove a few glance client mocks we missed  https://review.openstack.org/38519121:44
openstackgerritMerged openstack-infra/shade: Remove glanceclient and warlock from shade  https://review.openstack.org/38519421:44
openstackgerritMerged openstack-infra/shade: Move image tests from caching to image test file  https://review.openstack.org/40766821:45
openstackgerritMonty Taylor proposed openstack-infra/shade: Collapse base classes in test_image  https://review.openstack.org/41042422:08
openstackgerritMonty Taylor proposed openstack-infra/shade: Convert glance parts of task test to requests_mock  https://review.openstack.org/41042522:08
mordredShrews: ^^ there is the test you asked for22:08
mordredjamielennox: when you have a free moment, is there a better way to make sure that requests were called correctly than what I'm doing there?22:09
jamielennoxmordred: so i find you end up with a function that you assert the calls in order like22:14
jamielennoxfor mine, made in zip(calls, self.adapter.request_history):22:14
jamielennox    for k, v in mine.items():22:14
jamielennox        self.assertEqual(v, getattr(made, k))22:15
jamielennoxbut you have to do it after the calls have been made22:15
mordredyah22:15
mordredcool - I'll play with that22:15
mordred        self.assertEqual(22:16
mordred            self.adapter.request_history[10].headers['Content-Type'],22:16
mordred            'application/openstack-images-v2.1-json-patch')22:16
mordredthe request_history[10] in there didn't feel good :)22:16
jamielennoxyea, there's things you can do, but there's lots of places in clients etc where you set up a whole bunch of mocks that might not be called22:17
jamielennoxso you're kind of stuck checking what happened after the fact22:17
jamielennoxi would be ok with taking a checking function like that into the library, but i don't want to do the actual asserting in the lib so i'm not sure what to do their22:17
mordredyup. otoh - I love that I'm setting up a bunch of request mocks, then making essentially one shade call, and then checking that the cloud interaction was what I was expecting22:17
mordredthe end result has so far been much more comprehensive and touches more real code paths - including being able to check errors that were just way too hard to mock dance for before22:18
mordredso yay!22:18
openstackgerritMonty Taylor proposed openstack-infra/shade: Convert glance parts of task test to requests_mock  https://review.openstack.org/41042522:21
openstackgerritMerged openstack-infra/shade: Remove caching config from test_image  https://review.openstack.org/40766922:22
*** gouthamr has joined #openstack-shade22:23
*** gouthamr has quit IRC22:24
*** gouthamr has joined #openstack-shade22:25
openstackgerritMerged openstack-infra/shade: Convert test_create_image_put_v2 to requests_mock  https://review.openstack.org/40767022:31
openstackgerritMerged openstack-infra/shade: Change register_uri to use the per-method calls  https://review.openstack.org/40776722:31
morganmordred: ping23:03
morganmordred: so.23:03
mordredmorgan: SUP?23:03
morganmordred: for my undetrstanding because it's ... somewhat not connecting at the moment23:03
morganmordred: demo_cloud vs operator_cloud in the tests23:04
* morgan is thinking keystone and auth code atm23:04
mordredmorgan: demo_cloud is the unprivileged user - operator_cloud is the admin user23:04
morgancool;23:04
morganok that is easy23:04
mordred(devstack writes out two accounts- demo and admin iirc)23:04
morgani'll make this fixture overwrite scope for both23:04
mordredneat23:04
morganhttps://www.irccloud.com/pastebin/6OEyeLlH/23:05
morganmordred: ^ that is the start of it23:05
morganit's going to get a minor rename but it's mostly there.23:06
morganmordred: i'm going to require the test_instance to be passed in, just because it has all the magic already23:07
mordredmorgan: when you say "test_instance" - what's that?23:07
mordred(what's it an instance of?)23:07
morganthe test class23:07
morganitself23:07
morgani haven't written the docs23:07
mordredAH23:07
morganso the idea is you do self.useFixture(ScopedAuth(test_instance=self, project_name=blah, reuse_project=False))23:08
morgani'll see if i can eliminate the test_instance23:08
morganit might already be accessible from the fixture23:09
mordredif not, it doesn't bother me23:09
*** gouthamr has quit IRC23:09
morganright, but it would be better if it is already available23:09
morgannow i just need to figure out the role assignment bit(s). but that should be pretty easy23:09
openstackgerritMorgan Fainberg proposed openstack-infra/shade: Add in a dynamic project scope test fixture  https://review.openstack.org/41045323:20
morganmordred: ^ will mark as WIP and continue23:21
mordredmorgan: woot!23:24
mordredmorgan: I have a thought on the 'override scope' part23:25
morganshade has verrrrrry rudimentary logic for assigning roles23:25
morganso, working around that at the moment.23:25
morgannbd23:26
morganmordred: oh really?23:26
mordredmorgan: we don't really know anything about assigning roles :)23:26
morganmordred: cool! I hadn't got that far yet (the scope override)23:26
mordredmorgan: yes! me make you fake code patch23:26
morgancool23:26
morganfor role assignment: I am doing a list_roles, then going to snarf in the user for demo and operator cloud, and just duplicate the assignment for the new project23:26
morganso we always keep exact duplicate of roles on the main scope (prior to the fixture)23:27
mordredmorgan: http://paste.openstack.org/show/592278/23:30
morganmordred: on the openstackcloud object how do I see the current user_id? i can find current_project_id23:30
mordredmorgan: that popped in to my head after reading your patch23:30
mordredmorgan: that's a great question - I'm not sure we have that yet - would need to grab it from the session23:31
morganoh would you rather keep the scope 100% contained like that so you can flip between old/main and "fixture" model?23:31
mordredMAYBE?23:31
morganor would you rather have the scope simply overridden23:31
morgani'm thinking override directly23:31
morganthen you don't need to do magic code23:31
morganand know if you're expecting "dynamic scope" or not23:31
morganjust "use" the fixture and get a dynamically scoped project23:32
morgani mean you can *always* reference the stored object in the fixture too. but...23:32
morgani think the tests should be dumb23:32
mordredcool23:32
* mordred waits and watches23:32
mordredin any case - adding a current_user_id similar to current_project_id is probably not a terrible idea23:33
morganyeah looking if session has enough logic or if KSA needs a patch now23:33
mordredmorgan: if only you knew anyone with ksa core rights :)23:33
morganright?!23:33
morgani mean who the hell has those? :P23:33
* morgan has to head home soon for tv delivery23:34
mordredyay tv!23:36
openstackgerritMerged openstack-infra/shade: Fix _neutron_available_floating_ips filtering  https://review.openstack.org/40953223:43
openstackgerritMerged openstack-infra/shade: Make available_floating_ips use normalized keys  https://review.openstack.org/40982423:54

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!