I not sure if awsapi runs in developer mode and with the script you're using 
(cloudstack-aws-api-register). The script is assumed to be part of a release 
where the awsapi package is installed in /usr/share/cloud/bridge.
Try to change the hardcoded path to the path where bridge is getting deployed. 
The ant/maven confusion; assuming you're using ant; you'll have to change the 
deploy-rpm target in build/build-aws-api.xml and run that target with ant 
<target> to deploy bridge in case it does not get deployed to tomcat etc.

Regards. 
________________________________________
From: sebgoa [run...@gmail.com]
Sent: Monday, October 08, 2012 10:06 PM
To: cloudstack
Subject: aws testing using 4.0 test procedure

Hi,

I am trying to test the aws api using the test procedure that uses devcloud:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/CloudStack+4.0+test+procedure

Everything builds fine and the smoke test (starting an instance ) is successfull

But the user registration for aws fails.

It could be a devcloud issue or 
https://issues.apache.org/jira/browse/CLOUDSTACK-257 is not yet fixed.

when registering with:
python ./cloudstack-aws-api-register -a 
VXxPLPRzP7ET1cNw4sZx8YIVxwAEKsl9VS-cq9lxzN7C2lO0MhbOlQSUJCvCCMjmyxSZaFOK2CpdVuTipP4P6A
 -s 
mD-WGTYYEjwp1rrYWfc665wwdkDqjnUal-d6dXAysQSvTcIb13Bn1cJiyfLrBiPCqHWNgETxv3YPUfgKv1uklA
 -c cert.pem -u http://localhost:7080/awsapi

I get a 401 error:

Traceback (most recent call last):
  File "./cloudbridgeregister.py", line 61, in <module>
    register(opts.url, opts.apikey, opts.secretkey, opts.cert)
  File "./cloudbridgeregister.py", line 32, in register
    get_url(url, api_key, secret_key, 'SetUserKeys', query)
  File "./cloudbridgeregister.py", line 27, in get_url
    return urllib.urlretrieve(url)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py",
 line 93, in urlretrieve
    return _urlopener.retrieve(url, filename, reporthook, data)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py",
 line 239, in retrieve
    fp = self.open(url, data)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py",
 line 207, in open
    return getattr(self, name)(url)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py",
 line 362, in open_http
    return self.http_error(url, fp, errcode, errmsg, headers)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py",
 line 375, in http_error
    result = method(url, fp, errcode, errmsg, headers)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py",
 line 689, in http_error_401
    errcode, errmsg, headers)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py",
 line 385, in http_error_default
    raise IOError, ('http error', errcode, errmsg, headers)
IOError: ('http error', 401, 'Unauthorized', <httplib.HTTPMessage instance at 
0x1011db950>)

the ant rdebug gives:

 [sshexec]      [java] EC2RestServlet.doGetOrPost: 
javax.servlet.forward.request_uri: /awsapi
  [sshexec]
  [sshexec]      [java] EC2RestServlet.doGetOrPost: 
javax.servlet.forward.context_path: /awsapi
  [sshexec]
  [sshexec]      [java] EC2RestServlet.doGetOrPost: 
javax.servlet.forward.servlet_path:
  [sshexec]
  [sshexec]      [java] EC2RestServlet.doGetOrPost: 
javax.servlet.forward.path_info: /
  [sshexec]
  [sshexec]      [java] EC2RestServlet.doGetOrPost: 
javax.servlet.forward.query_string: 
AWSAccessKeyId=VXxPLPRzP7ET1cNw4sZx8YIVxwAEKsl9VS-cq9lxzN7C2lO0MhbOlQSUJCvCCMjmyxSZaFOK2CpdVuTipP4P6A&Action=SetUserKeys&SignatureMethod=HmacSHA1&SignatureVersion=2&Timestamp=2012-10-08T18:26:40Z&Version=2010-11-15&accesskey=VXxPLPRzP7ET1cNw4sZx8YIVxwAEKsl9VS-cq9lxzN7C2lO0MhbOlQSUJCvCCMjmyxSZaFOK2CpdVuTipP4P6A&secretkey=mD-WGTYYEjwp1rrYWfc665wwdkDqjnUal-d6dXAysQSvTcIb13Bn1cJiyfLrBiPCqHWNgETxv3YPUfgKv1uklA&Signature=d7oem9cNwKSyoie8l5%2BrYOH%2FAGw%3D
  [sshexec]

There is no /usr/share/cloud/bridge directory inside the devcloud, which makes 
me believe it's a devcloud issue and not a code issue ?

Thoughts,

-sebastien

Reply via email to