wrong local variable name in VMOPS._shutdown causes termination to fail

Bug #740935 reported by Salvatore Orlando
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Salvatore Orlando

Bug Description

It is currently not possible to successfully terminate XenAPI instances due to a misnamed local variable in vmops.py:

Correct variable name is vm_ref.

 def _shutdown(self, instance, vm_ref, hard=True):
        """Shutdown an instance"""
        state = self.get_info(instance['name'])['state']
        if state == power_state.SHUTDOWN:
---> LOG.warn(_("VM %(vm)s already halted, skipping shutdown...") % <---
                     locals())

Changed in nova:
assignee: nobody → Salvatore Orlando (salvatore-orlando)
status: New → In Progress
Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

A recent merge solved the issue.
The following code is now in trunk:

        if state == power_state.SHUTDOWN:
            instance_name = instance.name
            LOG.warn(_("VM %(instance_name)s already halted,"
                    "skipping shutdown...") % locals())
            return

I'd love to change the bug status... Invalid or Fix Committed?

Merge proposal has been put on hold. Will delete once the bug status is changed.

Thierry Carrez (ttx)
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → 2011.2
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.