← Back to team overview

openstack team mailing list archive

[NetStack] "Attach resource to port" semantics

 

Hi,

 

I would like to request clarity on the semantics of the "attach resource
to port" operation proposed in Quantum in the context of spawning a VM.
Let's discuss this with respect to a specific example. As of today,
nova-compute generates the domain configuration (libvirt.xml), including
the network interface configuration as below -

 

        <interface type='bridge'>

            <source bridge='br100'/>

            <mac address='02:16:3e:78:4d:84'/>

            <!--   <model type='virtio'/>  CANT RUN virtio network right
now -->

            <filterref filter="nova-instance-instance-00000001">

                <parameter name="IP" value="10.1.0.2" />

                <parameter name="DHCPSERVER" value="10.1.0.1" />

                <parameter name="PROJNET" value="10.1.0.0" />

                <parameter name="PROJMASK" value="255.255.255.128" />

            </filterref>

        </interface>

 

By virtue of specifying "br100" as the bridge to connect to,
nova-compute is configuring the attachment from the virtual NIC (on the
VM) to the network, and the "attachment" operation is (implicitly)
realized when the VM is spawned (and running).

 

With the introduction of the "attach resource to port" operation, we are
introducing an explicit step in the process of the VM spawning. It
implies that prior to invoking the "attach resource to port" operation,
nova-compute would not know which bridge to connect to (i.e. it would
not know the identity of "br100"). So does nova-compute first spawn the
VM without the network interface configuration? If that is the case, it
brings us to the next question, which is, what does the "attach resource
to port" operation actually do? There are at least two possibilities
here -

 

(1) The operation merely results in the identification (and, if
required, the configuration) of "br100" as the bridge to connect the
VM's network interface to. If that is the case, we need a way to
propagate this information (i.e. "br100") back to the entity which
invoked the "attach resource to port" operation. Subsequently, that same
entity will have to perform another action to craft the VM's network
interface configuration (with the acquired knowledge of "br100") and
also add this network interface to the configuration of the VM (by
making appropriate libvirt calls). Adding this network interface
configuration could be done, both, prior to starting the VM, or even
while the VM is running.

 

OR 

 

(2) The operation not only identifies/configuration of "br100", but also
crafts the VM's network interface configuration, and adds that interface
to the VM (by making appropriate libvirt calls). Note that this second
option amounts to Quantum controlling a resource on the VM (which
ideally should be outside the scope of Quantum).

 

OR, is it something else?

 

Kindly let me know what you thoughts are on this. As projected above,
these semantics have implications on how nova-compute will deal with
spawning VMs (and it might be different from what it is today), and
hence it might be important to address this issue sooner.

 

Thanks,

~Sumit.

PS: As I write this, it occurs to me that it's not very clear as to what
the "create port" operation would do in the above case as well, since no
actual port is created on the bridge. Any thoughts?

 


Follow ups

References