[one-users] OCCI syntax - [Wrong type! error] AND No ARCH defined BUG

Ruben S. Montero rubensm at dacya.ucm.es
Wed Dec 22 02:20:22 PST 2010


Hi

>
> Perhaps is it a bug in the update script?
> Anyway, I'm glad the occi request works now.
>

Thanks, this was already fixed in 2.0.1

>
>
>
> So the 'git pull' solved my occi problem but it produced a new one:
> My VM's cannot be instantiate anymore:
> Vm.log --> [VMM] [E]: No ARCH defined and no default provided
>
> I can resolve it by adding [1]
> OS = [ ARCH="x86_64"]
> to my one template BUT since "ARCH" is not part of the OGF OCCI
> specification this can be a big problem?
>

The idea here is to abstract the user of the cloud from that so you define
types which are 64 bits or that you are sure that match the OS installed in
the images. So the images are less error prone for the "public" user



>
> For my installation even the suggested modification (according to [2])
> by manually setting the ARCH type in
> $ONE_LOCATION/etc/vmm_ssh/vmm_ssh_kvm.conf
> to
> OS = [boot = "hd", ARCH="x86_64"]
> didn't worked and resulted in the same error in the vm.log
> "No ARCH defined and no default provided
>


I can not reproduce this, can you re-check that you have pulled version
2.0.1, install it and that you are actually running that version

Thanks for the feedback

Cheers

Ruben

