There's a fix for this in WSME trunk, but it only works with Pecan at the moment. Now that I'm back from vacation, I will resume working on getting WSME onto StackForge and a new release cut.
Doug On Tue, Aug 6, 2013 at 7:36 PM, Devananda van der Veen < [email protected]> wrote: > On Tue, Aug 6, 2013 at 2:17 PM, Mac Innes, Kiall <[email protected]> wrote: > >> On 06/08/13 21:56, Jonathan LaCour wrote: >> > James Slagle <[email protected]> wrote: >> > >> >> WSME + pecan is being used in Tuskar: >> >> https://github.com/tuskar/tuskar (OpenStack management API) >> >> >> >> We encountered the same issue discussed here. A solution we settled >> >> on for now was to use a custom Renderer class that could handle >> >> different response codes. You set the renderer in the call to >> >> pecan.make_app. This was meant to be a temporary solution until >> >> there's better support in WSME. >> > >> > If there is anything I can do on the Pecan side, let me know! Happy to >> build in new functionality to make this easier, in general. It does seem to >> make sense to be fixed on the WSME side, though. >> > >> > Best -- >> > >> > - Jonathan >> >> Nah - this is entirely on the WSME side :) >> >> WSME translate all exceptions that don't extend their ClientExcption to >> HTTP 500, and anything that does to HTTP 400. >> >> Beyond that, you only have the "default status code" to work with - 401, >> 404, 503 etc are all off limits with stock WSME. Literally you have a >> default code for successful requests, and 400 or 500. Nothing else. >> >> It seems like Ceilometer has worked there way around it using the >> "_lookup" method for 404's (but I can't find how they return any other >> status codes..), and libra + tuskar have replaced the WSME error >> handling for something entirely custom. >> >> We're not massively interested in replacing WSME's error handling with >> something custom, so our plan is to just use Pecan and ignore WSME for >> the Designate v2 API. When it's ready, hopefully the switch won't be too >> painful! >> >> Thanks, >> Kiall >> >> > Ironic is also using WSME, and has been bitten by this issue. In certain > situations we want to return either a 200 or a 202, which doesn't work for > the same reasons. > > -Deva > > _______________________________________________ > OpenStack-dev mailing list > [email protected] > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev > >
_______________________________________________ OpenStack-dev mailing list [email protected] http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
