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

Bug #1445858 reported by javeme
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
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)
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

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)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Revision history for this message
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!

Revision history for this message
Jialiang (jialiang-song517) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

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.

Revision history for this message
Jialiang (jialiang-song517) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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)
Revision history for this message
javeme (javaloveme) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Sean Dague (<email address hidden>) on branch: master
Review: https://review.openstack.org/181634
Reason: This review is > 4 weeks without comment, and is not mergable in it's current state. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

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.