Return-Path: X-Original-To: apmail-incubator-cloudstack-users-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EA6959C1E for ; Wed, 18 Jul 2012 19:56:26 +0000 (UTC) Received: (qmail 42842 invoked by uid 500); 18 Jul 2012 19:56:26 -0000 Delivered-To: apmail-incubator-cloudstack-users-archive@incubator.apache.org Received: (qmail 42823 invoked by uid 500); 18 Jul 2012 19:56:26 -0000 Mailing-List: contact cloudstack-users-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-users@incubator.apache.org Delivered-To: mailing list cloudstack-users@incubator.apache.org Received: (qmail 42813 invoked by uid 99); 18 Jul 2012 19:56:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2012 19:56:26 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of runseb@gmail.com designates 209.85.161.175 as permitted sender) Received: from [209.85.161.175] (HELO mail-gg0-f175.google.com) (209.85.161.175) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2012 19:56:20 +0000 Received: by ggnp4 with SMTP id p4so1872208ggn.6 for ; Wed, 18 Jul 2012 12:56:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=orfpeL/PhbLz7dA61ZR92zgDcCSfY2wi+PnRAwNvkyU=; b=RZeY3m5INpSN/TKHjR3HW3dRevudrb/K3AISYKXdNFoCSUqUrQFX9O5/naApLAdlwU IM6/dkOHKdZI6AYus59zJa83J2YmLeEhYXVE0zE9XiC6yBsLbR3TT4i3OhimaKAFEQVN axbGm8pZNxGxLgL9vTDAnbNgWWQ/GD3aebnmQYVg0nSFXoO/dr+ouGBhMlAnqFMJf3+R VVjhBBFIzY5EuiVaI9K2vIwggl4FEbOtERQLBg+La0fo1S4Xw5pfKHk1I4SxsRJqqjvU gdCmQTOuzX0BFKYuo3UI5Iwrwefr6DiBhB1LIrxJ2GYdsikJ4DFugcGC8Rw5OdhrBGzz AMkQ== MIME-Version: 1.0 Received: by 10.66.87.138 with SMTP id ay10mr2270708pab.38.1342641359106; Wed, 18 Jul 2012 12:55:59 -0700 (PDT) Received: by 10.142.150.15 with HTTP; Wed, 18 Jul 2012 12:55:59 -0700 (PDT) Date: Wed, 18 Jul 2012 15:55:59 -0400 Message-ID: Subject: Re: Cloudbridge SetOfferMapping [SOLVED] From: sebastien goasguen To: cloudstack-users@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 On Wed, Jul 18, 2012 at 3:50 PM, sebastien goasguen wrote: > On Wed, Jul 18, 2012 at 2:00 PM, Chiradeep Vittal > wrote: >> It also looks like you need to escape the ampersand or surround with >> quotes. -- your shell created 2 background jobs. >> >> On 7/18/12 10:52 AM, "Prachi Damle" wrote: >> >>>Hi Sebastien. >>> >>>Seems docs need to be corrected. Looking at the authentication code, I >>>see that the REST query also needs: >>>1. AWSAccessKeyId (CS API key of the user) >>>2. Signature >>>3. SignatureMethod ("HmacSHA256" or "HmacSHA1") >>>4. Version (wsdlVersion mentioned I the ec2-service.properties of your >>>installation) >>>5. SignatureVersion (=2) >>>6. Timestamp (date and time at which the request is SIGNED) >>> >>> >>> >>>But from the output of the cloud-setup-bridge cmd that you have pasted, >>>your service offering looks already mapped: >>> >>>>>>Service offering ID for m1.small >>>>>>[ef2537ad-c70f-11e1-821b-0800277e749c]: >>>>>>Service offering ID for m1.large [2]: >>> >>>The value enclosed within [] is the offering ID mapping existing in the >>>DB. >>>If you run cloud-setup-bridge again and enter a new ID, the existing >>>mapping will be overwritten. >>> >>>You can check following table in your DB to see if the mapping is set: >>>SELECT * FROM offering_bundle; >>> >>> >>>Also, If you happen to use CS 3.0.3 later, EC2 is installed along with CS >>>and you can create EC2 offerings through CS UI. >>> >>>Thanks, >>>Prachi >>> >>>-----Original Message----- >>>From: sebastien goasguen [mailto:runseb@gmail.com] >>>Sent: Wednesday, July 18, 2012 10:18 AM >>>To: cloudstack-users@incubator.apache.org >>>Subject: Cloudbridge SetOfferMapping >>> >>>HI, >>> >>>I am trying to register a service offering in cloudbridge (CS 3.0.2, >>>cloudbridge 1.1.2), to map m1.small instance type to a service offering >>>id. >>>According to >>>http://docs.cloud.com/CloudBridge_Documentation/Utility_Commands_for_Cloud >>>Bridge >>> >>>I did: >>> >>>curl >>>http://192.168.56.103:8090/bridge/rest/AmazonEC2?Action=SetOfferMapping&am >>>azonoffer=m1.small&cloudoffer=ef2537ad-c70f-11e1-821b-0800277e749c >>>[1] 10596 >>>[2] 10597 >>>yoyo:citrix runseb$ Apache Tomcat/6.0.35 - Error >>>report

HTTP Status 530 - Missing >>>AWSAccessKeyId parameter


>>noshade="noshade">

type Status report

message >>>Missing AWSAccessKeyId parameter

description >>>Cannot find message associated with key http.530


>>noshade="noshade">

Apache Tomcat/6.0.35

