Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 4.0.0
    • Fix Version/s: 4.0.0
    • Component/s: Management Server
    • Security Level: Public (Anyone can view this level - this is the default.)
    • Labels:
      None
    • Environment:

      Description

      Install management server rhel 6.3.
      Set up a basic zone.

      Set enable.ec2.api=true

      Restart management server.

      1. Create a user and generate

      • Your account's API key and Secret key
        2. Generate a private key and a self-signed X.509 certificate.
        $ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /path/to/private_key.pem -out /path/to/cert.pem

      3. Register the mapping from the X.509 certificate to your accounts API keys with CloudStack using cloudstack-aws-api-register script.

      $ cloudstack-aws-api-register --apikey=<User’s Cloudstack API key> --secretkey=<User’s CloudStack Secret key> --cert=</path/to/cert.pem> --url=http://<cloud-stack-server>:7080/awsapi

      user registeration succeeds.

      4.Setup the necessary environment variables for the EC2 tools.

      $ export EC2_ACCESS_KEY=<CloudStack API key>
      $ export EC2_SECRET_KEY=<CloudStack Secret key>
      $ export EC2_CERT=/path/to/cert.pem
      $ export EC2_PRIVATE_KEY=/path/to/private_key.pem
      $ export EC2_URL=http://cloud-stack-hostname:7080/awsapi
      $export EC2_HOME=/path/to/EC2_installation_directory

      Now try to make any SOAP api call.
      /root/ec2tool/ec2-api-tools-1.3-62308/bin
      . ./setup.sh

      I see the following exception :

      [root@Host41-4 bin]# ./ec2-describe-images
      Unexpected error:
      org.codehaus.xfire.fault.XFireFault: Unexpected close tag </body>; expected </HR>.
      at [row,col

      {unknown-source}]: [31,187]
      at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
      at org.codehaus.xfire.client.Client.onReceive(Client.java:410)
      at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.j ava:139)
      at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
      at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java: 26)
      at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:13 1)
      at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
      at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
      at org.codehaus.xfire.client.Client.invoke(Client.java:336)
      at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
      at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
      at $Proxy12.describeImages(Unknown Source)
      at com.amazon.aes.webservices.client.Jec2.describeImages(Jec2.java:529)
      at com.amazon.aes.webservices.client.cmd.DescribeImages.invokeOnline(Describ eImages.java:157)
      at com.amazon.aes.webservices.client.cmd.BaseCmd.invoke(BaseCmd.java:795)
      at com.amazon.aes.webservices.client.cmd.DescribeImages.main(DescribeImages. java:181)
      Caused by: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </body>; expe cted </HR>.
      at [row,col {unknown-source}

      ]: [31,187]
      at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:60 5)
      at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:461)
      at com.ctc.wstx.sr.BasicStreamReader.reportWrongEndElem(BasicStreamReader.ja va:3256)
      at com.ctc.wstx.sr.BasicStreamReader.readEndElem(BasicStreamReader.java:3198 )
      at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:283 0)
      at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
      at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHand ler.java:44)
      at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:13 1)
      at org.codehaus.xfire.client.Client.onReceive(Client.java:406)
      ... 14 more

      In catalina.out , I see the following error:

      java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/resolver/URIResolver
      at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:516)
      at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:436)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
      at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:809)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:615)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
      at com.cloud.bridge.service.EC2MainServlet.doGetOrPost(EC2MainServlet.java:102)
      at com.cloud.bridge.service.EC2MainServlet.doPost(EC2MainServlet.java:77)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
      at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2268)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:679)

        Activity

        Sangeetha Hariharan created issue -
        Hide
        Prachi Damle added a comment -

        The error suggests we are missing a thirdparty jar

        java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/resolver/URIResolver

        XmlSchema-1.4.3.jar is missing in the packaging.

        This should be present in the WEB-INF/lib of webapps7080/awsapi folder.

        Show
        Prachi Damle added a comment - The error suggests we are missing a thirdparty jar java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/resolver/URIResolver XmlSchema-1.4.3.jar is missing in the packaging. This should be present in the WEB-INF/lib of webapps7080/awsapi folder.
        Hide
        Prachi Damle added a comment -

        Rohit,

        Can you fix the build script to include this jar?

        Show
        Prachi Damle added a comment - Rohit, Can you fix the build script to include this jar?
        Prachi Damle made changes -
        Field Original Value New Value
        Assignee Rohit Yadav [ bhaisaab ]
        Hide
        Chip Childers added a comment -

        Bumping up to blocker. This is a significant defect for the AWS API feature.

        Show
        Chip Childers added a comment - Bumping up to blocker. This is a significant defect for the AWS API feature.
        Chip Childers made changes -
        Priority Critical [ 2 ] Blocker [ 1 ]
        Sangeetha Hariharan made changes -
        Comment [ Full management-server , awsapi and catalina.out are present in 10.223.110.232:/export/home/sangeetha/292 ]
        Sangeetha Hariharan made changes -
        Environment Tested with:

        Git Revision: 434c69ac7c2139247eef0c3c41738e5f6d62b87f
        Git URL: https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git
        Tested with:

        Git Revision: 434c69ac7c2139247eef0c3c41738e5f6d62b87f
        Git URL: https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git

        Tested on management-server on rhen 6.3.
        Sangeetha Hariharan made changes -
        Description Install management server.

        Set enable.ec2.api=true

        Restart management server.


        1. Create a user and generate
        - Your account's API key and Secret key
        2. Generate a private key and a self-signed X.509 certificate.
        $ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /path/to/private_key.pem -out /path/to/cert.pem

        3. Register the mapping from the X.509 certificate to your accounts API keys with CloudStack using cloudstack-aws-api-register script.

        $ cloudstack-aws-api-register --apikey=<User’s Cloudstack API key> --secretkey=<User’s CloudStack Secret key> --cert=</path/to/cert.pem> --url=http://&lt;cloud-stack-server&gt;:8080/awsapi

        user registeration succeeds.
         
        4.Setup the necessary environment variables for the EC2 tools.

        $ export EC2_ACCESS_KEY=<CloudStack API key>
        $ export EC2_SECRET_KEY=<CloudStack Secret key>
        $ export EC2_CERT=/path/to/cert.pem
        $ export EC2_PRIVATE_KEY=/path/to/private_key.pem
        $ export EC2_URL=http://cloud-stack-hostname:8080/awsapi
        $export EC2_HOME=/path/to/EC2_installation_directory

        Now try to make any SOAP api call.
        /root/ec2tool/ec2-api-tools-1.3-62308/bin
        . ./setup.sh

        I see the following exception :

        [root@Host41-4 bin]# ./ec2-describe-images
        Unexpected error:
        org.codehaus.xfire.fault.XFireFault: Unexpected close tag </body>; expected </HR>.
        at [row,col {unknown-source}]: [31,187]
                at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
                at org.codehaus.xfire.client.Client.onReceive(Client.java:410)
                at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.j ava:139)
                at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
                at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java: 26)
                at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:13 1)
                at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
                at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
                at org.codehaus.xfire.client.Client.invoke(Client.java:336)
                at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
                at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
                at $Proxy12.describeImages(Unknown Source)
                at com.amazon.aes.webservices.client.Jec2.describeImages(Jec2.java:529)
                at com.amazon.aes.webservices.client.cmd.DescribeImages.invokeOnline(Describ eImages.java:157)
                at com.amazon.aes.webservices.client.cmd.BaseCmd.invoke(BaseCmd.java:795)
                at com.amazon.aes.webservices.client.cmd.DescribeImages.main(DescribeImages. java:181)
        Caused by: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </body>; expe cted </HR>.
        at [row,col {unknown-source}]: [31,187]
                at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:60 5)
                at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:461)
                at com.ctc.wstx.sr.BasicStreamReader.reportWrongEndElem(BasicStreamReader.ja va:3256)
                at com.ctc.wstx.sr.BasicStreamReader.readEndElem(BasicStreamReader.java:3198 )
                at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:283 0)
                at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
                at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHand ler.java:44)
                at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:13 1)
                at org.codehaus.xfire.client.Client.onReceive(Client.java:406)
                ... 14 more

        In catalina.out , I see the following error:


        java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/resolver/URIResolver
                at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:516)
                at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:436)
                at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
                at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:809)
                at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:615)
                at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
                at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
                at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
                at com.cloud.bridge.service.EC2MainServlet.doGetOrPost(EC2MainServlet.java:102)
                at com.cloud.bridge.service.EC2MainServlet.doPost(EC2MainServlet.java:77)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
                at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
                at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721)
                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2268)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
                at java.lang.Thread.run(Thread.java:679)
        Install management server rhel 6.3.
        Set up a basic zone.

        Set enable.ec2.api=true

        Restart management server.


        1. Create a user and generate
        - Your account's API key and Secret key
        2. Generate a private key and a self-signed X.509 certificate.
        $ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /path/to/private_key.pem -out /path/to/cert.pem

        3. Register the mapping from the X.509 certificate to your accounts API keys with CloudStack using cloudstack-aws-api-register script.

        $ cloudstack-aws-api-register --apikey=<User’s Cloudstack API key> --secretkey=<User’s CloudStack Secret key> --cert=</path/to/cert.pem> --url=http://&lt;cloud-stack-server&gt;:8080/awsapi

        user registeration succeeds.
         
        4.Setup the necessary environment variables for the EC2 tools.

        $ export EC2_ACCESS_KEY=<CloudStack API key>
        $ export EC2_SECRET_KEY=<CloudStack Secret key>
        $ export EC2_CERT=/path/to/cert.pem
        $ export EC2_PRIVATE_KEY=/path/to/private_key.pem
        $ export EC2_URL=http://cloud-stack-hostname:8080/awsapi
        $export EC2_HOME=/path/to/EC2_installation_directory

        Now try to make any SOAP api call.
        /root/ec2tool/ec2-api-tools-1.3-62308/bin
        . ./setup.sh

        I see the following exception :

        [root@Host41-4 bin]# ./ec2-describe-images
        Unexpected error:
        org.codehaus.xfire.fault.XFireFault: Unexpected close tag </body>; expected </HR>.
        at [row,col {unknown-source}]: [31,187]
                at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
                at org.codehaus.xfire.client.Client.onReceive(Client.java:410)
                at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.j ava:139)
                at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
                at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java: 26)
                at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:13 1)
                at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
                at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
                at org.codehaus.xfire.client.Client.invoke(Client.java:336)
                at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
                at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
                at $Proxy12.describeImages(Unknown Source)
                at com.amazon.aes.webservices.client.Jec2.describeImages(Jec2.java:529)
                at com.amazon.aes.webservices.client.cmd.DescribeImages.invokeOnline(Describ eImages.java:157)
                at com.amazon.aes.webservices.client.cmd.BaseCmd.invoke(BaseCmd.java:795)
                at com.amazon.aes.webservices.client.cmd.DescribeImages.main(DescribeImages. java:181)
        Caused by: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </body>; expe cted </HR>.
        at [row,col {unknown-source}]: [31,187]
                at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:60 5)
                at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:461)
                at com.ctc.wstx.sr.BasicStreamReader.reportWrongEndElem(BasicStreamReader.ja va:3256)
                at com.ctc.wstx.sr.BasicStreamReader.readEndElem(BasicStreamReader.java:3198 )
                at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:283 0)
                at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
                at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHand ler.java:44)
                at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:13 1)
                at org.codehaus.xfire.client.Client.onReceive(Client.java:406)
                ... 14 more

        In catalina.out , I see the following error:


        java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/resolver/URIResolver
                at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:516)
                at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:436)
                at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
                at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:809)
                at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:615)
                at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
                at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
                at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
                at com.cloud.bridge.service.EC2MainServlet.doGetOrPost(EC2MainServlet.java:102)
                at com.cloud.bridge.service.EC2MainServlet.doPost(EC2MainServlet.java:77)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
                at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
                at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721)
                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2268)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
                at java.lang.Thread.run(Thread.java:679)
        Sangeetha Hariharan made changes -
        Description Install management server rhel 6.3.
        Set up a basic zone.

        Set enable.ec2.api=true

        Restart management server.


        1. Create a user and generate
        - Your account's API key and Secret key
        2. Generate a private key and a self-signed X.509 certificate.
        $ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /path/to/private_key.pem -out /path/to/cert.pem

        3. Register the mapping from the X.509 certificate to your accounts API keys with CloudStack using cloudstack-aws-api-register script.

        $ cloudstack-aws-api-register --apikey=<User’s Cloudstack API key> --secretkey=<User’s CloudStack Secret key> --cert=</path/to/cert.pem> --url=http://&lt;cloud-stack-server&gt;:8080/awsapi

        user registeration succeeds.
         
        4.Setup the necessary environment variables for the EC2 tools.

        $ export EC2_ACCESS_KEY=<CloudStack API key>
        $ export EC2_SECRET_KEY=<CloudStack Secret key>
        $ export EC2_CERT=/path/to/cert.pem
        $ export EC2_PRIVATE_KEY=/path/to/private_key.pem
        $ export EC2_URL=http://cloud-stack-hostname:8080/awsapi
        $export EC2_HOME=/path/to/EC2_installation_directory

        Now try to make any SOAP api call.
        /root/ec2tool/ec2-api-tools-1.3-62308/bin
        . ./setup.sh

        I see the following exception :

        [root@Host41-4 bin]# ./ec2-describe-images
        Unexpected error:
        org.codehaus.xfire.fault.XFireFault: Unexpected close tag </body>; expected </HR>.
        at [row,col {unknown-source}]: [31,187]
                at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
                at org.codehaus.xfire.client.Client.onReceive(Client.java:410)
                at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.j ava:139)
                at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
                at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java: 26)
                at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:13 1)
                at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
                at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
                at org.codehaus.xfire.client.Client.invoke(Client.java:336)
                at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
                at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
                at $Proxy12.describeImages(Unknown Source)
                at com.amazon.aes.webservices.client.Jec2.describeImages(Jec2.java:529)
                at com.amazon.aes.webservices.client.cmd.DescribeImages.invokeOnline(Describ eImages.java:157)
                at com.amazon.aes.webservices.client.cmd.BaseCmd.invoke(BaseCmd.java:795)
                at com.amazon.aes.webservices.client.cmd.DescribeImages.main(DescribeImages. java:181)
        Caused by: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </body>; expe cted </HR>.
        at [row,col {unknown-source}]: [31,187]
                at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:60 5)
                at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:461)
                at com.ctc.wstx.sr.BasicStreamReader.reportWrongEndElem(BasicStreamReader.ja va:3256)
                at com.ctc.wstx.sr.BasicStreamReader.readEndElem(BasicStreamReader.java:3198 )
                at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:283 0)
                at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
                at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHand ler.java:44)
                at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:13 1)
                at org.codehaus.xfire.client.Client.onReceive(Client.java:406)
                ... 14 more

        In catalina.out , I see the following error:


        java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/resolver/URIResolver
                at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:516)
                at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:436)
                at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
                at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:809)
                at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:615)
                at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
                at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
                at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
                at com.cloud.bridge.service.EC2MainServlet.doGetOrPost(EC2MainServlet.java:102)
                at com.cloud.bridge.service.EC2MainServlet.doPost(EC2MainServlet.java:77)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
                at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
                at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721)
                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2268)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
                at java.lang.Thread.run(Thread.java:679)
        Install management server rhel 6.3.
        Set up a basic zone.

        Set enable.ec2.api=true

        Restart management server.


        1. Create a user and generate
        - Your account's API key and Secret key
        2. Generate a private key and a self-signed X.509 certificate.
        $ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /path/to/private_key.pem -out /path/to/cert.pem

        3. Register the mapping from the X.509 certificate to your accounts API keys with CloudStack using cloudstack-aws-api-register script.

        $ cloudstack-aws-api-register --apikey=<User’s Cloudstack API key> --secretkey=<User’s CloudStack Secret key> --cert=</path/to/cert.pem> --url=http://&lt;cloud-stack-server&gt;:7080/awsapi

        user registeration succeeds.
         
        4.Setup the necessary environment variables for the EC2 tools.

        $ export EC2_ACCESS_KEY=<CloudStack API key>
        $ export EC2_SECRET_KEY=<CloudStack Secret key>
        $ export EC2_CERT=/path/to/cert.pem
        $ export EC2_PRIVATE_KEY=/path/to/private_key.pem
        $ export EC2_URL=http://cloud-stack-hostname:7080/awsapi
        $export EC2_HOME=/path/to/EC2_installation_directory

        Now try to make any SOAP api call.
        /root/ec2tool/ec2-api-tools-1.3-62308/bin
        . ./setup.sh

        I see the following exception :

        [root@Host41-4 bin]# ./ec2-describe-images
        Unexpected error:
        org.codehaus.xfire.fault.XFireFault: Unexpected close tag </body>; expected </HR>.
        at [row,col {unknown-source}]: [31,187]
                at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
                at org.codehaus.xfire.client.Client.onReceive(Client.java:410)
                at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.j ava:139)
                at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
                at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java: 26)
                at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:13 1)
                at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
                at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
                at org.codehaus.xfire.client.Client.invoke(Client.java:336)
                at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
                at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
                at $Proxy12.describeImages(Unknown Source)
                at com.amazon.aes.webservices.client.Jec2.describeImages(Jec2.java:529)
                at com.amazon.aes.webservices.client.cmd.DescribeImages.invokeOnline(Describ eImages.java:157)
                at com.amazon.aes.webservices.client.cmd.BaseCmd.invoke(BaseCmd.java:795)
                at com.amazon.aes.webservices.client.cmd.DescribeImages.main(DescribeImages. java:181)
        Caused by: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </body>; expe cted </HR>.
        at [row,col {unknown-source}]: [31,187]
                at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:60 5)
                at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:461)
                at com.ctc.wstx.sr.BasicStreamReader.reportWrongEndElem(BasicStreamReader.ja va:3256)
                at com.ctc.wstx.sr.BasicStreamReader.readEndElem(BasicStreamReader.java:3198 )
                at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:283 0)
                at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
                at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHand ler.java:44)
                at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:13 1)
                at org.codehaus.xfire.client.Client.onReceive(Client.java:406)
                ... 14 more

        In catalina.out , I see the following error:


        java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/resolver/URIResolver
                at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:516)
                at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:436)
                at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
                at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:809)
                at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:615)
                at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
                at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
                at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
                at com.cloud.bridge.service.EC2MainServlet.doGetOrPost(EC2MainServlet.java:102)
                at com.cloud.bridge.service.EC2MainServlet.doPost(EC2MainServlet.java:77)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
                at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
                at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721)
                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2268)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
                at java.lang.Thread.run(Thread.java:679)
        Hide
        Rohit Yadav added a comment -

        I checked, frank already added this artifact with new build. Pl. test/verify using latest build.

        Show
        Rohit Yadav added a comment - I checked, frank already added this artifact with new build. Pl. test/verify using latest build.
        Hide
        sebastien goasguen added a comment -

        The first description made references to port 8080 ? was this a typo or did you switch to using port 7080 ?

        Show
        sebastien goasguen added a comment - The first description made references to port 8080 ? was this a typo or did you switch to using port 7080 ?
        Hide
        Rohit Yadav added a comment -

        Sebastien, what I understand is that there is an awsapi servlet that listens on port 7080 and has its own directory, is a separate wrapper/middleware that simply forwards requests to 8080 of mgmt server. I think that's why Edison wanted it to be separated out as a rpm/deb or a repository.

        We need to document this maybe (if not done already):

        Show
        Rohit Yadav added a comment - Sebastien, what I understand is that there is an awsapi servlet that listens on port 7080 and has its own directory, is a separate wrapper/middleware that simply forwards requests to 8080 of mgmt server. I think that's why Edison wanted it to be separated out as a rpm/deb or a repository. We need to document this maybe (if not done already): Enable port 7080, configure IPtables rules: http://bugs.cloudstack.org/browse/CS-15455 AWSAPI is not part of CloudStack, it's a separate servelet which listens on 7080 and forwards request to 8080 like any other CloudStack client: http://bugs.cloudstack.org/browse/CS-15373
        Hide
        Rohit Yadav added a comment -

        Applied in 4.0;
        From 9b53150cf5e234453d2ba216da218b1ad56fc321 Mon Sep 17 00:00:00 2001
        From: Rohit Yadav <bhaisaab@apache.org>
        Date: Tue, 9 Oct 2012 16:20:03 +0530
        Subject: [PATCH] CLOUDSTACK-292: Add missing jars to cloud-deps

        • fixes axiom-impl version to avoid class load exception
        • with copying of libs is not done in cloud.spec anymore, add jars to
          cloud-deps
        • make aws-api package depend on cloud-deps
        Show
        Rohit Yadav added a comment - Applied in 4.0; From 9b53150cf5e234453d2ba216da218b1ad56fc321 Mon Sep 17 00:00:00 2001 From: Rohit Yadav <bhaisaab@apache.org> Date: Tue, 9 Oct 2012 16:20:03 +0530 Subject: [PATCH] CLOUDSTACK-292 : Add missing jars to cloud-deps fixes axiom-impl version to avoid class load exception with copying of libs is not done in cloud.spec anymore, add jars to cloud-deps make aws-api package depend on cloud-deps
        Rohit Yadav made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Rohit Yadav made changes -
        Fix Version/s 4.0.0 [ 12323251 ]
        Hide
        Rohit Yadav added a comment -

        One more patch applied:
        From 1ead1730b42564036b8d4ad70d96433732c88bf7 Mon Sep 17 00:00:00 2001
        From: Rohit Yadav <bhaisaab@apache.org>
        Date: Tue, 9 Oct 2012 19:05:25 +0530
        Subject: [PATCH] CLOUDSTACK-292: Add commons-fileupload to cloud-deps

        Tested and verifed by Swamy (he does not have permission to close this bug, so closing on his behalf.) using the build #522 http://jenkins.cloudstack.org/job/build-4.0-rhel63/522/

        Show
        Rohit Yadav added a comment - One more patch applied: From 1ead1730b42564036b8d4ad70d96433732c88bf7 Mon Sep 17 00:00:00 2001 From: Rohit Yadav <bhaisaab@apache.org> Date: Tue, 9 Oct 2012 19:05:25 +0530 Subject: [PATCH] CLOUDSTACK-292 : Add commons-fileupload to cloud-deps Tested and verifed by Swamy (he does not have permission to close this bug, so closing on his behalf.) using the build #522 http://jenkins.cloudstack.org/job/build-4.0-rhel63/522/
        Rohit Yadav made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Sudha Ponnaganti added a comment - - edited

        swamy validated the following.

        [root@rhel64 bin]# ./ec2-run-instances ef7fbe39-9006-4cc1-8a01-7cc497faffcf -n 1 --availability-zone zone2

        ./ec2-stop-instances f39fea4e-4563-471b-b6d2-57b175aec769

        ./ec2-start-instances f39fea4e-4563-471b-b6d2-57b175aec769 --connection-timeout 120 --request-timeout 120

        ./ec2-terminate-instances f39fea4e-4563-471b-b6d2-57b175aec769 --connection-timeout 120 --request-timeout 120

        ./ec2-add-group test -d 'testing'

        ./ec2-authorizep test -P tcp -p 22 -s 0.0.0.0/0

        ./ec2-run-instances ef7fbe39-9006-4cc1-8a01-7cc497faffcf -n 1 --availability-zone zone2 -g test

        ./ec2-describe-group
        ./ec2-delete-group test2
        ./ec2-revoke test -P tcp -p 22 -s 0.0.0.0/0

        [root@rhel64 bin]# ./ec2-create-volume -s 5 --availability-zone zone2
        VOLUME e6e0a648-e5bc-4356-8f13-01c91822cfba 5 zone2 Allocated 2012-10-09T20:17:47+0530
        [root@rhel64 bin]# ./ec2-attach-volume e6e0a648-e5bc-4356-8f13-01c91822cfba -i 09693ad4-a87e-460a-9186-e95cb79c34b5
        Required option '-d, --device DEVICE' missing (-h for usage)
        [root@rhel64 bin]# ./ec2-attach-volume e6e0a648-e5bc-4356-8f13-01c91822cfba -i 09693ad4-a87e-460a-9186-e95cb79c34b5 -d /dev/sdb
        ATTACHMENT e6e0a648-e5bc-4356-8f13-01c91822cfba 09693ad4-a87e-460a-9186-e95cb79c34b5 /dev/sdb Ready 2012-10-09T20:19:00+0530
        [root@rhel64 bin]# ./ec2-detach-volume e6e0a648-e5bc-4356-8f13-01c91822cfba
        ATTACHMENT e6e0a648-e5bc-4356-8f13-01c91822cfba Ready 1970-02-01T20:19:40+0530
        [root@rhel64 bin]# ./ec2-describe-volumes
        VOLUME e6e0a648-e5bc-4356-8f13-01c91822cfba 5 zone2 available 2012-10-09T20:17:47+0530
        TAG volume e6e0a648-e5bc-4356-8f13-01c91822cfba
        VOLUME 51c57af7-509c-4470-8612-bc8ab60e7d07 20 zone2 available 2012-10-09T20:09:19+0530
        ATTACHMENT 51c57af7-509c-4470-8612-bc8ab60e7d07 09693ad4-a87e-460a-9186-e95cb79c34b5 0 attached 2012-10-09T20:09:19+0530
        TAG volume 51c57af7-509c-4470-8612-bc8ab60e7d07
        VOLUME 81e2e326-5130-4317-ad3d-e56ee6e83e97 20 zone2 available 2012-10-09T19:49:34+0530
        ATTACHMENT 81e2e326-5130-4317-ad3d-e56ee6e83e97 f39fea4e-4563-471b-b6d2-57b175aec769 0 detached 2012-10-09T19:49:34+0530
        TAG volume 81e2e326-5130-4317-ad3d-e56ee6e83e97
        [root@rhel64 bin]#

        [root@rhel64 bin]# ./ec2-delete-volume e6e0a648-e5bc-4356-8f13-01c91822cfba
        VOLUME e6e0a648-e5bc-4356-8f13-01c91822cfba
        [root@rhel64 bin]# ./ec2-describe-volumes
        VOLUME 51c57af7-509c-4470-8612-bc8ab60e7d07 20 zone2 available 2012-10-09T20:09:19+0530
        ATTACHMENT 51c57af7-509c-4470-8612-bc8ab60e7d07 09693ad4-a87e-460a-9186-e95cb79c34b5 0 attached 2012-10-09T20:09:19+0530
        TAG volume 51c57af7-509c-4470-8612-bc8ab60e7d07
        VOLUME 81e2e326-5130-4317-ad3d-e56ee6e83e97 20 zone2 available 2012-10-09T19:49:34+0530
        ATTACHMENT 81e2e326-5130-4317-ad3d-e56ee6e83e97 f39fea4e-4563-471b-b6d2-57b175aec769 0 detached 2012-10-09T19:49:34+0530
        TAG volume 81e2e326-5130-4317-ad3d-e56ee6e83e97
        [root@rhel64 bin]#

        [root@rhel64 bin]# ./ec2-create-snapshot 0e1002dc-7e55-4e29-baa6-308ac0e60de8
        Read timeout. Please try again later. If this persists please visit the
        AWS developer forums to see if it's the result of a known issue.
        [root@rhel64 bin]# ./ec2-describe-snapshots
        SNAPSHOT 2adc695e-7440-44d8-94bb-3d27f7105b15 0e1002dc-7e55-4e29-baa6-308ac0e60de8 completed 2012-10-09T20:22:49+0530 100% 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:admin 10 09693ad4-a87e-460a-9186-e95cb79c34b5_a4d27b7f-29d4-4df7-9af8-78e0961a7381_20121009145249
        TAG snapshot 2adc695e-7440-44d8-94bb-3d27f7105b15
        [root@rhel64 bin]# ./ec2-delete-snapshot 2adc695e-7440-44d8-94bb-3d27f7105b15
        SNAPSHOT 2adc695e-7440-44d8-94bb-3d27f7105b15
        [root@rhel64 bin]# ./ec2-describe-snapshots
        [root@rhel64 bin]#

        [root@rhel64 bin]# ./ec2-delete-group test2
        GROUP test2
        [root@rhel64 bin]# ./ec2-revoke test -P tcp -p 22 -s 0.0.0.0/0
        GROUP test
        PERMISSION test ALLOWS tcp 22 22 FROM CIDR 0.0.0.0/0
        [root@rhel64 bin]# ./ec2-create-volume -s 5
        Required option '-z, --availability-zone ZONE' missing (-h for usage)
        [root@rhel64 bin]# ./ec2-create-volume -s 5 --availability-zone zone2
        VOLUME e6e0a648-e5bc-4356-8f13-01c91822cfba 5 zone2 Allocated 2012-10-09T20:17:47+0530
        [root@rhel64 bin]# ./ec2-attach-volume e6e0a648-e5bc-4356-8f13-01c91822cfba -i 09693ad4-a87e-460a-9186-e95cb79c34b5
        Required option '-d, --device DEVICE' missing (-h for usage)
        [root@rhel64 bin]# ./ec2-attach-volume e6e0a648-e5bc-4356-8f13-01c91822cfba -i 09693ad4-a87e-460a-9186-e95cb79c34b5 -d /dev/sdb
        ATTACHMENT e6e0a648-e5bc-4356-8f13-01c91822cfba 09693ad4-a87e-460a-9186-e95cb79c34b5 /dev/sdb Ready 2012-10-09T20:19:00+0530
        [root@rhel64 bin]# ./ec2-detach-volume e6e0a648-e5bc-4356-8f13-01c91822cfba
        ATTACHMENT e6e0a648-e5bc-4356-8f13-01c91822cfba Ready 1970-02-01T20:19:40+0530
        [root@rhel64 bin]# ./ec2-describe-volumes
        VOLUME e6e0a648-e5bc-4356-8f13-01c91822cfba 5 zone2 available 2012-10-09T20:17:47+0530
        TAG volume e6e0a648-e5bc-4356-8f13-01c91822cfba
        VOLUME 51c57af7-509c-4470-8612-bc8ab60e7d07 20 zone2 available 2012-10-09T20:09:19+0530
        ATTACHMENT 51c57af7-509c-4470-8612-bc8ab60e7d07 09693ad4-a87e-460a-9186-e95cb79c34b5 0 attached 2012-10-09T20:09:19+0530
        TAG volume 51c57af7-509c-4470-8612-bc8ab60e7d07
        VOLUME 81e2e326-5130-4317-ad3d-e56ee6e83e97 20 zone2 available 2012-10-09T19:49:34+0530
        ATTACHMENT 81e2e326-5130-4317-ad3d-e56ee6e83e97 f39fea4e-4563-471b-b6d2-57b175aec769 0 detached 2012-10-09T19:49:34+0530
        TAG volume 81e2e326-5130-4317-ad3d-e56ee6e83e97
        [root@rhel64 bin]# ./ec2-delete-volume e6e0a648-e5bc-4356-8f13-01c91822cfba
        VOLUME e6e0a648-e5bc-4356-8f13-01c91822cfba
        [root@rhel64 bin]# ./ec2-describe-volumes
        VOLUME 51c57af7-509c-4470-8612-bc8ab60e7d07 20 zone2 available 2012-10-09T20:09:19+0530
        ATTACHMENT 51c57af7-509c-4470-8612-bc8ab60e7d07 09693ad4-a87e-460a-9186-e95cb79c34b5 0 attached 2012-10-09T20:09:19+0530
        TAG volume 51c57af7-509c-4470-8612-bc8ab60e7d07
        VOLUME 81e2e326-5130-4317-ad3d-e56ee6e83e97 20 zone2 available 2012-10-09T19:49:34+0530
        ATTACHMENT 81e2e326-5130-4317-ad3d-e56ee6e83e97 f39fea4e-4563-471b-b6d2-57b175aec769 0 detached 2012-10-09T19:49:34+0530
        TAG volume 81e2e326-5130-4317-ad3d-e56ee6e83e97
        (reverse-i-search)`e-v': ./ec2-describ^Cvolumes
        [root@rhel64 bin]# ./ec2-create-volume -s 10 --availability-zone zone2
        VOLUME 0e1002dc-7e55-4e29-baa6-308ac0e60de8 10 zone2 Allocated 2012-10-09T20:21:38+0530
        [root@rhel64 bin]# ./ec2-create-snapshot 0e1002dc-7e55-4e29-baa6-308ac0e60de8
        Server.InternalError: VolumeId: 7 is not in Ready state but Allocated. Cannot take snapshot.
        [root@rhel64 bin]# ./ec2-create-snapshot 0e1002dc-7e55-4e29-baa6-308ac0e60de8
        Server.InternalError: VolumeId: 7 is not in Ready state but Allocated. Cannot take snapshot.
        [root@rhel64 bin]# ./ec2-attach-volume 0e1002dc-7e55-4e29-baa6-308ac0e60de8 -i 09693ad4-a87e-460a-9186-e95cb79c34b5 -d /dev/sdb
        ATTACHMENT 0e1002dc-7e55-4e29-baa6-308ac0e60de8 09693ad4-a87e-460a-9186-e95cb79c34b5 /dev/sdb Ready 2012-10-09T20:22:43+0530
        [root@rhel64 bin]# ./ec2-create-snapshot 0e1002dc-7e55-4e29-baa6-308ac0e60de8
        Read timeout. Please try again later. If this persists please visit the
        AWS developer forums to see if it's the result of a known issue.
        [root@rhel64 bin]# ./ec2-describe-snapshots
        SNAPSHOT 2adc695e-7440-44d8-94bb-3d27f7105b15 0e1002dc-7e55-4e29-baa6-308ac0e60de8 completed 2012-10-09T20:22:49+0530 100% 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:admin 10 09693ad4-a87e-460a-9186-e95cb79c34b5_a4d27b7f-29d4-4df7-9af8-78e0961a7381_20121009145249
        TAG snapshot 2adc695e-7440-44d8-94bb-3d27f7105b15
        [root@rhel64 bin]# ./ec2-delete-snapshot 2adc695e-7440-44d8-94bb-3d27f7105b15
        SNAPSHOT 2adc695e-7440-44d8-94bb-3d27f7105b15
        [root@rhel64 bin]# ./ec2-describe-snapshots
        [root@rhel64 bin]# ./ec2-create-image 09693ad4-a87e-460a-9186-e95cb79c34b5 --name tmpl1 -d tmpl1
        Read timeout. Please try again later. If this persists please visit the
        AWS developer forums to see if it's the result of a known issue.
        [root@rhel64 bin]# ./ec2-register -n 'Image1' -a 'VHD:zone1:CentOS 5.3 (64-bit):xenserver' http://10.147.28.6/emplates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2 --description="Image1"
        Server.InternalError: Unknown zoneName value - zone1
        [root@rhel64 bin]# ./ec2-register -n 'Image1' -a 'VHD:zone2:CentOS 5.3 (64-bit):xenserver' http://10.147.28.6/emplates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2 --description="Image1"
        IMAGE 181b2cbc-994a-4791-9589-709c84d36329
        [root@rhel64 bin]# ./ec2-register -n 'Image2' -a 'VHD:zone2:CentOS 5.3 (64-bit):xenserver' http://10.147.28.6/Templates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2 --description="Image2"
        IMAGE 171146fe-82c6-4329-8049-dd4f82924d9d
        [root@rhel64 bin]# ./ec2-register -n 'Image3' -a 'VHD:zone2:CentOS 5.3 (64-bit):xenserver' http://10.147.28.6/templates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2 --description="Image3"

        746 ./ec2-create-volume -s 5
        747 ./ec2-create-volume -s 5 --availability-zone zone2
        748 ./ec2-attach-volume e6e0a648-e5bc-4356-8f13-01c91822cfba -i 09693ad4-a87e-460a-9186-e95cb79c34b5
        749 ./ec2-attach-volume e6e0a648-e5bc-4356-8f13-01c91822cfba -i 09693ad4-a87e-460a-9186-e95cb79c34b5 -d /dev/sdb
        750 ./ec2-detach-volume e6e0a648-e5bc-4356-8f13-01c91822cfba
        751 ./ec2-describe-volumes
        752 ./ec2-delete-volume e6e0a648-e5bc-4356-8f13-01c91822cfba
        753 ./ec2-describe-volumes
        754 ./ec2-create-volume -s 10 --availability-zone zone2
        755 ./ec2-create-snapshot 0e1002dc-7e55-4e29-baa6-308ac0e60de8
        756 ./ec2-attach-volume 0e1002dc-7e55-4e29-baa6-308ac0e60de8 -i 09693ad4-a87e-460a-9186-e95cb79c34b5 -d /dev/sdb
        757 ./ec2-create-snapshot 0e1002dc-7e55-4e29-baa6-308ac0e60de8
        758 ./ec2-describe-snapshots
        759 ./ec2-delete-snapshot 2adc695e-7440-44d8-94bb-3d27f7105b15
        760 ./ec2-describe-snapshots
        761 ./ec2-create-image 09693ad4-a87e-460a-9186-e95cb79c34b5 --name tmpl1 -d tmpl1
        762 ./ec2-register -n 'Image1' -a 'VHD:zone1:CentOS 5.3 (64-bit):xenserver' http://10.147.28.6/emplates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2 --description="Image1"
        763 ./ec2-register -n 'Image1' -a 'VHD:zone2:CentOS 5.3 (64-bit):xenserver' http://10.147.28.6/emplates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2 --description="Image1"
        764 ./ec2-register -n 'Image2' -a 'VHD:zone2:CentOS 5.3 (64-bit):xenserver' http://10.147.28.6/Templates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2 --description="Image2"
        765 ./ec2-register -n 'Image3' -a 'VHD:zone2:CentOS 5.3 (64-bit):xenserver' http://10.147.28.6/templates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2 --description="Image3"
        766 ./ec2-describe-images
        767 ./ec2-deregister 10b7011f-71bb-4c4c-b9a7-9943f187e501

        Show
        Sudha Ponnaganti added a comment - - edited swamy validated the following. [root@rhel64 bin] # ./ec2-run-instances ef7fbe39-9006-4cc1-8a01-7cc497faffcf -n 1 --availability-zone zone2 ./ec2-stop-instances f39fea4e-4563-471b-b6d2-57b175aec769 ./ec2-start-instances f39fea4e-4563-471b-b6d2-57b175aec769 --connection-timeout 120 --request-timeout 120 ./ec2-terminate-instances f39fea4e-4563-471b-b6d2-57b175aec769 --connection-timeout 120 --request-timeout 120 ./ec2-add-group test -d 'testing' ./ec2-authorizep test -P tcp -p 22 -s 0.0.0.0/0 ./ec2-run-instances ef7fbe39-9006-4cc1-8a01-7cc497faffcf -n 1 --availability-zone zone2 -g test ./ec2-describe-group ./ec2-delete-group test2 ./ec2-revoke test -P tcp -p 22 -s 0.0.0.0/0 [root@rhel64 bin] # ./ec2-create-volume -s 5 --availability-zone zone2 VOLUME e6e0a648-e5bc-4356-8f13-01c91822cfba 5 zone2 Allocated 2012-10-09T20:17:47+0530 [root@rhel64 bin] # ./ec2-attach-volume e6e0a648-e5bc-4356-8f13-01c91822cfba -i 09693ad4-a87e-460a-9186-e95cb79c34b5 Required option '-d, --device DEVICE' missing (-h for usage) [root@rhel64 bin] # ./ec2-attach-volume e6e0a648-e5bc-4356-8f13-01c91822cfba -i 09693ad4-a87e-460a-9186-e95cb79c34b5 -d /dev/sdb ATTACHMENT e6e0a648-e5bc-4356-8f13-01c91822cfba 09693ad4-a87e-460a-9186-e95cb79c34b5 /dev/sdb Ready 2012-10-09T20:19:00+0530 [root@rhel64 bin] # ./ec2-detach-volume e6e0a648-e5bc-4356-8f13-01c91822cfba ATTACHMENT e6e0a648-e5bc-4356-8f13-01c91822cfba Ready 1970-02-01T20:19:40+0530 [root@rhel64 bin] # ./ec2-describe-volumes VOLUME e6e0a648-e5bc-4356-8f13-01c91822cfba 5 zone2 available 2012-10-09T20:17:47+0530 TAG volume e6e0a648-e5bc-4356-8f13-01c91822cfba VOLUME 51c57af7-509c-4470-8612-bc8ab60e7d07 20 zone2 available 2012-10-09T20:09:19+0530 ATTACHMENT 51c57af7-509c-4470-8612-bc8ab60e7d07 09693ad4-a87e-460a-9186-e95cb79c34b5 0 attached 2012-10-09T20:09:19+0530 TAG volume 51c57af7-509c-4470-8612-bc8ab60e7d07 VOLUME 81e2e326-5130-4317-ad3d-e56ee6e83e97 20 zone2 available 2012-10-09T19:49:34+0530 ATTACHMENT 81e2e326-5130-4317-ad3d-e56ee6e83e97 f39fea4e-4563-471b-b6d2-57b175aec769 0 detached 2012-10-09T19:49:34+0530 TAG volume 81e2e326-5130-4317-ad3d-e56ee6e83e97 [root@rhel64 bin] # [root@rhel64 bin] # ./ec2-delete-volume e6e0a648-e5bc-4356-8f13-01c91822cfba VOLUME e6e0a648-e5bc-4356-8f13-01c91822cfba [root@rhel64 bin] # ./ec2-describe-volumes VOLUME 51c57af7-509c-4470-8612-bc8ab60e7d07 20 zone2 available 2012-10-09T20:09:19+0530 ATTACHMENT 51c57af7-509c-4470-8612-bc8ab60e7d07 09693ad4-a87e-460a-9186-e95cb79c34b5 0 attached 2012-10-09T20:09:19+0530 TAG volume 51c57af7-509c-4470-8612-bc8ab60e7d07 VOLUME 81e2e326-5130-4317-ad3d-e56ee6e83e97 20 zone2 available 2012-10-09T19:49:34+0530 ATTACHMENT 81e2e326-5130-4317-ad3d-e56ee6e83e97 f39fea4e-4563-471b-b6d2-57b175aec769 0 detached 2012-10-09T19:49:34+0530 TAG volume 81e2e326-5130-4317-ad3d-e56ee6e83e97 [root@rhel64 bin] # [root@rhel64 bin] # ./ec2-create-snapshot 0e1002dc-7e55-4e29-baa6-308ac0e60de8 Read timeout. Please try again later. If this persists please visit the AWS developer forums to see if it's the result of a known issue. [root@rhel64 bin] # ./ec2-describe-snapshots SNAPSHOT 2adc695e-7440-44d8-94bb-3d27f7105b15 0e1002dc-7e55-4e29-baa6-308ac0e60de8 completed 2012-10-09T20:22:49+0530 100% 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:admin 10 09693ad4-a87e-460a-9186-e95cb79c34b5_a4d27b7f-29d4-4df7-9af8-78e0961a7381_20121009145249 TAG snapshot 2adc695e-7440-44d8-94bb-3d27f7105b15 [root@rhel64 bin] # ./ec2-delete-snapshot 2adc695e-7440-44d8-94bb-3d27f7105b15 SNAPSHOT 2adc695e-7440-44d8-94bb-3d27f7105b15 [root@rhel64 bin] # ./ec2-describe-snapshots [root@rhel64 bin] # [root@rhel64 bin] # ./ec2-delete-group test2 GROUP test2 [root@rhel64 bin] # ./ec2-revoke test -P tcp -p 22 -s 0.0.0.0/0 GROUP test PERMISSION test ALLOWS tcp 22 22 FROM CIDR 0.0.0.0/0 [root@rhel64 bin] # ./ec2-create-volume -s 5 Required option '-z, --availability-zone ZONE' missing (-h for usage) [root@rhel64 bin] # ./ec2-create-volume -s 5 --availability-zone zone2 VOLUME e6e0a648-e5bc-4356-8f13-01c91822cfba 5 zone2 Allocated 2012-10-09T20:17:47+0530 [root@rhel64 bin] # ./ec2-attach-volume e6e0a648-e5bc-4356-8f13-01c91822cfba -i 09693ad4-a87e-460a-9186-e95cb79c34b5 Required option '-d, --device DEVICE' missing (-h for usage) [root@rhel64 bin] # ./ec2-attach-volume e6e0a648-e5bc-4356-8f13-01c91822cfba -i 09693ad4-a87e-460a-9186-e95cb79c34b5 -d /dev/sdb ATTACHMENT e6e0a648-e5bc-4356-8f13-01c91822cfba 09693ad4-a87e-460a-9186-e95cb79c34b5 /dev/sdb Ready 2012-10-09T20:19:00+0530 [root@rhel64 bin] # ./ec2-detach-volume e6e0a648-e5bc-4356-8f13-01c91822cfba ATTACHMENT e6e0a648-e5bc-4356-8f13-01c91822cfba Ready 1970-02-01T20:19:40+0530 [root@rhel64 bin] # ./ec2-describe-volumes VOLUME e6e0a648-e5bc-4356-8f13-01c91822cfba 5 zone2 available 2012-10-09T20:17:47+0530 TAG volume e6e0a648-e5bc-4356-8f13-01c91822cfba VOLUME 51c57af7-509c-4470-8612-bc8ab60e7d07 20 zone2 available 2012-10-09T20:09:19+0530 ATTACHMENT 51c57af7-509c-4470-8612-bc8ab60e7d07 09693ad4-a87e-460a-9186-e95cb79c34b5 0 attached 2012-10-09T20:09:19+0530 TAG volume 51c57af7-509c-4470-8612-bc8ab60e7d07 VOLUME 81e2e326-5130-4317-ad3d-e56ee6e83e97 20 zone2 available 2012-10-09T19:49:34+0530 ATTACHMENT 81e2e326-5130-4317-ad3d-e56ee6e83e97 f39fea4e-4563-471b-b6d2-57b175aec769 0 detached 2012-10-09T19:49:34+0530 TAG volume 81e2e326-5130-4317-ad3d-e56ee6e83e97 [root@rhel64 bin] # ./ec2-delete-volume e6e0a648-e5bc-4356-8f13-01c91822cfba VOLUME e6e0a648-e5bc-4356-8f13-01c91822cfba [root@rhel64 bin] # ./ec2-describe-volumes VOLUME 51c57af7-509c-4470-8612-bc8ab60e7d07 20 zone2 available 2012-10-09T20:09:19+0530 ATTACHMENT 51c57af7-509c-4470-8612-bc8ab60e7d07 09693ad4-a87e-460a-9186-e95cb79c34b5 0 attached 2012-10-09T20:09:19+0530 TAG volume 51c57af7-509c-4470-8612-bc8ab60e7d07 VOLUME 81e2e326-5130-4317-ad3d-e56ee6e83e97 20 zone2 available 2012-10-09T19:49:34+0530 ATTACHMENT 81e2e326-5130-4317-ad3d-e56ee6e83e97 f39fea4e-4563-471b-b6d2-57b175aec769 0 detached 2012-10-09T19:49:34+0530 TAG volume 81e2e326-5130-4317-ad3d-e56ee6e83e97 (reverse-i-search)`e-v': ./ec2-describ^Cvolumes [root@rhel64 bin] # ./ec2-create-volume -s 10 --availability-zone zone2 VOLUME 0e1002dc-7e55-4e29-baa6-308ac0e60de8 10 zone2 Allocated 2012-10-09T20:21:38+0530 [root@rhel64 bin] # ./ec2-create-snapshot 0e1002dc-7e55-4e29-baa6-308ac0e60de8 Server.InternalError: VolumeId: 7 is not in Ready state but Allocated. Cannot take snapshot. [root@rhel64 bin] # ./ec2-create-snapshot 0e1002dc-7e55-4e29-baa6-308ac0e60de8 Server.InternalError: VolumeId: 7 is not in Ready state but Allocated. Cannot take snapshot. [root@rhel64 bin] # ./ec2-attach-volume 0e1002dc-7e55-4e29-baa6-308ac0e60de8 -i 09693ad4-a87e-460a-9186-e95cb79c34b5 -d /dev/sdb ATTACHMENT 0e1002dc-7e55-4e29-baa6-308ac0e60de8 09693ad4-a87e-460a-9186-e95cb79c34b5 /dev/sdb Ready 2012-10-09T20:22:43+0530 [root@rhel64 bin] # ./ec2-create-snapshot 0e1002dc-7e55-4e29-baa6-308ac0e60de8 Read timeout. Please try again later. If this persists please visit the AWS developer forums to see if it's the result of a known issue. [root@rhel64 bin] # ./ec2-describe-snapshots SNAPSHOT 2adc695e-7440-44d8-94bb-3d27f7105b15 0e1002dc-7e55-4e29-baa6-308ac0e60de8 completed 2012-10-09T20:22:49+0530 100% 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:admin 10 09693ad4-a87e-460a-9186-e95cb79c34b5_a4d27b7f-29d4-4df7-9af8-78e0961a7381_20121009145249 TAG snapshot 2adc695e-7440-44d8-94bb-3d27f7105b15 [root@rhel64 bin] # ./ec2-delete-snapshot 2adc695e-7440-44d8-94bb-3d27f7105b15 SNAPSHOT 2adc695e-7440-44d8-94bb-3d27f7105b15 [root@rhel64 bin] # ./ec2-describe-snapshots [root@rhel64 bin] # ./ec2-create-image 09693ad4-a87e-460a-9186-e95cb79c34b5 --name tmpl1 -d tmpl1 Read timeout. Please try again later. If this persists please visit the AWS developer forums to see if it's the result of a known issue. [root@rhel64 bin] # ./ec2-register -n 'Image1' -a 'VHD:zone1:CentOS 5.3 (64-bit):xenserver' http://10.147.28.6/emplates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2 --description="Image1" Server.InternalError: Unknown zoneName value - zone1 [root@rhel64 bin] # ./ec2-register -n 'Image1' -a 'VHD:zone2:CentOS 5.3 (64-bit):xenserver' http://10.147.28.6/emplates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2 --description="Image1" IMAGE 181b2cbc-994a-4791-9589-709c84d36329 [root@rhel64 bin] # ./ec2-register -n 'Image2' -a 'VHD:zone2:CentOS 5.3 (64-bit):xenserver' http://10.147.28.6/Templates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2 --description="Image2" IMAGE 171146fe-82c6-4329-8049-dd4f82924d9d [root@rhel64 bin] # ./ec2-register -n 'Image3' -a 'VHD:zone2:CentOS 5.3 (64-bit):xenserver' http://10.147.28.6/templates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2 --description="Image3" 746 ./ec2-create-volume -s 5 747 ./ec2-create-volume -s 5 --availability-zone zone2 748 ./ec2-attach-volume e6e0a648-e5bc-4356-8f13-01c91822cfba -i 09693ad4-a87e-460a-9186-e95cb79c34b5 749 ./ec2-attach-volume e6e0a648-e5bc-4356-8f13-01c91822cfba -i 09693ad4-a87e-460a-9186-e95cb79c34b5 -d /dev/sdb 750 ./ec2-detach-volume e6e0a648-e5bc-4356-8f13-01c91822cfba 751 ./ec2-describe-volumes 752 ./ec2-delete-volume e6e0a648-e5bc-4356-8f13-01c91822cfba 753 ./ec2-describe-volumes 754 ./ec2-create-volume -s 10 --availability-zone zone2 755 ./ec2-create-snapshot 0e1002dc-7e55-4e29-baa6-308ac0e60de8 756 ./ec2-attach-volume 0e1002dc-7e55-4e29-baa6-308ac0e60de8 -i 09693ad4-a87e-460a-9186-e95cb79c34b5 -d /dev/sdb 757 ./ec2-create-snapshot 0e1002dc-7e55-4e29-baa6-308ac0e60de8 758 ./ec2-describe-snapshots 759 ./ec2-delete-snapshot 2adc695e-7440-44d8-94bb-3d27f7105b15 760 ./ec2-describe-snapshots 761 ./ec2-create-image 09693ad4-a87e-460a-9186-e95cb79c34b5 --name tmpl1 -d tmpl1 762 ./ec2-register -n 'Image1' -a 'VHD:zone1:CentOS 5.3 (64-bit):xenserver' http://10.147.28.6/emplates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2 --description="Image1" 763 ./ec2-register -n 'Image1' -a 'VHD:zone2:CentOS 5.3 (64-bit):xenserver' http://10.147.28.6/emplates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2 --description="Image1" 764 ./ec2-register -n 'Image2' -a 'VHD:zone2:CentOS 5.3 (64-bit):xenserver' http://10.147.28.6/Templates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2 --description="Image2" 765 ./ec2-register -n 'Image3' -a 'VHD:zone2:CentOS 5.3 (64-bit):xenserver' http://10.147.28.6/templates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2 --description="Image3" 766 ./ec2-describe-images 767 ./ec2-deregister 10b7011f-71bb-4c4c-b9a7-9943f187e501
        Hide
        Sangeetha Hariharan added a comment -

        ====================== ssh related testing =============

        [root@Host41-4 bin]# ./ec2-add-keypair sangee
        KEYPAIR sangee 55:da:7d:51:4f:fb:79:73:0a:83:0d:3f:6f:ed:5d:3f
        ----BEGIN RSA PRIVATE KEY----
        MIICXQIBAAKBgQCrDl2WNuUtpHnL2W26TngrB/0G+GNUhY88kAgCvw/REpimaK3m
        SqFA2ufV5RdX8agkZFSbkhbe2wjtLaq9Fcm3X6rD8cQO1C4IpWOUA/WnJ/7w7R80
        2nczWKQqssKX6+R1q38PGLnLPhBLEDM3ojHJ/5PU8/1HURQ5Dtg5kMxiKwIDAQAB
        AoGBAIcK2VGM1xNYhRss9VafOnlmXhjRocGJi5JZdymL4xXAo6jEfX2Qr4t/BoYz
        zWENlBve5XjINawMqhhs9B1BBTSjxdLCfLRg9WmWWVZDjfJ5W10LDpCnOVH0FIeU
        Bjnlr5kgl8sAyPATzXemKty7ZRGq6beN+u68UuBRdK8RK9AxAkEA9nnK8nMeheOf
        pIF6DyNKY9BMH8/FKMum7nCXYLz8b8qFZvdIoyn5ud3YlIhA8HHINhw8z69loF0c
        PUvn+q7ZiQJBALGqgChrznf+IWYBCaN/LtGK2JrDrdS4o8lr8FahHuCDBK1Icuu3
        3NBSq7PZTSSaGISM/eCYNyoI+Pvv1qGqFRMCQQC5giV7oaWBhDbtq/3gUuF0ipwg
        /VIZSF5V7CwjRVqCEV2ih9AF7lvkxtJxyLOHxTu5bjte3VaSAkJ06CKrjNpxAkAm
        KLS1+dGyvAZ4Xiiv0RVBNE0pkHW5hp7HGEPal2iGWB2dCj6Emkz3AYqXakjDX8V8
        UrwEjSzr/llb4zt6JYm5AkBYxI8bZI3a1LM6eJPGuJ5T9VQzYmmJGvidsJ/RrxSe
        xDkLVllRvMGn8J7F45ve4l1FTeiZ8f04wlod7mzxiKu8
        ----END RSA PRIVATE KEY----

        [root@Host41-4 bin]# ./ec2-describe-keypairs
        KEYPAIR sangee 55:da:7d:51:4f:fb:79:73:0a:83:0d:3f:6f:ed:5d:3f

        [root@Host41-4 bin]# ./ec2-describe-keypairs
        KEYPAIR sangee1 e9:fe:66:7d:5a:36:53:76:9b:16:d7:83:e0:13:0c:a4
        KEYPAIR sangee 55:da:7d:51:4f:fb:79:73:0a:83:0d:3f:6f:ed:5d:3f
        [root@Host41-4 bin]# ./ec2-delete-keypair sangee1
        KEYPAIR sangee1
        [root@Host41-4 bin]# ./ec2-describe-keypairs
        KEYPAIR sangee 55:da:7d:51:4f:fb:79:73:0a:83:0d:3f:6f:ed:5d:3f
        [root@Host41-4 bin]#

        [root@Host41-4 bin]# ./ec2-run-instances 9cc84337-28e9-4e33-a9ed-cb120feeb81f -k sangee --instance-type littleinstance --connection-timeout 300 --request-timeout 300
        RESERVATION 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:sangee default
        INSTANCE 2d807bef-3bc4-41b4-836f-4ed933639637 9cc84337-28e9-4e33-a9ed-cb120feeb81f running sangee littleinstance 2012-10-09T22:34:52+0530 zone2 monitoring- 10.147.40.94 XenServer
        TAG instance 2d807bef-3bc4-41b4-836f-4ed933639637

        [root@Host41-4 ~]# ssh -i priv_key 10.147.40.94
        The authenticity of host '10.147.40.94 (10.147.40.94)' can't be established.
        RSA key fingerprint is 5e:41:b7:1c:46:95:24:52:de:ef:bb:83:1e:40:43:28.
        Are you sure you want to continue connecting (yes/no)? yes
        Warning: Permanently added '10.147.40.94' (RSA) to the list of known hosts.
        Last login: Fri May 4 17:01:35 2012 from 10.223.41.4
        [root@2d807bef-3bc4-41b4-836f-4ed933639637 ~]#

        =========Tags Testing ===============

        Creating tags:

        [root@Host41-4 bin]# ./ec2-create-tags instance:2d807bef-3bc4-41b4-836f-4ed933639637 --tag pupose=ssh1
        TAG instance:2d807bef-3bc4-41b4-836f-4ed933639637 pupose ssh1

        [root@Host41-4 bin]# ./ec2-create-tags volume:1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 --tag hello=vol123
        TAG volume:1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 hello vol123

        [root@Host41-4 bin]#./ec2-create-tags image:de79846a-b5fa-4a94-9c63-348b363ade7c --tag purpose=sshenabled
        TAG image:de79846a-b5fa-4a94-9c63-348b363ade7c purpose sshenabled

        [root@Host41-4 bin]# ./ec2-create-tags snapshot:97a3e9af-739e-42f4-8aaf-8b882d10c5c6 --tag snap=test
        TAG snapshot:97a3e9af-739e-42f4-8aaf-8b882d10c5c6 snap test

        ==============================
        Listing tags:

        [root@Host41-4 bin]# ./ec2-describe-tags
        TAG volume 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 hello vol123
        TAG instance 2d807bef-3bc4-41b4-836f-4ed933639637 pupose ssh1
        TAG image de79846a-b5fa-4a94-9c63-348b363ade7c purpose sshenabled
        TAG snapshot 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 snap test

        [root@Host41-4 bin]# ./ec2-describe-tags --filter resource-type=instance
        TAG instance 2d807bef-3bc4-41b4-836f-4ed933639637 pupose ssh1

        [root@Host41-4 bin]# ./ec2-describe-tags --filter resource-type=volume
        TAG volume 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 hello vol123

        [root@Host41-4 bin]# ./ec2-describe-tags --filter resource-type=image
        TAG image de79846a-b5fa-4a94-9c63-348b363ade7c purpose sshenabled

        [root@Host41-4 bin]# ./ec2-describe-tags --filter resource-type=snapshot
        TAG snapshot 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 snap test

        ==========================================
        list calls return the tags:

        [root@Host41-4 bin]# ./ec2-describe-instances 2d807bef-3bc4-41b4-836f-4ed933639637
        RESERVATION 2d807bef-3bc4-41b4-836f-4ed933639637 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:sangee default
        INSTANCE 2d807bef-3bc4-41b4-836f-4ed933639637 9cc84337-28e9-4e33-a9ed-cb120feeb81f running sangee m1.small 2012-10-09T22:34:52+0530 zone2 monitoring- 10.147.40.94 XenServer
        TAG instance 2d807bef-3bc4-41b4-836f-4ed933639637 pupose ssh1

        [root@Host41-4 bin]# ./ec2-describe-images de79846a-b5fa-4a94-9c63-348b363ade7c
        IMAGE de79846a-b5fa-4a94-9c63-348b363ade7c /test-ssh-sangee available public machine
        BLOCKDEVICEMAPPING 0
        TAG image de79846a-b5fa-4a94-9c63-348b363ade7c purpose sshenabled

        [root@Host41-4 bin]# ./ec2-describe-snapshots 97a3e9af-739e-42f4-8aaf-8b882d10c5c6
        SNAPSHOT 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 27ed96cd-804f-4377-bb20-cae72f6611ad completed 2012-10-09T23:21:45+0530 100% 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:sangee 20 50e38e5d-35f8-48ca-870d-caa05fe5494a_ROOT-6_20121009175145
        TAG snapshot 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 snap test

        [root@Host41-4 bin]# ./ec2-describe-volumes 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34
        VOLUME 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 20 zone2 available 2012-10-09T22:34:52+0530
        ATTACHMENT 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 2d807bef-3bc4-41b4-836f-4ed933639637 0 attached 2012-10-09T22:34:52+0530
        TAG volume 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 hello vol123

        ========================================================

        list calls with filter - tag-key=<tagkey value>

        [root@Host41-4 bin]# ./ec2-describe-instances --filter tag-key=pupose
        RESERVATION 2d807bef-3bc4-41b4-836f-4ed933639637 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:sangee default
        INSTANCE 2d807bef-3bc4-41b4-836f-4ed933639637 9cc84337-28e9-4e33-a9ed-cb120feeb81f running sange e m1.small 2012-10-09T22:34:52+0530 zone2 monitoring- 1 0.147.40.94 XenServer
        TAG instance 2d807bef-3bc4-41b4-836f-4ed933639637 pupose ssh1

        [root@Host41-4 bin]# ./ec2-describe-volumes --filter tag-key=hello
        VOLUME 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 20 zone2 available 2012-10-09T22:34:52+0530
        ATTACHMENT 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 2d807bef-3bc4-41b4-836f-4ed933639637 0 attached 2012- 10-09T22:34:52+0530
        TAG volume 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 hello vol123

        [root@Host41-4 bin]# ./ec2-describe-snapshots --filter tag-key=snap
        SNAPSHOT 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 27ed96cd-804f-4377-bb20-cae72f6611ad completed 2012-10-09T23 :21:45+0530 100% 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:sangee 20 50e38e5d-35f8-48ca-870d-caa05fe5494a_ROOT-6_2 0121009175145
        TAG snapshot 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 snap test

        Returns all images -> not being filtered by tag-key

        [root@Host41-4 bin]# ./ec2-describe-images --filter tag-key=purpose
        IMAGE 9cc84337-28e9-4e33-a9ed-cb120feeb81f /test-ssh available public machine
        BLOCKDEVICEMAPPING 0
        TAG image 9cc84337-28e9-4e33-a9ed-cb120feeb81f
        IMAGE de79846a-b5fa-4a94-9c63-348b363ade7c /test-ssh-sangee available public machi ne
        BLOCKDEVICEMAPPING 0
        TAG image de79846a-b5fa-4a94-9c63-348b363ade7c purpose sshenabled
        IMAGE ef7fbe39-9006-4cc1-8a01-7cc497faffcf /CentOS 5.6(64-bit) no GUI (XenServer) available public m achine
        BLOCKDEVICEMAPPING 0
        TAG image ef7fbe39-9006-4cc1-8a01-7cc497faffcf

        ====================================

        Delete tag for instance:

        [root@Host41-4 bin]# ./ec2-delete-tags instance:2d807bef-3bc4-41b4-836f-4ed933639637 --tag pupose=ssh1
        [root@Host41-4 bin]# ./ec2-describe-tags
        TAG volume 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 hello vol123
        TAG image de79846a-b5fa-4a94-9c63-348b363ade7c purpose sshenabled
        TAG snapshot 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 snap test
        [root@Host41-4 bin]# ./ec2-describe-instances 2d807bef-3bc4-41b4-836f-4ed933639637
        RESERVATION 2d807bef-3bc4-41b4-836f-4ed933639637 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:sangee default
        INSTANCE 2d807bef-3bc4-41b4-836f-4ed933639637 9cc84337-28e9-4e33-a9ed-cb120feeb81f running sangee m1.small 2012-10-09T22:34:52+0530 zone2 monitoring- 10.147.40.94 XenServer
        TAG instance 2d807bef-3bc4-41b4-836f-4ed933639637

        ================================

        Delete tag for volume:

        [root@Host41-4 bin]# ./ec2-describe-volumes 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34
        VOLUME 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 20 zone2 available 2012-10-09T22:34:52+0530
        ATTACHMENT 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 2d807bef-3bc4-41b4-836f-4ed933639637 0 attached 2012-10-09T22:34:52+0530
        TAG volume 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 hello vol123

        [root@Host41-4 bin]# ./ec2-delete-tags volume:1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 --tag hello=vol123

        [root@Host41-4 bin]# ./ec2-describe-volumes 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34
        VOLUME 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 20 zone2 available 2012-10-09T22:34:52+0530
        ATTACHMENT 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 2d807bef-3bc4-41b4-836f-4ed933639637 0 attached 2012-10-09T22:34:52+0530
        TAG volume 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34
        [root@Host41-4 bin]#

        ================================
        Delete tag for snapshot:

        [root@Host41-4 bin]# ./ec2-describe-snapshots 97a3e9af-739e-42f4-8aaf-8b882d10c5c6
        SNAPSHOT 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 27ed96cd-804f-4377-bb20-cae72f6611ad completed 2012-10-09T23:21:45+0530 100% 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:sangee 20 50e38e5d-35f8-48ca-870d-caa05fe5494a_ROOT-6_20121009175145
        TAG snapshot 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 snap test
        [root@Host41-4 bin]# ./ec2-delete-tags snapshot:97a3e9af-739e-42f4-8aaf-8b882d10c5c6 --tag snap=test
        [root@Host41-4 bin]# ./ec2-describe-snapshots 97a3e9af-739e-42f4-8aaf-8b882d10c5c6
        SNAPSHOT 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 27ed96cd-804f-4377-bb20-cae72f6611ad completed 2012-10-09T23:21:45+0530 100% 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:sangee 20 50e38e5d-35f8-48ca-870d-caa05fe5494a_ROOT-6_20121009175145
        TAG snapshot 97a3e9af-739e-42f4-8aaf-8b882d10c5c6
        [root@Host41-4 bin]#

        ================================
        Delete tag for image:

        [root@Host41-4 bin]# ./ec2-describe-images de79846a-b5fa-4a94-9c63-348b363ade7c
        IMAGE de79846a-b5fa-4a94-9c63-348b363ade7c /test-ssh-sangee available public machine
        BLOCKDEVICEMAPPING 0
        TAG image de79846a-b5fa-4a94-9c63-348b363ade7c purpose sshenabled
        [root@Host41-4 bin]# ./ec2-delete-tags image:de79846a-b5fa-4a94-9c63-348b363ade7c --tag puposr=sshenabled
        Server.InternalError: 431 Unable to find tags by parameters specified
        [root@Host41-4 bin]# ./ec2-delete-tags image:de79846a-b5fa-4a94-9c63-348b363ade7c --tag purpose=sshenabled
        [root@Host41-4 bin]# ./ec2-describe-images de79846a-b5fa-4a94-9c63-348b363ade7c
        IMAGE de79846a-b5fa-4a94-9c63-348b363ade7c /test-ssh-sangee available public machine
        BLOCKDEVICEMAPPING 0
        TAG image de79846a-b5fa-4a94-9c63-348b363ade7c
        [root@Host41-4 bin]#

        Show
        Sangeetha Hariharan added a comment - ====================== ssh related testing ============= [root@Host41-4 bin] # ./ec2-add-keypair sangee KEYPAIR sangee 55:da:7d:51:4f:fb:79:73:0a:83:0d:3f:6f:ed:5d:3f ---- BEGIN RSA PRIVATE KEY ---- MIICXQIBAAKBgQCrDl2WNuUtpHnL2W26TngrB/0G+GNUhY88kAgCvw/REpimaK3m SqFA2ufV5RdX8agkZFSbkhbe2wjtLaq9Fcm3X6rD8cQO1C4IpWOUA/WnJ/7w7R80 2nczWKQqssKX6+R1q38PGLnLPhBLEDM3ojHJ/5PU8/1HURQ5Dtg5kMxiKwIDAQAB AoGBAIcK2VGM1xNYhRss9VafOnlmXhjRocGJi5JZdymL4xXAo6jEfX2Qr4t/BoYz zWENlBve5XjINawMqhhs9B1BBTSjxdLCfLRg9WmWWVZDjfJ5W10LDpCnOVH0FIeU Bjnlr5kgl8sAyPATzXemKty7ZRGq6beN+u68UuBRdK8RK9AxAkEA9nnK8nMeheOf pIF6DyNKY9BMH8/FKMum7nCXYLz8b8qFZvdIoyn5ud3YlIhA8HHINhw8z69loF0c PUvn+q7ZiQJBALGqgChrznf+IWYBCaN/LtGK2JrDrdS4o8lr8FahHuCDBK1Icuu3 3NBSq7PZTSSaGISM/eCYNyoI+Pvv1qGqFRMCQQC5giV7oaWBhDbtq/3gUuF0ipwg /VIZSF5V7CwjRVqCEV2ih9AF7lvkxtJxyLOHxTu5bjte3VaSAkJ06CKrjNpxAkAm KLS1+dGyvAZ4Xiiv0RVBNE0pkHW5hp7HGEPal2iGWB2dCj6Emkz3AYqXakjDX8V8 UrwEjSzr/llb4zt6JYm5AkBYxI8bZI3a1LM6eJPGuJ5T9VQzYmmJGvidsJ/RrxSe xDkLVllRvMGn8J7F45ve4l1FTeiZ8f04wlod7mzxiKu8 ---- END RSA PRIVATE KEY ---- [root@Host41-4 bin] # ./ec2-describe-keypairs KEYPAIR sangee 55:da:7d:51:4f:fb:79:73:0a:83:0d:3f:6f:ed:5d:3f [root@Host41-4 bin] # ./ec2-describe-keypairs KEYPAIR sangee1 e9:fe:66:7d:5a:36:53:76:9b:16:d7:83:e0:13:0c:a4 KEYPAIR sangee 55:da:7d:51:4f:fb:79:73:0a:83:0d:3f:6f:ed:5d:3f [root@Host41-4 bin] # ./ec2-delete-keypair sangee1 KEYPAIR sangee1 [root@Host41-4 bin] # ./ec2-describe-keypairs KEYPAIR sangee 55:da:7d:51:4f:fb:79:73:0a:83:0d:3f:6f:ed:5d:3f [root@Host41-4 bin] # [root@Host41-4 bin] # ./ec2-run-instances 9cc84337-28e9-4e33-a9ed-cb120feeb81f -k sangee --instance-type littleinstance --connection-timeout 300 --request-timeout 300 RESERVATION 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:sangee default INSTANCE 2d807bef-3bc4-41b4-836f-4ed933639637 9cc84337-28e9-4e33-a9ed-cb120feeb81f running sangee littleinstance 2012-10-09T22:34:52+0530 zone2 monitoring- 10.147.40.94 XenServer TAG instance 2d807bef-3bc4-41b4-836f-4ed933639637 [root@Host41-4 ~] # ssh -i priv_key 10.147.40.94 The authenticity of host '10.147.40.94 (10.147.40.94)' can't be established. RSA key fingerprint is 5e:41:b7:1c:46:95:24:52:de:ef:bb:83:1e:40:43:28. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '10.147.40.94' (RSA) to the list of known hosts. Last login: Fri May 4 17:01:35 2012 from 10.223.41.4 [root@2d807bef-3bc4-41b4-836f-4ed933639637 ~] # =========Tags Testing =============== Creating tags: [root@Host41-4 bin] # ./ec2-create-tags instance:2d807bef-3bc4-41b4-836f-4ed933639637 --tag pupose=ssh1 TAG instance:2d807bef-3bc4-41b4-836f-4ed933639637 pupose ssh1 [root@Host41-4 bin] # ./ec2-create-tags volume:1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 --tag hello=vol123 TAG volume:1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 hello vol123 [root@Host41-4 bin] #./ec2-create-tags image:de79846a-b5fa-4a94-9c63-348b363ade7c --tag purpose=sshenabled TAG image:de79846a-b5fa-4a94-9c63-348b363ade7c purpose sshenabled [root@Host41-4 bin] # ./ec2-create-tags snapshot:97a3e9af-739e-42f4-8aaf-8b882d10c5c6 --tag snap=test TAG snapshot:97a3e9af-739e-42f4-8aaf-8b882d10c5c6 snap test ============================== Listing tags: [root@Host41-4 bin] # ./ec2-describe-tags TAG volume 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 hello vol123 TAG instance 2d807bef-3bc4-41b4-836f-4ed933639637 pupose ssh1 TAG image de79846a-b5fa-4a94-9c63-348b363ade7c purpose sshenabled TAG snapshot 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 snap test [root@Host41-4 bin] # ./ec2-describe-tags --filter resource-type=instance TAG instance 2d807bef-3bc4-41b4-836f-4ed933639637 pupose ssh1 [root@Host41-4 bin] # ./ec2-describe-tags --filter resource-type=volume TAG volume 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 hello vol123 [root@Host41-4 bin] # ./ec2-describe-tags --filter resource-type=image TAG image de79846a-b5fa-4a94-9c63-348b363ade7c purpose sshenabled [root@Host41-4 bin] # ./ec2-describe-tags --filter resource-type=snapshot TAG snapshot 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 snap test ========================================== list calls return the tags: [root@Host41-4 bin] # ./ec2-describe-instances 2d807bef-3bc4-41b4-836f-4ed933639637 RESERVATION 2d807bef-3bc4-41b4-836f-4ed933639637 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:sangee default INSTANCE 2d807bef-3bc4-41b4-836f-4ed933639637 9cc84337-28e9-4e33-a9ed-cb120feeb81f running sangee m1.small 2012-10-09T22:34:52+0530 zone2 monitoring- 10.147.40.94 XenServer TAG instance 2d807bef-3bc4-41b4-836f-4ed933639637 pupose ssh1 [root@Host41-4 bin] # ./ec2-describe-images de79846a-b5fa-4a94-9c63-348b363ade7c IMAGE de79846a-b5fa-4a94-9c63-348b363ade7c /test-ssh-sangee available public machine BLOCKDEVICEMAPPING 0 TAG image de79846a-b5fa-4a94-9c63-348b363ade7c purpose sshenabled [root@Host41-4 bin] # ./ec2-describe-snapshots 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 SNAPSHOT 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 27ed96cd-804f-4377-bb20-cae72f6611ad completed 2012-10-09T23:21:45+0530 100% 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:sangee 20 50e38e5d-35f8-48ca-870d-caa05fe5494a_ROOT-6_20121009175145 TAG snapshot 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 snap test [root@Host41-4 bin] # ./ec2-describe-volumes 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 VOLUME 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 20 zone2 available 2012-10-09T22:34:52+0530 ATTACHMENT 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 2d807bef-3bc4-41b4-836f-4ed933639637 0 attached 2012-10-09T22:34:52+0530 TAG volume 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 hello vol123 ======================================================== list calls with filter - tag-key=<tagkey value> [root@Host41-4 bin] # ./ec2-describe-instances --filter tag-key=pupose RESERVATION 2d807bef-3bc4-41b4-836f-4ed933639637 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:sangee default INSTANCE 2d807bef-3bc4-41b4-836f-4ed933639637 9cc84337-28e9-4e33-a9ed-cb120feeb81f running sange e m1.small 2012-10-09T22:34:52+0530 zone2 monitoring- 1 0.147.40.94 XenServer TAG instance 2d807bef-3bc4-41b4-836f-4ed933639637 pupose ssh1 [root@Host41-4 bin] # ./ec2-describe-volumes --filter tag-key=hello VOLUME 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 20 zone2 available 2012-10-09T22:34:52+0530 ATTACHMENT 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 2d807bef-3bc4-41b4-836f-4ed933639637 0 attached 2012- 10-09T22:34:52+0530 TAG volume 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 hello vol123 [root@Host41-4 bin] # ./ec2-describe-snapshots --filter tag-key=snap SNAPSHOT 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 27ed96cd-804f-4377-bb20-cae72f6611ad completed 2012-10-09T23 :21:45+0530 100% 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:sangee 20 50e38e5d-35f8-48ca-870d-caa05fe5494a_ROOT-6_2 0121009175145 TAG snapshot 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 snap test Returns all images -> not being filtered by tag-key [root@Host41-4 bin] # ./ec2-describe-images --filter tag-key=purpose IMAGE 9cc84337-28e9-4e33-a9ed-cb120feeb81f /test-ssh available public machine BLOCKDEVICEMAPPING 0 TAG image 9cc84337-28e9-4e33-a9ed-cb120feeb81f IMAGE de79846a-b5fa-4a94-9c63-348b363ade7c /test-ssh-sangee available public machi ne BLOCKDEVICEMAPPING 0 TAG image de79846a-b5fa-4a94-9c63-348b363ade7c purpose sshenabled IMAGE ef7fbe39-9006-4cc1-8a01-7cc497faffcf /CentOS 5.6(64-bit) no GUI (XenServer) available public m achine BLOCKDEVICEMAPPING 0 TAG image ef7fbe39-9006-4cc1-8a01-7cc497faffcf ==================================== Delete tag for instance: [root@Host41-4 bin] # ./ec2-delete-tags instance:2d807bef-3bc4-41b4-836f-4ed933639637 --tag pupose=ssh1 [root@Host41-4 bin] # ./ec2-describe-tags TAG volume 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 hello vol123 TAG image de79846a-b5fa-4a94-9c63-348b363ade7c purpose sshenabled TAG snapshot 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 snap test [root@Host41-4 bin] # ./ec2-describe-instances 2d807bef-3bc4-41b4-836f-4ed933639637 RESERVATION 2d807bef-3bc4-41b4-836f-4ed933639637 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:sangee default INSTANCE 2d807bef-3bc4-41b4-836f-4ed933639637 9cc84337-28e9-4e33-a9ed-cb120feeb81f running sangee m1.small 2012-10-09T22:34:52+0530 zone2 monitoring- 10.147.40.94 XenServer TAG instance 2d807bef-3bc4-41b4-836f-4ed933639637 ================================ Delete tag for volume: [root@Host41-4 bin] # ./ec2-describe-volumes 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 VOLUME 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 20 zone2 available 2012-10-09T22:34:52+0530 ATTACHMENT 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 2d807bef-3bc4-41b4-836f-4ed933639637 0 attached 2012-10-09T22:34:52+0530 TAG volume 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 hello vol123 [root@Host41-4 bin] # ./ec2-delete-tags volume:1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 --tag hello=vol123 [root@Host41-4 bin] # ./ec2-describe-volumes 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 VOLUME 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 20 zone2 available 2012-10-09T22:34:52+0530 ATTACHMENT 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 2d807bef-3bc4-41b4-836f-4ed933639637 0 attached 2012-10-09T22:34:52+0530 TAG volume 1bb111d3-0fe0-42ab-8aa8-900e4efd1e34 [root@Host41-4 bin] # ================================ Delete tag for snapshot: [root@Host41-4 bin] # ./ec2-describe-snapshots 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 SNAPSHOT 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 27ed96cd-804f-4377-bb20-cae72f6611ad completed 2012-10-09T23:21:45+0530 100% 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:sangee 20 50e38e5d-35f8-48ca-870d-caa05fe5494a_ROOT-6_20121009175145 TAG snapshot 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 snap test [root@Host41-4 bin] # ./ec2-delete-tags snapshot:97a3e9af-739e-42f4-8aaf-8b882d10c5c6 --tag snap=test [root@Host41-4 bin] # ./ec2-describe-snapshots 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 SNAPSHOT 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 27ed96cd-804f-4377-bb20-cae72f6611ad completed 2012-10-09T23:21:45+0530 100% 49a740f4-babc-42c4-9a6e-b9090ec0b1bd:sangee 20 50e38e5d-35f8-48ca-870d-caa05fe5494a_ROOT-6_20121009175145 TAG snapshot 97a3e9af-739e-42f4-8aaf-8b882d10c5c6 [root@Host41-4 bin] # ================================ Delete tag for image: [root@Host41-4 bin] # ./ec2-describe-images de79846a-b5fa-4a94-9c63-348b363ade7c IMAGE de79846a-b5fa-4a94-9c63-348b363ade7c /test-ssh-sangee available public machine BLOCKDEVICEMAPPING 0 TAG image de79846a-b5fa-4a94-9c63-348b363ade7c purpose sshenabled [root@Host41-4 bin] # ./ec2-delete-tags image:de79846a-b5fa-4a94-9c63-348b363ade7c --tag puposr=sshenabled Server.InternalError: 431 Unable to find tags by parameters specified [root@Host41-4 bin] # ./ec2-delete-tags image:de79846a-b5fa-4a94-9c63-348b363ade7c --tag purpose=sshenabled [root@Host41-4 bin] # ./ec2-describe-images de79846a-b5fa-4a94-9c63-348b363ade7c IMAGE de79846a-b5fa-4a94-9c63-348b363ade7c /test-ssh-sangee available public machine BLOCKDEVICEMAPPING 0 TAG image de79846a-b5fa-4a94-9c63-348b363ade7c [root@Host41-4 bin] #

          People

          • Assignee:
            Rohit Yadav
            Reporter:
            Sangeetha Hariharan
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development