juju does not work with Walrus when s3-uri has a suffix

Bug #907450 reported by Jônata Tyska Carvalho
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Eucalyptus
New
Undecided
Unassigned
pyjuju
Triaged
Low
Jim Baker
txAWS
New
Undecided
Unassigned

Bug Description

Juju does not work with Walrus when s3-uri has a suffix like IP:PORT/services/Walrus. Im trying to do the command

juju bootstrap

with the config file

environments:
  sample:
    type: ec2
    default-instance-type: m1.small
    default-image-id: emi-1AC119AC
    ec2-uri: http://10.0.0.125:8773/services/Eucalyptus
    s3-uri: http://10.0.0.125:8773/services/Walrus
    access-key: WKy3rMzOWPouVaxK3p3Ar1C3uRBwa1FBXnCw
    secret-key: kjL11YWebs1brv2BMiGgquXAxnHYjIuGBiSK2cZA
    control-bucket: juju-f81954e8161d471683cd70f4681f38ca
    admin-secret: 13d2ea53792344bc82149e65277a3931
    default-series: oneiric

Here is the tcpdump of juju bootstrap command:

http://paste.ubuntu.com/777597/

Changed in juju:
importance: Undecided → Medium
Revision history for this message
mdshaonimran (mdshaonimran) wrote :

I am facing the same problem.

version: 0.5+bzr440-1ju
platform: eucalyptus
Instance: oneiric

Changed in juju:
milestone: none → florence
Revision history for this message
Harold Spencer Jr. (harold-spencer-jr) wrote :

Can you add some insight as to how the S3 URI is used? Is there a bucket that has been created that has the configuration file for the juju charm? Also, what s3 tool is being used to communicate with Walrus?

Regards,

Harold Spencer, Jr.
Technical Support Engineer
Eucalyptus Systems, Inc.

Revision history for this message
Jônata Tyska Carvalho (jonatatyska) wrote :

This problem appears in the first steps of juju installation. I don't know well juju's architecture to explain how it uses Walrus, maybe someone of juju dev team could help.

Revision history for this message
Harold Spencer Jr. (harold-spencer-jr) wrote :

Checking out the txaws-list-buckets command, I was able to narrow down where the issue may lie. It seems that txaws is expecting some additional information for the S3 URL. I used the python debugger to step through txaws-list-buckets and I was able to rule out the "/" issue.

Also, because of this error, nothing is ever sent to the wire. The communication is dead before hitting the Walrus component.

Version:

# txaws-list-buckets --version
txAWS 0.0.1

Test Command:

# txaws-list-buckets -a <access-key> -s <secret-key> -U 192.168.2.75:8773/services/Walrus
> /usr/bin/txaws-list-buckets(35)<module>()
-> region = AWSServiceRegion(
(Pdb) next
> /usr/bin/txaws-list-buckets(36)<module>()
-> creds=creds, region=options.region, s3_endpoint=options.url)
(Pdb) print options.url
192.168.2.75:8773/services/Walrus
(Pdb) next
TypeError: "__init__() got an unexpected keyword argument 's3_endpoint'"
> /usr/bin/txaws-list-buckets(36)<module>()
-> creds=creds, region=options.region, s3_endpoint=options.url)

## Without "/"

# txaws-list-buckets -a <access-key> -s <secret-key> -U 192.168.2.75:8773
> /usr/bin/txaws-list-buckets(35)<module>()
-> region = AWSServiceRegion(
(Pdb) next
> /usr/bin/txaws-list-buckets(36)<module>()
-> creds=creds, region=options.region, s3_endpoint=options.url)
(Pdb) print options.url
192.168.2.75:8773
(Pdb) next
TypeError: "__init__() got an unexpected keyword argument 's3_endpoint'"
> /usr/bin/txaws-list-buckets(36)<module>()
-> creds=creds, region=options.region, s3_endpoint=options.url)

Hope this helps.

Harold Spencer Jr.
Support Engineer
Eucalyptus Systems, Inc.

Revision history for this message
Harold Spencer Jr. (harold-spencer-jr) wrote :

Sorry, I forgot to add my instance and cloud information:

## Instance ##

root@ubuntu:~# lsb_release --release
Release: 10.04

root@ubuntu:~# python --version
Python 2.6.5

## Eucalyptus Cloud Setup ##

RHEL 5.5, Eucalyptus Open Source 2.0.3, Network mode: Managed

Regards,

Harold Spencer Jr.
Support Engineer
Eucalyptus Systems, Inc.

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

The problem in this case is that Walrus is breaking the convention established by the real S3 of owning the full path namespace of the TCP address that hosts the service.

So, while in S3 you'd access <addr>/bucket-name/key, in Walrus one has to use something like <addr>/path/for/walrus/bucket-name/key

It's not a big deal, but it's unconventional, and libraries have to be adapted to support it. IIRC, even boto itself, which is used in Eucalytpus tools, had to be patched by them to support that.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Perhaps as a workaround until walrus can be run without a prefix, a user could run an apache server using mod_proxy to send these queries to walrus.. Should be as simple as:

ProxyPass / http://real.walrus.server/walrus/path

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

Its not clear we have the resource availability to fix this for 12.04.. i'd really like to make it work though, but properly its a bug in txaws for eucalyptus s3 support.

Changed in juju:
milestone: florence → galapagos
Revision history for this message
Brian Thomason (brian-thomason) wrote :

This patch honors a suffix in an s3 uri as used by Walrus. It also passes the IpProtocol arg when creating a security group which works around a bug in Euca 3.x.

Revision history for this message
Brian Thomason (brian-thomason) wrote :

This patch causes juju to use the 'latest' api version rather than 1.0 when determining the instance id via a meta service call

Jim Baker (jimbaker)
Changed in juju:
assignee: nobody → Jim Baker (jimbaker)
Changed in juju:
milestone: galapagos → none
Revision history for this message
Andy Grimm (agrimm) wrote :

This issue is now being tracked upstream at http://eucalyptus.atlassian.net/browse/EUCA-2788

Please watch that issue for further updates.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Can somebody please comment on the status? It seems to be dead upstream. I'm thinking this really is just a bug in Euca and we won't be addressing it in Euca unless users request a workaround.

Revision history for this message
Brian Thomason (brian-thomason) wrote :

Hi Clint,

I actually worked around this in the txaws library quite easily, but then discovered other issues that prevented JuJu from working that were over my head, so I punted it to engineering. I'll check in on the status tomorrow and update this bug with relevant info when I have it.

Thanks!

Curtis Hovey (sinzui)
Changed in juju:
status: New → Triaged
Curtis Hovey (sinzui)
Changed in juju:
importance: Medium → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.