r81502 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81501‎ | r81502 | r81503 >
Date:03:10, 4 February 2011
Author:laner
Status:deferred
Tags:
Comment:
When terminating an instance, ensure any IP associated with it is disassociated.
Modified paths:
  • /trunk/extensions/OpenStackManager/OpenStackNovaController.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OpenStackManager/OpenStackNovaController.php
@@ -269,6 +269,12 @@
270270 * @return
271271 */
272272 function terminateInstance( $instanceId ) {
 273+ $this->getAddresses();
 274+ foreach ( $this->addresses as $address ) {
 275+ if ( $address->getInstanceId() == $instanceId ) {
 276+ $this->disassociateAddress( $address->getPublicIP() );
 277+ }
 278+ }
273279 $response = $this->novaConnection->terminate_instances( $instanceId );
274280
275281 return $response->isOK();

Status & tagging log