Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-05-03 Thread Eric Fried
>> verify with placement >> whether the image traits requested are 1) supported by the compute >> host the instance is residing on and 2) coincide with the >> already-existing allocations. Note that #2 is a subset of #1. The only potential advantage of including #1 is efficiency: We can do #1 in

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-05-03 Thread Matt Riedemann
On 5/3/2018 3:26 PM, Dan Smith wrote: Well, it's a little itcky in that it makes a random part of conductor a bit like the scheduler in its understanding of and iteraction with placement. I don't love it, but I think it's what we have to do. Trying to do the trait math with what was used before,

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-05-03 Thread Dan Smith
> I'm late to this thread but I finally went through the replies and my > thought is, we should do a pre-flight check to verify with placement > whether the image traits requested are 1) supported by the compute > host the instance is residing on and 2) coincide with the > already-existing allocati

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-05-02 Thread melanie witt
On Wed, 2 May 2018 17:45:37 -0500, Matt Riedemann wrote: On 5/2/2018 5:39 PM, Jay Pipes wrote: My personal preference is to add less technical debt and go with a solution that checks if image traits have changed in nova-api and if so, simply refuse to perform a rebuild. So, what if when I crea

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-05-02 Thread Arvind N
Isnt this an existing issue with traits specified in flavor as well? Server is created using flavor1 requiring trait A on RP1. Before the rebuild is called, the underlying RP1 can be updated to remove trait A and when a rebuild is requested(regardless of whether the image is updated or not), we sk

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-05-02 Thread Matt Riedemann
On 5/2/2018 5:39 PM, Jay Pipes wrote: My personal preference is to add less technical debt and go with a solution that checks if image traits have changed in nova-api and if so, simply refuse to perform a rebuild. So, what if when I created my server, the image I used, let's say image1, had r

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-05-02 Thread Jay Pipes
On 05/02/2018 10:07 AM, Matt Riedemann wrote: On 5/1/2018 5:26 PM, Arvind N wrote: In cases of rebuilding of an instance using a different image where the image traits have changed between the original launch and the rebuild, is it reasonable to ask to just re-launch a new instance with the ne

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-05-02 Thread Arvind N
> What if the API compares the original image required traits against the new image required traits, and if the new image has required traits which weren't in the original image, then (punt) fail in the API? Then you would at least have a chance > to rebuild with a new image that has required trai

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-05-02 Thread Matt Riedemann
On 5/1/2018 5:26 PM, Arvind N wrote: In cases of rebuilding of an instance using a different image where the image traits have changed between the original launch and the rebuild, is it reasonable to ask to just re-launch a new instance with the new image? The argument for this approach is tha

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-05-02 Thread Matt Riedemann
On 4/24/2018 8:26 AM, Sylvain Bauza wrote: We also have pre-flight checks for move operations like live and cold migrations, and I'd really like to keep all the conditionals in the conductor, because it knows better than the scheduler which operation is asked. I'm not sure what "pre-flight ch

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-05-02 Thread Matt Riedemann
On 4/24/2018 3:25 AM, Balázs Gibizer wrote: The algorithm Eric provided in a previous mail do the filtering for the RPs that are part of the instance allocation so that sounds good to me. Yeah I've been wondering if that solves this VF case. I think we should not try to adjust allocations duri

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-05-02 Thread Matt Riedemann
On 4/23/2018 4:51 PM, Arvind N wrote: For #1, we can make the explanation very clear that we rejected the request because the original traits specified in the original image and the new traits specified in the new image do not match and hence rebuild is not supported. We don't reject rebuild

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-05-02 Thread Matt Riedemann
On 4/23/2018 4:43 PM, Jay Pipes wrote: How about just having the conductor call GET /resource_providers?in_tree=&required=, see if there is a result, and if not, don't even call the scheduler at all (because conductor would already know there would be a NoValidHost returned)? This makes filt

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-05-01 Thread Arvind N
Reminder for Operators, Please provide feedback either way. In cases of rebuilding of an instance using a different image where the image traits have changed between the original launch and the rebuild, is it reasonable to ask to just re-launch a new instance with the new image? The argument for

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-04-24 Thread Eric Fried
Alex- On 04/24/2018 09:21 AM, Alex Xu wrote: > > > 2018-04-24 20:53 GMT+08:00 Eric Fried >: > > > The problem isn't just checking the traits in the nested resource > > provider. We also need to ensure the trait in the exactly same child > > resource provi

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-04-24 Thread Alex Xu
2018-04-24 20:53 GMT+08:00 Eric Fried : > > The problem isn't just checking the traits in the nested resource > > provider. We also need to ensure the trait in the exactly same child > > resource provider. > > No, we can't get "granular" with image traits. We accepted this as a > limitation for t

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-04-24 Thread Sylvain Bauza
Sorry folks for the late reply, I'll try to also weigh in the Gerrit change. On Tue, Apr 24, 2018 at 2:55 PM, Jay Pipes wrote: > On 04/23/2018 05:51 PM, Arvind N wrote: > >> Thanks for the detailed options Matt/eric/jay. >> >> Just few of my thoughts, >> >> For #1, we can make the explanation ve

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-04-24 Thread Jay Pipes
On 04/23/2018 05:51 PM, Arvind N wrote: Thanks for the detailed options Matt/eric/jay. Just few of my thoughts, For #1, we can make the explanation very clear that we rejected the request because the original traits specified in the original image and the new traits specified in the new image

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-04-24 Thread Eric Fried
> The problem isn't just checking the traits in the nested resource > provider. We also need to ensure the trait in the exactly same child > resource provider. No, we can't get "granular" with image traits. We accepted this as a limitation for the spawn aspect of this spec [1], for all the same r

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-04-24 Thread Balázs Gibizer
On Tue, Apr 24, 2018 at 9:08 AM, Alex Xu wrote: 2018-04-24 5:51 GMT+08:00 Arvind N : Thanks for the detailed options Matt/eric/jay. Just few of my thoughts, For #1, we can make the explanation very clear that we rejected the request because the original traits specified in the original i

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-04-24 Thread Alex Xu
2018-04-24 5:51 GMT+08:00 Arvind N : > Thanks for the detailed options Matt/eric/jay. > > Just few of my thoughts, > > For #1, we can make the explanation very clear that we rejected the > request because the original traits specified in the original image and the > new traits specified in the new

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-04-23 Thread Arvind N
> > 1. Fail in the API saying you can't rebuild with a new image with new > required traits. Pros: - Simple way to keep the new image off a host that doesn't support it. > - Similar solution to volume-backed rebuild with a new image. Cons: - Confusing user experience since they might be able

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-04-23 Thread Eric Fried
> for the GET > /resource_providers?in_tree=&required=, nested > resource providers and allocation pose a problem see #3 above. This *would* work as a quick up-front check as Jay described (if you get no results from this, you know that at least one of your image traits doesn't exist anywhere in t

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-04-23 Thread Arvind N
Thanks for the detailed options Matt/eric/jay. Just few of my thoughts, For #1, we can make the explanation very clear that we rejected the request because the original traits specified in the original image and the new traits specified in the new image do not match and hence rebuild is not suppo

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-04-23 Thread Jay Pipes
On 04/23/2018 03:48 PM, Matt Riedemann wrote: We seem to be at a bit of an impasse in this spec amendment [1] so I want to try and summarize the alternative solutions as I see them. The overall goal of the blueprint is to allow defining traits via image properties, like flavor extra specs. Tho

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-04-23 Thread Eric Fried
Following the discussion on IRC, here's what I think you need to do: - Assuming the set of traits from your new image is called image_traits... - Use GET /allocations/{instance_uuid} and pull out the set of all RP UUIDs. Let's call this instance_rp_uuids. - Use the SchedulerReportClient.get_provi

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-04-23 Thread Matt Riedemann
On 4/23/2018 3:26 PM, Eric Fried wrote: No, the question you're really asking in this case is, "Do the resource providers in this tree contain (or not contain) these traits?" Which to me, translates directly to: GET /resource_providers?in_tree=$rp_uuid&required={$TRAIT|!$TRAIT, ...} ...which

Re: [openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-04-23 Thread Eric Fried
Semantically, GET /allocation_candidates where we don't actually want to allocate anything (i.e. we don't want to use the returned candidates) is goofy, and talking about what the result would look like when there's no `resources` is going to spider into some weird questions. Like what does the re

[openstack-dev] [nova][placement] Trying to summarize bp/glance-image-traits scheduling alternatives for rebuild

2018-04-23 Thread Matt Riedemann
We seem to be at a bit of an impasse in this spec amendment [1] so I want to try and summarize the alternative solutions as I see them. The overall goal of the blueprint is to allow defining traits via image properties, like flavor extra specs. Those image-defined traits are used to filter hos