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 737909B19 for ; Wed, 18 Jul 2012 19:50:31 +0000 (UTC) Received: (qmail 22253 invoked by uid 500); 18 Jul 2012 19:50:31 -0000 Delivered-To: apmail-incubator-cloudstack-users-archive@incubator.apache.org Received: (qmail 22221 invoked by uid 500); 18 Jul 2012 19:50:31 -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 22212 invoked by uid 99); 18 Jul 2012 19:50:31 -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:50:31 +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.213.47 as permitted sender) Received: from [209.85.213.47] (HELO mail-yw0-f47.google.com) (209.85.213.47) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2012 19:50:25 +0000 Received: by yhjj56 with SMTP id j56so1862483yhj.6 for ; Wed, 18 Jul 2012 12:50:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=bLNJ01qou69NwuAYf/8DwYoAHTcfZwOYgWXBnJ+AVT0=; b=sP3FZoR+0z2fIKVkMXaZXcr1qlBZFObNCMHqexLqHWf1XqiCDipmL4oEWkM0VPF4+g toSDynKPtGU+xy1u5lDjGnOBhjQIn+xA5LQ2SSmthT7xf80QYDRpsB3XEoG8H5yWvJ0n F5NyYYb0xBGoDFh1PZOaIt1X2EO2+CF2w7LjABOarSocuwJsOyPvv96voJyAJf0UzkkU KY6PrV6CginPGNL4Q07mLne61k2YU2qbu3m23fKCD29TaZbF3WTgNDEOCOVkTCZ7/yM7 5bXLC3xSOjv4yIpXFlO+4mn2ylJzt4r4oJKC9MyIatsgpH942X9VD3LAkm6fWLGFsaJO OhMA== MIME-Version: 1.0 Received: by 10.66.73.202 with SMTP id n10mr692415pav.80.1342641003434; Wed, 18 Jul 2012 12:50:03 -0700 (PDT) Received: by 10.142.150.15 with HTTP; Wed, 18 Jul 2012 12:50:03 -0700 (PDT) In-Reply-To: References: <7A92FF96DF135843B4B608FB576BFC3E012D9C53B610@SJCPMAILBOX01.citrite.net> Date: Wed, 18 Jul 2012 15:50:03 -0400 Message-ID: Subject: Re: Cloudbridge SetOfferMapping From: sebastien goasguen To: cloudstack-users@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 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 -- --- Sebastien Goasguen Open Source Cloud Evangelist, Cloudstack http://sites.google.com/site/runseb/