<div dir="ltr">Hello,<br><br><div class="gmail_quote">On Wed, Sep 3, 2008 at 3:12 AM, William Voorsluys <span dir="ltr">&lt;<a href="mailto:williamvoor@gmail.com">williamvoor@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello Alvaro,<br>
<br>
I&#39;m forwarding this thread to ONE users. We are discussing on network<br>
customization in the context of the WS + ONE integration.<br>
<br>
More comments inline.<br>
<div><div></div><div class="Wj3C7c"><br>
&gt;&gt; Hello Alvaro,<br>
&gt;&gt;<br>
&gt;&gt; It&#39;s really good to hear you are interested in the integration between<br>
&gt;&gt; Globus WS and OpenNebula. My work regarding this integration was done<br>
&gt;&gt; as part of Google Summer of Code, which just finished a week ago.<br>
&gt;&gt; Since there are still some things to be improved, it would be nice if<br>
&gt;&gt; we joined our efforts.<br>
&gt;&gt; I&#39;m cc&#39;ing this reply to Borja, who mentored my project on Google SOC.<br>
&gt;&gt; Also, do you mind carrying on this discussion in the OpenNebula<br>
&gt;&gt; mailing list?<br>
&gt;<br>
&gt; I don&#39;t mind at all! :) I simply thought it might not be that interesting...<br>
&gt; hehe<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; &gt; For example, a problem I noticed, for which you already commented me a<br>
&gt;&gt; &gt; solution, was to know the IP of a submitted VM... With the reply I got<br>
&gt;&gt; &gt; from<br>
&gt;&gt; &gt; you, I got clear the way to know it... I was just wondering if there was<br>
&gt;&gt; &gt; a<br>
&gt;&gt; &gt; &quot;method&quot; which returned the IP to the user, just in case she is not<br>
&gt;&gt; &gt; managing<br>
&gt;&gt; &gt; the server, for example. Or to know VM&#39;s IP if the user didn&#39;t input any<br>
&gt;&gt; &gt; MAC<br>
&gt;&gt; &gt; at all...<br>
&gt;&gt; &gt; I&#39;ve implemented a &quot;Forward&quot; IpConfig - AcqusitionMethod, which simply<br>
&gt;&gt; &gt; lets<br>
&gt;&gt; &gt; OpenNEbula configure the network (I&#39;m totally replacing worksp-control<br>
&gt;&gt; &gt; backend!) and it doesn&#39;t do much (nothing?), of course. But I just<br>
&gt;&gt; &gt; imagined<br>
&gt;&gt; &gt; an implementation were the user, even without introducing a MAC address,<br>
&gt;&gt; &gt; got<br>
&gt;&gt; &gt; an IP (previously unknown for her) after submitting its template, to<br>
&gt;&gt; &gt; immediately start using the VM. I guess it&#39;s not possible and then I<br>
&gt;&gt; &gt; would<br>
&gt;&gt; &gt; just make a mapping function between MAC and IP addresses...<br>
&gt;&gt;<br>
&gt;&gt; On the Workspace Service, networking functionality (associations) is<br>
&gt;&gt; managed by a Network Adapter (NA), which is responsible for assigning<br>
&gt;&gt; IPs from a pool of available addresses. In fact, users don&#39;t input MAC<br>
&gt;&gt; address, instead the NA generates a MAC address and binds it to an IP<br>
&gt;&gt; address, then assigning this pair to a workspace configuration.<br>
&gt;<br>
&gt; This depends on one of the three acquisition methods imlemented, right? If<br>
&gt; so, the thing is that I want to implement a new &quot;Forward&quot; acquistiono<br>
&gt; method...<br>
<br>
</div></div>Exactly. The configuration steps I described are related to the<br>
AllocateAndConfigure method.<br>
<div class="Ih2E3d"><br>
&gt;&gt; Later on, the DHCP server is automatically configured by the backend<br>
&gt;&gt; script<br>
&gt;&gt; to assign that IP to the VM that requests an IP lease with that MAC<br>
&gt;&gt; address.<br>
&gt;<br>
&gt; To which backend script are you referring?<br>
<br>
</div>There are 3 Python scripts that deal with network customization:<br>
dhcp-conf-alter.py, &nbsp;dhcp-config.sh and &nbsp;ebtables-config.sh. They are<br>
part of the Workspace backend. Since I have replaced the current<br>
backend, these scripts are not used. However, as I mentioned it would<br>
not be hard to port these scripts to allow automatic network<br>
configuration on this integration. The Workspace front-end itself, via<br>
a network adapter, could invoke this script to make the necessary<br>
changes to the DHCP server config file. Thus, provided that the image<br>
submitted is configure to use DHCP and its primary NIC is bound the<br>
correct bridge, the VM would automatically acquire one of the IP<br>
address available on the chosen association.<br>
I have not looked deeply into the current network adapter<br>
implementation, so I&#39;m not sure how this would be done.<br>
In summary, my suggestion to you would be trying to improve network<br>
customization on the WS side instead of having this &quot;Forward&quot;<br>
acquisition method.</blockquote><div><br>Yes, it would be nice to improve current networking settings, but in my approach, I must use this &quot;Forward&quot; method. Any case, those improvements can be made in the near future, but I&#39;m not planning to do them right now...<br>
&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
Cheers,<br>
<br>
William.<br>
<div><div></div><div class="Wj3C7c"><br>
&gt;&gt; IMO this functionality should be preserved (possibly ported from the<br>
&gt;&gt; backend scripts to the service side) so that even if we drop the<br>
&gt;&gt; original backend scripts we would have automatic DHCP configuration.<br>
&gt;<br>
&gt; This would be perfect, but this should really be automagic network<br>
&gt; configuration. What I want is the case in which you want an implementation<br>
&gt; where the Workspace frontend doesn&#39;t know anything about the backend (one,<br>
&gt; to the case) but the IP of the server hosting the backend...<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; That also means that ONE does not need to manage networking. Porting<br>
&gt;&gt; these scripts was one of the things I wanted to do but time didn&#39;t<br>
&gt;&gt; allow, but you might be interested in doing. Such an effort would<br>
&gt;&gt; allow ONE to have automatic IP assignment using the &quot;acquisition<br>
&gt;&gt; methods&quot; already implemented in the WS.<br>
&gt;<br>
&gt; My approach was different: I wanted to implement a new &quot;Forward&quot; acquistion<br>
&gt; method. It would just let any backend (in this case onevm) configure network<br>
&gt; settings. In other words, Workspace would not be responsible in assigning<br>
&gt; IP, but the backend.<br>
&gt; The idea was that the resourcepool file contained only one line to the (ONE)<br>
&gt; backend server, who would be in charge to configure everything... In your<br>
&gt; approach, where do you get the backend IP from? Is it, to say something, the<br>
&gt; first line of that file?<br>
&gt; Because I think that someone may provide a ONE service (I mean, a cluster<br>
&gt; virtualization service) and should not know anything about any other IP but<br>
&gt; backend&#39;s. That way, the user would only ask for an execution of a VM and<br>
&gt; then would get an IP in return, to start using it... Do you think this is<br>
&gt; feasible? Any help? Because I might be overlooking something...<br>
&gt;<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; &gt; Another question I came up with, was a correct mapping between<br>
&gt;&gt; &gt; Workspace&#39;s<br>
&gt;&gt; &gt; &quot;reboot&quot;, &quot;pause&quot; and &quot;unpause&quot; flags to OpenNEbula&#39;s, with no proper<br>
&gt;&gt; &gt; candidates for the moment (onevm&#39;s &quot;save&quot; and &quot;restore&quot; is not exactly<br>
&gt;&gt; &gt; the<br>
&gt;&gt; &gt; same!)...<br>
&gt;&gt; &gt; As of now, I&#39;ve mapped the following flags parsed to the programs:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Workspace | worksp-control | onevm | xm:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; deploy | create | onevm submit + onevm deploy (to which machine? maybe<br>
&gt;&gt; &gt; using<br>
&gt;&gt; &gt; the getHosts API you commented??) | scp... + xm create...<br>
&gt;&gt; &gt; destroy | remove | onevm shutdown | xm shutdown...<br>
&gt;&gt; &gt; destroy --deleteall | remove deleteall | onevm cancel | xm destroy...<br>
&gt;&gt; &gt; shutdown-save | remove + unpropagate | onevm shutdown + onevm delete |<br>
&gt;&gt; &gt; xm<br>
&gt;&gt; &gt; shutdown...<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; But what about reboot, pause, unpause? Do you have a different solution?<br>
&gt;&gt; &gt; No<br>
&gt;&gt; &gt; direct mapping for those cases I guess...<br>
&gt;&gt;<br>
&gt;&gt; First of all, please note I haven&#39;t used the CLI to invoke ONE<br>
&gt;&gt; commands. Instead, I&#39;m using ONE&#39;s XML-RPC API.<br>
&gt;<br>
&gt; I think your aproach might be better and, indeed, I was thinking of porting<br>
&gt; my existing solution... Because I faced problems like getting the ID of the<br>
&gt; newly submitted template that, in your aproach, is easily handled :D<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Anyway, the mapping I used was the following:<br>
&gt;&gt;<br>
&gt;&gt; 1. deploy -&gt; onevm submit<br>
&gt;&gt; I don&#39;t call &#39;onevm deploy&#39; since I assume that scheduling will be done by<br>
&gt;&gt; ONE.<br>
&gt;<br>
&gt; Yes, I agree. Anyway, do you leave worksp-control --propagate unimplemented<br>
&gt; (just like shutdown-save) or make it call onevm submit?<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; 2. For destroy related commands I simply call &#39;onevm shutdown&#39;. I&#39;m<br>
&gt;&gt; not using onevm delete. Maybe I should call delete sometime, but this<br>
&gt;&gt; is not currently done. Also, there is not such command &#39;onevm cancel&#39;,<br>
&gt;&gt; is there?<br>
&gt;<br>
&gt; You&#39;re right. With onevm shutdown should work... But what about using onevm<br>
&gt; delete in the unpropagate worksp-control flag? Or leave it unimplemented? I<br>
&gt; think it may fit... By the way, there is no such a onevm cancel, you&#39;re<br>
&gt; right :p I turns out that I saw a function (action_cancel) in<br>
&gt; ./src/vmm_mad/xen/one_vmm_xen.rb which calls, indeed, the xm destroy<br>
&gt; command, which is, in turn, what worksp-control --remove --deleteall<br>
&gt; calls...<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; 3. Shutdown save<br>
&gt;&gt; The notion of &#39;propagation&#39; is not really necessary when using ONE,<br>
&gt;&gt; since it relies on NFS to propagate VM images to the nodes. So, once<br>
&gt;&gt; the VM is shutdown, its image is already unpropagated, which in the WS<br>
&gt;&gt; context means copying the VM image back from cluster nodes to the node<br>
&gt;&gt; where the WS is installed.<br>
&gt;<br>
&gt; You&#39;re absolutely right. So I guess Workspace --shutdown-save is like<br>
&gt; Workspace --shutdown, whic in turn calls onevm shutdown too, right? Or it is<br>
&gt; a different case to Workspace --destroy? At the end, we might have three<br>
&gt; Workspace flags executing onevm shutdown... :p<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; 4. Reboot<br>
&gt;&gt; onevm stop + resume.<br>
&gt;<br>
&gt; But onevm stop saves the state of the machine, just like suspend does<br>
&gt; (<a href="http://www.opennebula.org/doku.php?id=documentation:rel1.0:ug" target="_blank">http://www.opennebula.org/doku.php?id=documentation:rel1.0:ug</a>) and does not<br>
&gt; shutdown the machine, right? I mean, when you resume it back again, it goes<br>
&gt; to the previous state (with its previous configuration and errors :p) of the<br>
&gt; VM, isn&#39;t it?<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; 5. Pause/Unpause<br>
&gt;&gt; onevm suspend &nbsp;+ resume<br>
&gt;<br>
&gt; I think this is the more similar mapping, though IMO, onevm suspend is like<br>
&gt; &quot;hibernation&quot; and worksp-control --pause is like &quot;suspend&quot; ;)<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m not sure if this mapping is perfect or not. But we can discuss<br>
&gt;&gt; this further with the OpenNebula developers.<br>
&gt;&gt;<br>
&gt;&gt; &gt; Though I have some more annoyances in my head, those are the important<br>
&gt;&gt; &gt; ones... What do you think, may we share information about it? ;) I<br>
&gt;&gt; &gt; really<br>
&gt;&gt; &gt; hope so... :)<br>
&gt;&gt; &gt; In any case, I guess you&#39;re very busy so I&#39;d like to absolutely thank<br>
&gt;&gt; &gt; you<br>
&gt;&gt; &gt; for reading until here and giving me some attention!<br>
&gt;&gt;<br>
&gt;&gt; Please e-mail me anytime!<br>
&gt;<br>
&gt; Thank you very very much for all your time and help provided :)<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; I will also forward you the pointers to the code I have produced<br>
&gt;&gt; during this summer.<br>
&gt;&gt;<br>
&gt;&gt; Cheers,<br>
&gt;&gt;<br>
&gt;&gt; William<br>
&gt;<br>
&gt; Best regards,<br>
&gt;<br>
&gt; Alvaro<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Álvaro<br>
&gt;<br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
William Voorsluys<br>
<br>
<a href="http://williamvoor.googlepages.com" target="_blank">williamvoor.googlepages.com</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Álvaro<br>
</div>