Marco
>
>
> -----Original Message-----
> From: dmamolina at gmail.com [mailto:dmamolina at gmail.com] On Behalf Of
> Daniel Molina Aranda
> Sent: Tuesday, December 21, 2010 12:01 PM
> To: Strutz, Marco
> Cc: users at lists.opennebula.org
> Subject: Re: [one-users] OCCI syntax - [Wrong type! error]
>
> Hi,
>
> On one hand the problem is the template that you are using. You are
> asking for a disk linked to a storage resource and a nic linked to an
> existing network, so that the template should be:
>
> <COMPUTE>
>       <NAME>sl5.5</NAME>
>       <DISK>
>               <STORAGE href="http://yourserver/storage/3" />
>               <TARGET>hda</TARGET>
>       </DISK>
>       <NIC>
>               <NETWORK href="http://yourserver/network/2" />
>       </NIC>
>       <INSTANCE_TYPE>small</INSTANCE_TYPE>
>       <CONTEXT>
>               <HOSTNAME>onevm</HOSTNAME>
>               <FILES>/srv/cloud/one/context/resources/software.tar.gz
> /srv/cloud/one/context/resources/init.sh</FILES>
>               <TARGET>hdb</TARGET>
>       </CONTEXT>
> </COMPUTE>
>
> For more information about OCCI usage [1], [2]
>
> On the other hand there is a bug using xml templates that defines their
> elements in more than one line, like this:
>
> <COMPUTE>
>       <NAME>
>               foo
>       </NAME>
>       .....
> </COMPUTE>
>
>
> I have opened a ticket regarding this issue [3]
>
> Hope this helps.
>
> [1] http://www.opennebula.org/documentation:rel2.0:occiug
> [2] http://www.opennebula.org/documentation:rel2.0:occidd
> [3] http://dev.opennebula.org/issues/454
>
> On 21 December 2010 10:36, Strutz, Marco
> <marco.strutz at fokus-extern.fraunhofer.de> wrote:
>
>
>        Hi.
>
>        Thanks for helping.
>        I have updated to the latest git-version but there is still the
> same
>        "Wrong Type!" message.
>
>        Perhaps it is really a problem about the occi syntax? Is there a
> way to
>        validate it? Is it possible to manually add some debug-output to
> the
>        ruby code: which file is responsible for parsing the xml
> description?
>
>
>        Thanks
>        Marco
>
>        -----Original Message-----
>        From: dmamolina at gmail.com [mailto:dmamolina at gmail.com] On Behalf
> Of
>        Daniel Molina Aranda
>        Sent: Monday, December 20, 2010 11:18 AM
>        To: Strutz, Marco
>        Cc: users at lists.opennebula.org
>        Subject: Re: [one-users] OCCI syntax - [Wrong type! error]
>
>
>        Hi,
>
>        The reason of that error is a typo in the common.erb file. It
> was fixed
>        in the last maintenance release. [1]
>
>        In the python code, you have to use the VM template syntax [2],
> because
>        you are interacting with the core using the xmlrpc api.
>
>        Hope this helps.
>
>        [1]
>
> http://dev.opennebula.org/projects/opennebula/repository/revisions/18361
>
> ccfe643632aba5dd84e5128d8fbaa1774bb/diff/src/cloud/occi/etc/templates/co
> <http://dev.opennebula.org/projects/opennebula/repository/revisions/1836
> 1
> ccfe643632aba5dd84e5128d8fbaa1774bb/diff/src/cloud/occi/etc/templates/co
> >
>        mmon.erb
>        [2] http://www.opennebula.org/documentation:rel2.0:template
>
>
>        On 20 December 2010 10:18, Strutz, Marco
>        <marco.strutz at fokus-extern.fraunhofer.de> wrote:
>
>
>               Hi.
>
>               I want to use OpenNebula for dynamic instantiation of
> virtual
>        machines
>               by interfacing OCCI.
>               Unfortunately I'm facing some problems with the occi
> template
>        definition
>               syntax.
>               Can you please help with the "Wrong type!" error?
>
>
>
>
>               the problem:
>               ************
>               $ occi-compute create occiTemplate.xml
>               Wrong type!
>
>
>               --> "Wrong type!" is the response of the OCCIServer.
>        'occi-compute'
>               works fine.
>
>
>
>               the template
>               *************
>               $ cat occiTemplate.xml
>               <COMPUTE>
>                      <NAME>sl5.5</NAME>
>                      <STORAGE>
>                              <DISK image="3" dev="hda" />
>                      </STORAGE>
>                      <NETWORK>
>                              <NIC network="2" />
>                      </NETWORK>
>                      <INSTANCE_TYPE>
>                                      small
>                      </INSTANCE_TYPE>
>                      <CONTEXT>
>                              <HOSTNAME>
>                                      onevm
>                              </HOSTNAME>
>                              <FILES>
>
>        /srv/cloud/one/context/resources/software.tar.gz
>               /srv/cloud/one/context/resources/init.sh
>                              </FILES>
>                              <TARGET>
>                                           hdb
>                              </TARGET>
>                      </CONTEXT>
>               </COMPUTE>
>
>
>
>
>
>
>
>               same template but this time as xmlrpc request
>               *********************************************
>               $ python xmlrpcDeploy.py
>               xmlrpc-response.status  = False
>               xmlrpc-response.message = [VirtualMachineAllocate] Error
> trying
>        to PARSE
>
>               VM TEMPLATE Returned error code [1].. Reason: syntax
> error,
>        unexpected
>               VARIABLE, expecting EQUAL or EQUAL_EMPTY at line 1,
> columns
>        15:19
>
>
>
>
>               python source for xmlrpc request
>               ********************************
>               $ cat xmlrpcDeploy.py
>               import xmlrpclib
>
> server=xmlrpclib.ServerProxy("http://localhost:2633/RPC2")
>               oneAuth =
> "oneadmin:7bc8559a8fe509e680562b85c337f170956fcb06"
>               template = (
>               '<COMPUTE>'
>               ' <NAME>sl5.5</NAME>'
>               ' <STORAGE>'
>               ' <DISK image="3" dev="hda" />'
>               ' </STORAGE>'
>               ' <NETWORK>'
>               ' <NIC network="2" />'
>               ' </NETWORK>'
>               ' <INSTANCE_TYPE>'
>               '        small'
>               ' </INSTANCE_TYPE>'
>               ' <CONTEXT>'
>               ' <HOSTNAME>'
>               '            onevm'
>               ' </HOSTNAME>'
>               ' <FILES>'
>               '
> /srv/cloud/one/context/resources/software.tar.gz
>               /srv/cloud/one/context/resources/init.sh'
>               ' </FILES>'
>               ' <TARGET>'
>               '            hdb'
>               ' </TARGET>'
>               ' </CONTEXT>'
>               '</COMPUTE>'
>               )
>
>               response = server.one.vm.allocate(oneAuth, str(template))
>               status = str(response[0])
>               message = str(response[1])
>               print 'xmlrpc-response.status  = ' + status
>               print 'xmlrpc-response.message = ' + message
>
>
>
>
>               occi-server.log
>               **************
>               (...)
>               127.0.0.1 - - [17/Dec/2010 16:51:27] "POST /compute
> HTTP/1.1"
>        500 11
>               0.0016
>
>
>               one_xmlrpc.log
>               **************
>               (...)
>               127.0.0.1 -  - [17/Dec/2010:17:43:54 +0100] "POST" 200
> 463
>
>
>
>               --> no more hints
>
>
>                opennebula version
>               *******************
>               $ git log | head -n 3
>               commit 5f6b326c52a53fbc709c1c35bf1a301b1593a775
>               Author: Jaime Melis <j.melis at fdi.ucm.es>
>               Date:   Mon Nov 8 19:35:42 2010 +0100
>
>
>               python version
>               **************
>               $ python
>               Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
>               [GCC 4.4.3] on linux2
>
>
>
>
>               thanks in advance
>               Marco
>
>               _______________________________________________
>               Users mailing list
>               Users at lists.opennebula.org
>
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>
>
>
>
>        --
>        Daniel Molina, Cloud Technology Engineer/Researcher DSA Research
> Group:
>        web http://dsa-research.org and blog
> http://blog.dsa-research.org
>        OpenNebula Open Source Toolkit for Cloud Computing:
>        http://www.OpenNebula.org
>
>
>
>
>
>
> --
> Daniel Molina, Cloud Technology Engineer/Researcher DSA Research Group:
> web http://dsa-research.org and blog http://blog.dsa-research.org
> OpenNebula Open Source Toolkit for Cloud Computing:
> http://www.OpenNebula.org
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>



-- 
Dr. Ruben Santiago Montero
Associate Professor (Profesor Titular), Complutense University of Madrid

URL: http://dsa-research.org/doku.php?id=people:ruben
Weblog: http://blog.dsa-research.org/?author=7
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20101222/626f08a4/attachment-0003.htm>


More information about the Users mailing list