I guess this could be due to differences in ReservationStrategy 'Create' and 'Start'. Both the strategies would need a prepare, but require release only for 'Start' reservation strategy.
Please refer to [1] for explanation of reservation strategies. [1]http://mail-archives.apache.org/mod_mbox/incubator-cloudstack-dev/201205 .mbox/%3CB1DF26ECC0458748AC97CECE2DA98D41011D278DAB17@SJCPMAILBOX01.citrite .net%3E On 16/01/13 11:21 AM, "Mills, Joseph" <j...@midokura.jp> wrote: >I was hoping someone could clarify something I am seeing in >NetworkManagerImpl.java > >I see that whenever we prepare a nic, we call element.prepare, regardless >of the ReservationStrategy of the nic: > >https://github.com/apache/incubator-cloudstack/blob/master/server/src/com/ >cloud/network/NetworkManagerImpl.java#L2208 > >However, when we then destroy a VM, it seems that we only call >element.release if the ReservationStrategy is 'Start': > >https://github.com/apache/incubator-cloudstack/blob/master/server/src/com/ >cloud/network/NetworkManagerImpl.java#L2291 > >It mentions on this wiki page that the release call is the dual of the >prepare call, so I was expecting to see a corresponding release call made >for every prepare call we make. > >https://cwiki.apache.org/CLOUDSTACK/extending-cloudstack-networking.html > >Is there any other place we should expect to see the release call being >made? > >thanks, >Joe >