VMware: Using ShutdownGuest instead of PowerOffVM_Task, if vmtools was installed.

Bug #1445858 reported by javeme on 2015-04-19
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Low
Eric Brown

Bug Description

PowerOffVM_Task is a dangerous operation, while ShutdownGuest are more secure.
Using ShutdownGuest instead of PowerOffVM_Task, if vmtools was installed.

now:
def power_off_instance(session, instance, vm_ref=None):
    """Power off the specified instance."""

    if vm_ref is None:
        vm_ref = get_vm_ref(session, instance)

    LOG.debug("Powering off the VM", instance=instance)
    try:
        poweroff_task = session._call_method(session.vim,
                                         "PowerOffVM_Task", vm_ref)
        session._wait_for_task(poweroff_task)
        LOG.debug("Powered off the VM", instance=instance)
    except vexc.InvalidPowerStateException:
        LOG.debug("VM already powered off", instance=instance)

Eric Brown (ericwb) on 2015-05-01
Changed in nova:
importance: Undecided → Low
summary: - [VMware]Using ShutdownGuest instead of PowerOffVM_Task, if vmtools was
+ VMware: Using ShutdownGuest instead of PowerOffVM_Task, if vmtools was
installed.
Changed in nova:
status: New → Confirmed
status: Confirmed → Triaged
tags: added: low-hanging-fruit

Fix proposed to branch: master
Review: https://review.openstack.org/181628

Changed in nova:
status: Triaged → In Progress

Fix proposed to branch: master
Review: https://review.openstack.org/181634

Change abandoned by javeme (<email address hidden>) on branch: master
Review: https://review.openstack.org/181628
Reason: Submit code need to rebase.
Please go to https://review.openstack.org/181634

Changed in nova:
assignee: javeme (javaloveme) → Jialiang (jialiang-song517)
Jialiang (jialiang-song517) wrote :

Some errors were found by Gate in: https://review.openstack.org/264852
Can anybody help on how to proceed?

i have tried to resolve it following the below link but failed
http://docs.openstack.org/infra/manual/developers.html#automated-testing

Thanks in advance!

Jialiang (jialiang-song517) wrote :

Gate check is passed after some modification. Review is in progress.

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/181634
Reason: This patch is very old and appears to not be active any more. I am therefore abandoning it to keep the nova review queue sane. Feel free to restore the change when you're actively working on it again.

Jialiang (jialiang-song517) wrote :

A new patch has been submitted for review:
https://review.openstack.org/#/c/264852/3

Change abandoned by javeme (<email address hidden>) on branch: master
Review: https://review.openstack.org/181634

Changed in nova:
assignee: Jialiang (jialiang-song517) → javeme (javaloveme)
javeme (javaloveme) wrote :

@Jialiang (jialiang-song517) I noticed you also submitted a patch. If you have any good suggestions we can work together. Thanks!

Change abandoned by Matt Riedemann (<email address hidden>) on branch: master
Review: https://review.openstack.org/264852
Reason: Looks like the active development is happening in https://review.openstack.org/#/c/181634/ now.

Changed in nova:
assignee: javeme (javaloveme) → Eric Brown (ericwb)

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/181634
Reason: This patch has been sitting unchanged for more than 12 weeks. I am therefore going to abandon it to keep the review queue sane. Please feel free to restore the change if you're still working on it.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers