| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2017-11-13 | |||
| 13:34:04 | ygl | efried: after validating the request , it constructs a build request. Which code is responsible in invoking the build request function ? | |
| 13:35:13 | efried | ygl The article links to https://github.com/openstack/nova/blob/stable/pike/nova/compute/api.py#L880 | |
| 13:35:40 | efried | ygl If you look down that function to L927, it looks like the build request is finally built there. | |
| 13:47:50 | ygl | efried: my question is what invokes that build function ? | |
| 13:49:05 | efried | ygl https://github.com/openstack/nova/blob/stable/pike/nova/compute/api.py#L1121 | |
| 13:50:53 | efried | ygl https://github.com/openstack/nova/blob/stable/pike/nova/compute/api.py#L1620 | |
| 13:53:11 | ygl | efried: does this function nova.api.openstack.compute.servers.ServersController.create() invoke build request function ? | |
| 13:53:15 | bauzas | f*ck, my IRC bouncer died | |
| 13:53:21 | bauzas | RIP | |
| 13:53:26 | efried | bauzas We still love you. | |
| 13:54:08 | bauzas | that, and my internal DNS server :( | |
| 13:54:18 | efried | ygl That seems like a reasonable assumption. | |
| 13:55:00 | ygl | efried: i am searching for that connection between the two events | |
| 13:55:29 | gibi | bauzas: welcome back! | |
| 13:55:45 | bauzas | gibi: well, ty | |
| 13:55:50 | efried | ygl Yeah, that's tricky, and I'm not super well-versed on how that works. Perhaps bauzas or stephenfin would know off the top. | |
| 13:56:08 | bauzas | just having a sickness too :p | |
| 13:56:26 | bauzas | sometimes, you love coming back to your house | |
| 13:56:45 | ygl | bauzas: Hi, can you help me with this https://github.com/jaypipes/articles/blob/master/openstack/walkthrough-launch-instance-request.md please ? | |
| 13:57:43 | ygl | bauzas: I am trying to understand what actually invokes the build request function ? | |
| 13:58:27 | efried | bauzas ygl is trying to figure out how we get from an API call to boot an instance, down to the create method in here: https://github.com/openstack/nova/blob/stable/pike/nova/compute/api.py#L1620 | |
| 13:59:13 | bauzas | ygl: have you seen the links ?N | |
| 13:59:26 | openstackgerrit | David Wahlstrom proposed openstack/nova master: Fix changes-since search filter https://review.openstack.org/519356 | |
| 13:59:31 | bauzas | https://github.com/jaypipes/articles/blob/master/openstack/walkthrough-launch-instance-request.md#construct-build-request | |
| 13:59:39 | bauzas | linking to https://github.com/openstack/nova/blob/stable/pike/nova/compute/api.py#L880 | |
| 14:00:43 | efried | bauzas Yeah, we walked that back to nova.compute.api.API.create, but don't know how the call into the REST API gets there. | |
| 14:01:02 | ygl | bauzas: my question is after the http validation by "nova.api.openstack.compute.servers.ServersController.create()" , what actually invookes the build request function ? | |
| 14:01:08 | bauzas | ah | |
| 14:01:14 | bauzas | sec | |
| 14:01:22 | ygl | bauzas: sure | |
| 14:01:36 | bauzas | it calls nova.compute.api.::create() AFAIR | |
| 14:02:00 | bauzas | ie. https://github.com/openstack/nova/blob/stable/pike/nova/compute/api.py#L1584 | |
| 14:03:06 | bauzas | ygl, efried: there, it is https://github.com/openstack/nova/blob/stable/pike/nova/api/openstack/compute/servers.py#L542 | |
| 14:03:28 | bauzas | if cellsv1, it can go to the cells API | |
| 14:03:38 | bauzas | but if not, it directly calls the above method | |
| 14:04:17 | efried | bauzas gibi Any interest in having a scheduler meeting in edleafe-'s absence? | |
| 14:04:38 | bauzas | efried: sorry, I'm a bit sick | |
| 14:04:52 | efried | Sorry to hear that. Rest up! | |
| 14:04:55 | bauzas | honestly, nothing to tell about the Sydney suumit | |
| 14:05:44 | gibi | efried:If it just the two of us then I think we can skip the meeting | |
| 14:05:53 | efried | wfm | |
| 14:05:59 | ygl | efried: can you find out for me how the control flows after the POST /servers to the create server function ? | |
| 14:06:36 | efried | ygl That sounds like wsgi stuff. Fraid I'm not the guy there. | |
| 14:06:44 | efried | ygl What is it you're actually trying to do here? | |
| 14:07:13 | bauzas | ygl: sec | |
| 14:07:15 | ygl | efried: i am just curious to find it out. I work on openstack | |
| 14:07:29 | bauzas | ygl: you wanna know what calls https://github.com/openstack/nova/blob/stable/pike/nova/api/openstack/compute/servers.py#L453 ? | |
| 14:07:44 | bauzas | I mean, how is it routed ? | |
| 14:07:57 | ygl | bauzas:no, I am following the post https://github.com/jaypipes/articles/blob/master/openstack/walkthrough-launch-instance-request.md#construct-build-request | |
| 14:08:41 | ygl | bauzas: in that I want to know after the "Validate HTTP payload" section, which code actually calls the build reequest function | |
| 14:09:06 | bauzas | ygl: I replied to you on that part | |
| 14:09:11 | ygl | efried: bauzas if you find anything please mail the details to ygk.kmr@gmail.com | |
| 14:09:14 | bauzas | (15:02:00) bauzas: ie. https://github.com/openstack/nova/blob/stable/pike/nova/compute/api.py#L1584 | |
| 14:09:14 | bauzas | (15:03:06) bauzas: ygl, efried: there, it is https://github.com/openstack/nova/blob/stable/pike/nova/api/openstack/compute/servers.py#L542 | |
| 14:10:33 | ygl | bauzas: I understand you are pointing to the code responsible for creating a server. I am asking how does the control get to that code in the first place ? | |
| 14:10:47 | ygl | bauzas: hope u understand | |
| 14:11:43 | bauzas | ygl: no sorry I don't get you | |
| 14:13:11 | ygl | efried: hope u understood my question | |
| 14:13:26 | ygl | bauzas: anyway thanks for your help bauzas | |
| 14:13:50 | efried | ygl I'm not sure. I think what you're asking is what handles the actual incoming HTTP request and invokes the code bauzas pointed to above? | |
| 14:14:05 | ygl | efried: exactly | |
| 14:15:07 | efried | ygl Okay, so that's wsgi magic that I don't understand. There's some kind of declarative syntax with decorators registering hooks in the wsgi server or some craziness. sdague is this in your wheelhouse? mtreinish maybe? | |
| 14:16:05 | ygl | efried: if you find anything please let me know on my email at ygk.kmr@gmail.com | |
| 14:16:13 | ygl | efried: thanks so much for your time and help | |
| 14:16:33 | openstackgerrit | Takashi NATSUME proposed openstack/nova master: [placement] Fix foreign key constraint error https://review.openstack.org/516880 | |
| 14:16:50 | efried | ygl You're welcome. | |
| 14:18:21 | efried | mriedem FYI, https://review.openstack.org/#/c/519034/ has passed that test six times in a row now. Which of course proves nothing. | |
| 14:19:14 | bauzas | ygl: magic is there for routing https://github.com/openstack/nova/blob/stable/pike/nova/api/openstack/compute/routes.py | |
| 14:19:58 | bauzas | ygl, efried: in particular for your concern https://github.com/openstack/nova/blob/stable/pike/nova/api/openstack/compute/routes.py#L777 | |
| 14:20:22 | bauzas | that's how we map an entrypoint | |
| 14:20:52 | efried | bauzas Beautiful, thanks. | |
| 14:23:41 | ygl | bauzas: thats awesome | |
| 14:24:25 | bauzas | that's just the routing logic | |
| 14:24:35 | bauzas | not the WSGI call itself | |
| 14:26:45 | ygl | bauzas: ok | |
| 14:27:19 | ygl | bauzas: I think to know how the routing works, we have to learn about wsgi framework in python | |
| 14:27:42 | bauzas | ygl: that routing logic is very nova-specific | |
| 14:27:53 | ygl | bauzas: ok | |
| 14:27:58 | bauzas | ygl: you can find many other python frameworks that do that for you | |
| 14:28:08 | ygl | bauzas: hmm | |
| 14:28:40 | bauzas | like, placement is having a separate routing mechanism AFAIK | |
| 14:30:03 | bauzas | yeah, it uses wsgify | |
| 14:31:15 | ygl | bauzas: thanks for your time | |
| 14:31:22 | bauzas | yeah, placement is totally different https://github.com/openstack/nova/blob/stable/pike/nova/api/openstack/placement/handler.py | |
| 14:31:44 | bauzas | ygl: so that really depends on your wishes | |
| 14:32:19 | ygl | bauzas: you are the first personto help me with the code flow of nova thanks for that | |
| 14:32:31 | bauzas | np | |
| 14:34:20 | openstackgerrit | David Wahlstrom proposed openstack/nova master: Fix changes-since search filter https://review.openstack.org/519356 | |
| 14:35:41 | openstackgerrit | David Wahlstrom proposed openstack/nova master: Fix changes-since search filter https://review.openstack.org/519356 | |
| 14:36:17 | openstackgerrit | David Wahlstrom proposed openstack/nova master: Fix changes-since search filter https://review.openstack.org/519356 | |
| 14:40:30 | openstackgerrit | Rodolfo Alonso Hernandez proposed openstack/os-vif master: Add support for Windows network commands https://review.openstack.org/487405 | |
| 14:43:20 | sdague | efried: you good now, or are there more questions? | |
| 14:43:47 | efried | sdague I believe bauzas answered everything, thanks. | |
| 14:43:56 | sdague | ok, great | |
| 14:49:01 | jianghuaw | bauzas, dansmith, alex_xu: It's appreciated a lot if you can help to review these patches on vGPU: https://review.openstack.org/#/q/topic:bp/add-support-for-vgpu+(status:open) | |
| 14:49:46 | jianghuaw | With these patches, the simple vGPU feature works well for XenAPI. | |
| 14:50:56 | bauzas | jianghuaw: of course, will do | |
| 14:51:10 | jianghuaw | bauzas, thanks:-) | |
| 14:51:38 | bauzas | jianghuaw: just a bit sick today, and still jetlagging from the summit, so don't expect full steam ahead until tomorrow hopefully :) | |
| 14:53:46 | jianghuaw | bauzas, ah. Sorry for that. Take care and hope you will be well soon. | |