On 08/15/11 - 01:38:14PM, Chris Lalancette wrote:
> On 08/12/11 - 04:15:21PM, David Lutterkort wrote:
> >     + EC2
> >       - Fix bug in reboot instance so that the details returned are those
> >         of the stopped instance, not some random instance
> >       - Support getting and updating blob metadata
> >       - support destroying images
> >       - support firewalls (security groups)
> 
> Just FYI that I am having some issues with firewalls in the 0.4.0 rc1.  In
> particular, any requests I make to create a new firewall are dropped on the
> floor (no traceback in the server, and no action on EC2 either).  Marios
> confirmed that it worked fine for him, so it may be a local configuration
> thing.  I'm still investigating.

OK, I see the problem, though I'm not quite sure how to fix it.  The problem
only occurs when I am using driver selection.  For instance, if I use a URL
like http://localhost:3001/api;driver=ec2, I get the following XML back for the
API:

<api driver='ec2' version='0.4.0'>
  <link href='http://localhost:3001/api;driver=ec2/load_balancers' 
rel='load_balancers'>
  </link>
  ...
  <link href='http://localhost:3001/api;driver=ec2/firewalls' rel='firewalls'>
  </link>
  ...
  <link href='http://localhost:3001/api;driver=ec2/keys' rel='keys'>
  </link>
  <link href='http://localhost:3001/api;driver=ec2/addresses' rel='addresses'>
  </link>
  <link href='http://localhost:3001/api;driver=ec2/instance_states' 
rel='instance_states'>
  </link>
</api>

My libdeltacloud code, of course, follows these links blindly.  What's
interesting is that GET queries seem to do the right thing.  That is, if I try
to get a listing of all of the firewalls, libdeltacloud uses a URL like
http://localhost:3001/api;driver=ec2/firewalls, but the server prints out
a request like:

127.0.0.1 - - [15/Aug/2011 13:57:52] "GET /api/firewalls?api[driver]=ec2 
HTTP/1.1" 200 11513 0.6371

For the POST, however, libdeltacloud uses
http://localhost:3001/api;driver=ec2/firewalls, but it does not get properly
translated:

127.0.0.1 - - [15/Aug/2011 13:57:52] "POST /api;driver=ec2/firewalls HTTP/1.1" 
404 434 0.0135

It seems like we could fix this either by fixing the URLs that the API returns
initially (so that they look like 
http://localhost:3001/api/firewalls;driver=ec2),
or by changing the rackup(?) stuff to do the translation for POST like it
already does for GET.  Thoughts?

-- 
Chris Lalancette

Reply via email to