| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-sdks - 2017-10-10 | |||
| 17:13:50 | mordred | cdent, efried: the patch is here: https://review.openstack.org/#/c/484341/ and it's on my list to finish as soon as zuul v3 rollout is done | |
| 17:14:06 | cdent | k3w! | |
| 18:47:32 | briancurtin | umbSublime: if you just want the token you can call https://developer.openstack.org/sdks/python/openstacksdk/users/connection.html#openstack.connection.Connection.authorize | |
| 18:48:17 | briancurtin | that’s used for more explicitly authorizing (if necessary, it’s not the usual way you auth), and that will return the auth token | |
| 22:10:48 | openstackgerrit | Jackie Truong proposed openstack/python-openstackclient master: Add trusted_image_certificates to server https://review.openstack.org/501926 | |
| 23:20:07 | openstackgerrit | Merged openstack/cliff master: Alias exit to cmd2's quit command to exit interactive shell https://review.openstack.org/491217 | |
| #openstack-sdks - 2017-10-11 | |||
| 04:25:51 | openstackgerrit | Monty Taylor proposed openstack/keystoneauth master: Split request logging into four different loggers https://review.openstack.org/505764 | |
| 06:51:53 | ldl | https://stackoverflow.com/questions/46681591/my-project-and-admin-panels-resource-can-not-be-retrieve-but-identity-resource | |
| 06:52:15 | ldl | Hi, friends, do you have encountered this issue? | |
| 08:14:16 | umbSublime | thanks briancurtin | |
| 08:50:21 | slaweq_ | hello briancurtin | |
| 08:50:41 | slaweq_ | briancurtin: some time ago You told me that You will check if You can release new version of OpenStack SDK | |
| 08:50:50 | slaweq_ | did You check this already? | |
| 08:50:59 | slaweq_ | do You know if it's possible to release it? | |
| 09:47:29 | openstackgerrit | Stephen Finucane proposed openstack/python-openstackclient master: Convert 'server' commands to use autoprogram https://review.openstack.org/458452 | |
| 13:43:22 | kuzko | hello, I am using shade to try to create my instances, but I cannot seem to boot from a volume only, image seems to be a requirement | |
| 13:44:13 | kuzko | I am getting TypeError: create_server() missing 1 required positional argument: 'image' | |
| 13:51:32 | mordred | kuzko: one sec ... lemme check something | |
| 13:53:00 | mordred | kuzko: OH FOR THE LOVE OF ... wow. yah. that's a bug, I'm sorry. pass image=None and it should work - and I'll fix it in the code | |
| 13:53:31 | kuzko | ok, I've seen that placing image=None works.. but, now my volume isn't bootable ^^ | |
| 13:54:00 | mordred | oh. well, that's less good - can you paste me your whole create_server call? | |
| 13:54:23 | mordred | this is basic feature so I'm *extra* unpleased with it not working for you | |
| 13:54:43 | kuzko | ok, I create a volume beforehand, maybe there is a switch to set it bootable I did not see.. hang on i'm pastebining it | |
| 13:55:13 | kuzko | don't sweat it, there is a workaround so that's not biggie... | |
| 13:56:25 | kuzko | https://pastebin.com/FrySUpSP there you go mordred | |
| 13:57:25 | kuzko | that's the correct one, remove image=None and that's what I had beforehand | |
| 14:01:15 | mordred | kuzko: sweet - thanks. that's SUPPOSED to create a bootable volume (the create_volume(image= ..) | |
| 14:02:21 | mordred | aha | |
| 14:02:41 | mordred | kuzko: there's a way to toggle the bootable flag on a volume but we don't expose it - I'll add that for you too | |
| 14:05:01 | kuzko | well that's nice, I used pip to fech the libray, should I update using pip or git clone? | |
| 14:05:15 | kuzko | *library... | |
| 14:10:01 | mordred | kuzko: I'm overdue for a release - so I'll try to get one cut tomorrow | |
| 14:24:02 | umbSublime | mordred, if you can add that feature for custom api call like we discussed yesterday in the next release (if it's ready that is) it would be awesome !! | |
| 14:25:46 | mordred | umbSublime: yes - I fully intend to get that in to the next release | |
| 14:26:18 | umbSublime | awesome!! | |
| 14:26:21 | mordred | umbSublime: well - next sdk release - not next shade release | |
| 14:26:45 | umbSublime | ohh right you guys were talking about shade, my bad :) | |
| 14:27:15 | mordred | umbSublime: well - hopefully that confusion will not persist for TOO much longer :) | |
| 14:27:21 | umbSublime | hehe | |
| 14:27:25 | mordred | but that certaily won't get done by tomorrow :) | |
| 14:27:41 | umbSublime | no worries, I have my work-around working :) | |
| 14:37:34 | kuzko | is shade supposed to become the SDK at a later date? ^^ | |
| 14:38:34 | mordred | kuzko: the current proposed plan is that we merge the shade code into the sdk tree, then make the shade library a thin backwards-compat shim that wraps and uses the equivilent code in the sdk | |
| 14:38:59 | mordred | kuzko: so it's still totally safe to use shade today - and I do not intend to break it, well, ever | |
| 14:39:25 | kuzko | nice, because I think we might use it for our operations going forward | |
| 14:40:04 | kuzko | simplicity allow for quick newbs onboarding and teaching | |
| 14:46:21 | mordred | ++ | |
| 14:47:38 | mordred | kuzko: the overall intent is to have all three types of access co-exist using the same Connection object - the object-oriented API that sdk currently has - the more procedural business-logic 'easy' api of shade - and fallback/passthrough layer for just making direct REST calls if you need something that doesnt' have a higher-level wrapper | |
| 14:48:42 | mordred | so you can do conn.list_servers() ... conn.compute.server.servers() and conn.compute.get('/servers') depending on your need | |
| 14:49:04 | kuzko | oh right, that would be sweet | |
| 14:49:57 | umbSublime | indeed ^^ | |
| 14:50:04 | mordred | that way for times like today if you're like 'hi, I need to set bootable flag' I can say "crap, well, for now just do conn.block_storage.post('/volumes/{id}/action'.format(volume['id']), {'os-set_bootable': True}) | |
| 14:50:43 | mordred | I've got most of that working locally but not passing tests yet | |
| 14:53:29 | mordred | (which is mostly just due to mocking issues in the tests - not actual issues) | |
| 14:56:37 | mordred | kuzko: so your workaroud is just to create the volume using cloud.create_volume(image=imageMA, name='ATEL-Modele-20170926',size=50) and that did properly wind up with a bootable volume yeah? | |
| 14:59:53 | mordred | kuzko: did you specifically want to do that in two steps? asking because if your goal is 'create a volume from this image and then boot a server from it' - you can totally do that all just in the create_server call | |
| 15:00:53 | kuzko | it's in two step because I want to reuse the volume to upload it at a later date, it's part of an image update script... and no, it's not doing a proper bootable volume... | |
| 15:01:17 | mordred | gotcha. | |
| 15:01:18 | kuzko | *at a later date ... in the script... | |
| 15:01:21 | mordred | yah | |
| 15:03:31 | mordred | hrm. creating the volume from an image is supposed to set bootable ... lemme go ask someone something | |
| 15:29:35 | mordred | kuzko: SOOO ... I've got some patches queued up to deal with this | |
| 15:29:57 | mordred | kuzko: but - I chatted with the cinder folks and also just did a test real quick against vexxhost doing v=c.create_volume(image='dib-ubuntu-trusty', wait=True, size=50) ... and I get v['is_bootable'] == True | |
| 15:30:44 | mordred | kuzko: can you verify that newvolume['is_bootable'] in your script is False? or, if it is showing True, can you paste me the error you're getting when you get it? | |
| 15:31:01 | mordred | (trying to figure out if there is a deeper bug somewhere) | |
| 15:32:48 | kuzko | 'bootable': False | |
| 15:34:32 | mordred | AWESOME | |
| 15:35:19 | kuzko | you seem awfuly entertained by a bug | |
| 15:35:34 | mordred | well - I'm sick in the head | |
| 16:29:36 | mordred | kuzko: AHA! I think I know what the issue is | |
| 16:30:36 | kuzko | mordred : so how bad is it? | |
| 16:30:41 | mordred | kuzko: your create volume call is not waiting for the volume to be ready - and cinder does not set the bootable attribute on the image until later in processing | |
| 16:30:55 | kuzko | oh... | |
| 16:31:09 | kuzko | I just have to set a wait? | |
| 16:31:45 | mordred | kuzko: yah. try changing cloud.create_volume(image=imageMA, name='ATEL-Modele-20170926',size=50) to cloud.create_volume(image=imageMA, name='ATEL-Modele-20170926',size=50, wait=True) | |
| 16:32:04 | kuzko | mordred : hang on, that makes no sense, the default value of wait is true | |
| 16:32:09 | mordred | oh. hrm | |
| 16:32:16 | mordred | kuzko: ok. nevermind. ignore me :) | |
| 16:32:23 | kuzko | def create_volume( | |
| 16:32:23 | kuzko | self, size, | |
| 16:32:23 | kuzko | wait=True, timeout=None, image=None, **kwargs): | |
| 16:32:28 | mordred | yup. you're very right | |
| 16:34:37 | mordred | kuzko: the cinder team are curious as to what version of cinder you're running - if you happen to know | |
| 16:35:28 | kuzko | :~$ cinder --version | |
| 16:35:29 | kuzko | 3.2.0 | |
| 16:38:28 | kuzko | mordred : should I use an other? | |
| 16:39:20 | mordred | kuzko: nah - if you have time, would you mind running with http logging set like: http://paste.openstack.org/show/623372/ and pasting the (likely annoying long) results? | |
| 16:39:50 | kuzko | mordred : paste not running | |
| 16:42:54 | mordred | kuzko: https://etherpad.openstack.org/p/ihJXPoJon5 | |
| 16:42:57 | kuzko | mordred : alright there you go https://pastebin.com/ZK990uxi | |
| 16:43:12 | mordred | kuzko: sweet - thankyou very much - I appreciate your help here | |
| 16:47:21 | kuzko | tell me if there is something more i can do about it | |
| 16:48:27 | mordred | ooh- look at line 59 - it's not passing imageRef - I think the reason it's not bootable is that it's not even creating it from the image | |
| 16:48:54 | kuzko | hu... what? | |
| 16:53:02 | mordred | yah. so - that'll be the next rabbit hole to dive down | |
| 16:54:25 | mordred | kuzko: I think I see it ... your script does a get_image for 'ATEL-Modele-Latest' ... but I do not see that image in your image list | |
| 16:54:49 | mordred | kuzko: so I thinkn imageMA is coming back None, which you are then passing to create_volume | |
| 16:55:47 | kuzko | indeed, I am also a dumbass for not checking my code | |
| 16:55:57 | kuzko | and my tenant | |
| 16:56:29 | mordred | well - also shade is failing at figuring out that you requested something it can't do | |