Hi Marios, On 12 July 2012 11:16, [email protected] <[email protected]> wrote: > Hi Daniel - many thanks for taking a look - more inline: > > On 11/07/12 20:27, Daniel Molina wrote: >> Hi Marios and Christian, >> >> Thanks for testing and debugging the OpenNebula driver. >> >> On 11 July 2012 15:51, [email protected] <[email protected]> wrote: >>> On 11/07/12 15:52, [email protected] wrote: >>>> Hi - I just applied Daniel's patch from this thread (its on list now for >>>> approval). After fixing a minor typo it solved an issue we saw in >>>> https://issues.apache.org/jira/browse/DTACLOUD-257 (errors getting a >>>> list of instances). >>>> >>>> I have two questions though: >>>> >>>> 1. Is there a way to determine the version of ON you are talking to? If >>>> I understand correctly, this patch brings us to ON 3.6 compatibility? >>>> This is what David Lutterkort was trying to gage - is it possible to >>>> determine the version and if so is it worth trying to 'fall back' to ON >>>> 3.x? Or are you happy with just requiring users to always be on latest >>>> version? >> >> Currently, there is no way to determine the OCCI server version, but >> we are including it in OpenNebula 3.8. The verbose mode is supported >> in OpenNebula 3.4 and 3.6, so I think it is a fair requirement to use >> OpenNebula >= 3.4. > > ok - good to know - at least if we get bug reports we can ask which > version of ON they are talking to. > >> >>>> >>>> 2. In https://issues.apache.org/jira/browse/DTACLOUD-257, the reporter >>>> (in cc here) mentions something I also noticed about the Machine states. >>>> You can only 'destroy' a machine when it is running. At first I thought >>>> this was an error - looking at the defined state machine in the >>>> opennebula driver: >>>> >>>> >>>> 143 define_instance_states do$ >>>> 144 start.to(:pending) .on( :create )$ >>>> 145 pending.to(:running) .automatically$ >>>> 146 stopped.to(:running) .on( :start )$ >>>> 147 running.to(:running) .on( :reboot )$ >>>> 148 running.to(:stopping) .on( :stop )$ >>>> 149 stopping.to(:stopped) .automatically$ >>>> 150 running.to(:stopping) .on( :destroy )$ >>>> 151 stopping.to(:finish) .automatically$ >>>> 152 end$ >>>> >>>> Are these states correct? Look at lines 148, 150 for example. >>>> >>>> After checking >>>> http://opennebula.org/documentation:archives:rel3.0:vm_guide_2 it seems >>>> that 'destroy only when running' is intended behaviour. Can you please >>>> confirm that? >>>> >>>> Thanks again for your support, >>>> >>>> marios >>>> >>> >>> just to add to this issue on states... is it true that there is no >>> longer a notion of 'restart'/'reboot' for a running machine... i.e. as >>> described in >>> https://issues.apache.org/jira/browse/DTACLOUD-257?focusedCommentId=13411504&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13411504 >>> >> >> The documentation you linked in the previous mail is for OpenNebula >> 3.0. In OpenNebula 3.6 this is the life cycle of a Virtual Machine: >> http://opennebula.org/documentation:rel3.6:vm_guide_2#virtual_machine_life-cycle >> >> And these are the available actions from OCCI, (the diagram is missing >> DONE from any state): >> http://opennebula.org/documentation:rel3.6:occidd#compute >> >> As you can see the actions available through OCCI are limited but you >> can 'destroy' a VM from any state and reboot a running VM. The error >> is in the state machine in the opennebula driver. This is the state >> machine that we use in the server: >> https://github.com/OpenNebula/one/blob/one-3.4/src/cloud/occi/lib/VirtualMachineOCCI.rb#L67 >> >> I will try to send you an updated state machine tomorrow >> > > Oh - sorry for that I was looking at wrong version. OK - any input you > provide will be appreciated. However, I just launched an instance > against http://occi.c12g.com and wasn't able to get STOPPED or REBOOT to > work - only DONE. I put some debug statements into the > driver/occi_client.. the XML looks like: > > For STOPPED and REBOOT: > > (rdb:39) xml > "\n <COMPUTE>\n <ID>2742</ID>\n <STATE>STOPPED</STATE>\n > </COMPUTE>\n \n" > > "\n <COMPUTE>\n <ID>2742</ID>\n <STATE>REBOOT</STATE>\n > </COMPUTE>\n \n" > > but both of these are giving me: > > #<CloudClient::Error:0xb732537c @message="[VirtualMachineAction] Wrong > state to perform action", @code="500"> > > > The server was definitely in RUNNING state on the deltacloud side. I'll > commit the patch you already sent (the one attached to > https://issues.apache.org/jira/browse/DTACLOUD-257) and then any more > bugs can be fixed ontop of that, > > thanks for all your help, marios
I think the problem is that the VM has not been deployed and it is in PENDING state, therefore you cannot stop or reboot it. The scheduler will deploy it in the next step. Can you try it again and check the VM state using Sunstone? Again an state machine issue, the driver should be aware of this state. Cheers > > >> >> BTW, in the patch regarding the verbose param for pools, It should be >> also included for instance_type (hardware profiles) requests >> >> >> If you have further questions do not hesitate to ask me anything. >> >> Cheers >> >> >>> >>> thanks, marios >>> >>> >>> >>>> >>>> >>>> On 10/07/12 19:55, [email protected] wrote: >>>>> Hi Daniel, Ruben, >>>>> >>>>> I thought it'd be appropriate to add to this thread and revive the >>>>> conversation; we've had a couple of bugs filed recently against the ON >>>>> driver; I'd be really grateful if you could have a look: >>>>> https://issues.apache.org/jira/browse/DTACLOUD-257 >>>>> https://issues.apache.org/jira/browse/DTACLOUD-258 >>>>> >>>>> In particular 257 as I couldn't quite get to the bottom of that one - >>>>> but also 258 as my solution imo is just a 'band-aid' - I think these >>>>> issues are indicative of a gap between the ON OCCI version the driver >>>>> was written for (3.2) and the current version running @ >>>>> http://occi.c12g.com/ (I assume this is 3.6 from you earlier comments?). >>>>> >>>>> As you guys are obviously the OpenNebula experts - I'd appreciate any >>>>> thoughts and comments and also I'd ask whether you had the time to take >>>>> a look at the current driver. There's no need for duplication of effort; >>>>> otherwise I'll be putting it on my to-do list for the near future. >>>>> >>>>> As always thank you very much for your time and consideration, >>>>> >>>>> all the best, marios >>>>> >>>>> >>>>> On 04/07/12 14:59, David Lutterkort wrote: >>>>>> On Wed, 2012-07-04 at 11:56 +0200, Ruben S. Montero wrote: >>>>>>> Hi, >>>>>>> >>>>>>> Do you mean back-porting the verbose option to OpenNebula 3.2? In this >>>>>>> line, we plan for our short roadmap to include a version API call so >>>>>>> clients can get the version of the server and adapt themselves to it. >>>>>>> >>>>>>> BTW, in OpenNebula.org we only support the last stable release, and >>>>>>> encourage people to upgrade. The next stable release (3.6) is scheduled >>>>>>> for >>>>>>> next week. This will make OpenNebula 3.2 two versions behind the last >>>>>>> stable. So I think we could just update the driver to use verbose mode, >>>>>>> and >>>>>>> throw an exception if the call is not supported. >>>>>> >>>>>> I meant: what's the patch that should be committed to the Deltacloud >>>>>> driver for OpenNebula ? >>>>>> >>>>>> I don't think we should just throw an exception, I'd rather the driver >>>>>> is smart enough to fall back to the (slow) way of doing things it's >>>>>> doing now if the ON instance doesn't support the verbose query param. >>>>>> >>>>>> David >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> >> > > -- Daniel Molina Project Engineer OpenNebula - The Open Source Solution for Data Center Virtualization www.OpenNebula.org | [email protected] | @OpenNebula