>>>[1]- Done curl >>>http://192.168.56.103:8090/bridge/rest/AmazonEC2?Action=SetOfferMapping >>>[2]+ Done amazonoffer=m1.small >>> >>>Do I need to add the key ? the docs don't mention it. >>> >>>I also set the mapping with cloud-setup-bridge cmd: >>> >>>[root@manager sebgoa]# cloud-setup-bridge Welcome to the CloudBridge >>>setup. >>>Enter suitable values or press enter for default. >>> >>>Management server hostname or IP [192.168.56.102]: >>>Management server port [8080]: >>>Service offering ID for m1.small [ef2537ad-c70f-11e1-821b-0800277e749c]: >>>Service offering ID for m1.large [2]: >>> >>>But that does not seem to work either. >>> >>>-- >>>--- > > I got the call properly figure out but now I get a db error: > > 2012-07-18 15:26:20,812 INFO [bridge.service.EC2RestServlet] > (catalina-exec-6:) Request queryString: > AWSAccessKeyId=wHTzTA7o36L9atVVkTSeT7dqXYCnC_3CT4KlhdZtPsLiL_-x0vhM94vrnYz9CYZhsfL74dHl4HRW > nyAsKS2ecA&Action=SetOfferMapping&SignatureMethod=HmacSHA1&SignatureVersion=2&Timestamp=2012-07-18T15:46:03Z&Version=2010-11-15&amazonoffer=m1.small&cloudoffer=ef2537ad-c70f-11e1-821b-0800277e7 > 49c&Signature=uJbDxiVQ02UxoFsdU84ducVKjfE%3D > 2012-07-18 15:26:20,812 INFO [bridge.service.EC2RestServlet] > (catalina-exec-6:) Request requestURI: /bridge/rest/AmazonEC2 > 2012-07-18 15:26:20,812 INFO [bridge.service.EC2RestServlet] > (catalina-exec-6:) Request requestURL: > http://192.168.56.103:8090/bridge/rest/AmazonEC2 > 2012-07-18 15:26:20,812 INFO [bridge.service.EC2RestServlet] > (catalina-exec-6:) Request servletPath: /rest/AmazonEC2 > 2012-07-18 15:26:20,812 INFO [bridge.service.EC2RestServlet] > (catalina-exec-6:) Request header host:192.168.56.103:8090 > 2012-07-18 15:26:20,813 INFO [bridge.service.EC2RestServlet] > (catalina-exec-6:) Request header user-agent:Python-urllib/1.17 > 2012-07-18 15:26:20,813 INFO [bridge.service.EC2RestServlet] > (catalina-exec-6:) Request parameter amazonoffer:m1.small > 2012-07-18 15:26:20,813 INFO [bridge.service.EC2RestServlet] > (catalina-exec-6:) Request parameter Action:SetOfferMapping > 2012-07-18 15:26:20,813 INFO [bridge.service.EC2RestServlet] > (catalina-exec-6:) Request parameter > cloudoffer:ef2537ad-c70f-11e1-821b-0800277e749c > 2012-07-18 15:26:20,813 INFO [bridge.service.EC2RestServlet] > (catalina-exec-6:) Request parameter SignatureMethod:HmacSHA1 > 2012-07-18 15:26:20,813 INFO [bridge.service.EC2RestServlet] > (catalina-exec-6:) Request parameter > AWSAccessKeyId:wHTzTA7o36L9atVVkTSeT7dqXYCnC_3CT4KlhdZtPsLiL_-x0vhM94vrnYz9CYZhsfL74dHl4HRWnyA > sKS2ecA > 2012-07-18 15:26:20,814 INFO [bridge.service.EC2RestServlet] > (catalina-exec-6:) Request parameter Version:2010-11-15 > 2012-07-18 15:26:20,814 INFO [bridge.service.EC2RestServlet] > (catalina-exec-6:) Request parameter SignatureVersion:2 > 2012-07-18 15:26:20,814 INFO [bridge.service.EC2RestServlet] > (catalina-exec-6:) Request parameter > Signature:uJbDxiVQ02UxoFsdU84ducVKjfE= > 2012-07-18 15:26:20,814 INFO [bridge.service.EC2RestServlet] > (catalina-exec-6:) Request parameter Timestamp:2012-07-18T15:46:03Z > 2012-07-18 15:26:20,822 DEBUG [bridge.service.UserContext] > (catalina-exec-6:) initializing a new [anonymous] UserContext! > 2012-07-18 15:26:20,829 ERROR [bridge.service.EC2RestServlet] > (catalina-exec-6:) SetOfferMapping Data truncation: Data too long for > column 'CloudStackOffering' at row 1 > com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for > column 'CloudStackOffering' at row 1 > > Thanks to Jose Rozanec for the solution: mysql> drop table offering_bundle; Query OK, 0 rows affected (0.01 sec) mysql> CREATE TABLE `offering_bundle` (`ID` int(11) NOT NULL AUTO_INCREMENT,`AmazonEC2Offering` varchar(100) NOT NULL,`CloudStackOffering` varchar(100) NOT NULL,PRIMARY KEY (`ID`),UNIQUE KEY `one_offering` (`AmazonEC2Offering`)) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; Query OK, 0 rows affected (0.01 sec) mysql> select * from offering_bundle; +----+-------------------+--------------------------------------+ | ID | AmazonEC2Offering | CloudStackOffering | +----+-------------------+--------------------------------------+ | 2 | m1.small | ef2537ad-c70f-11e1-821b-0800277e749c | +----+-------------------+--------------------------------------+ 1 row in set (0.00 sec) mysql> Is there a bug filed for this ? -- --- Sebastien Goasguen Open Source Cloud Evangelist, Cloudstack http://sites.google.com/site/runseb/