Bug #1211

XEN shutdown script needs revisiting

Added by Tino Vázquez almost 8 years ago. Updated over 7 years ago.

Status:ClosedStart date:04/09/2012
Priority:NormalDue date:
Assignee:Javi Fontan% Done:

0%

Category:-
Target version:Release 3.6
Resolution:fixed Pull request:
Affected Versions:OpenNebula 3.4

Description

Issues:

  • Does a cancel, it shouldn't
  • Loop can be potentially infinite

Associated revisions

Revision 2de23bba
Added by Javi Fontan over 7 years ago

bug #1211: add retry and force_shutdown to scripts_common

Revision 19fe111f
Added by Javi Fontan over 7 years ago

bug #1211: change vmm/xen/shutdown to make use of retry and force_destroy

Revision c8d8e1d1
Added by Javi Fontan over 7 years ago

bug #1211: change vmm/kvm/shutdown to make use of retry and force_destroy

Revision 1b8bc3b5
Added by Javi Fontan over 7 years ago

bug #1211: add retry and force_shutdown to scripts_common
(cherry picked from commit 2de23bbaffdc64ddbaf90cc0fbfb2682986107c6)

Revision 808a5f8a
Added by Javi Fontan over 7 years ago

bug #1211: change vmm/xen/shutdown to make use of retry and force_destroy
(cherry picked from commit 19fe111fccd8a4371aebce630b9171d7e24c65c8)

Revision f0412aaa
Added by Javi Fontan over 7 years ago

bug #1211: change vmm/kvm/shutdown to make use of retry and force_destroy
(cherry picked from commit c8d8e1d1ccfee5db17fe464aacdb5336dd96b7bc)

Revision d364c3e5
Added by Javi Fontan over 7 years ago

bug #1211: default shutdown timeout is now 300 and typo fixing

Revision a902d20c
Added by Javi Fontan over 7 years ago

bug #1211: default shutdown timeout is now 300 and typo fixing
(cherry picked from commit d364c3e57f67790e64547b81f63c0c18ed58745c)

Revision 69cd251c
Added by Jaime Melis over 7 years ago

bug #1211: Remove unnecessary quotes in the shutdown script

Revision 0775a431
Added by Jaime Melis over 7 years ago

bug #1211: Remove unnecessary quotes in the shutdown script
(cherry picked from commit 69cd251c9120cd4528900a186359b707b7951382)

History

#1 Updated by Ruben S. Montero almost 8 years ago

  • translation missing: en.field_story_points set to 0

#2 Updated by Ruben S. Montero almost 8 years ago

  • Target version set to Release 3.6

#3 Updated by Ruben S. Montero almost 8 years ago

  • Assignee set to Javi Fontan

#4 Updated by Javi Fontan over 7 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

Two new functions are added to scripts common and both xen and kvm shutdown scripts make use of them:

# Parameters are times (seconds) and monitoring command (or function).
# Executes monitoring command until it is successful (VM is no longer
# running) or the timeout is reached.
function retry
{
    [...]
}

# Parameters are deploy_id and cancel command. If the last command is
# unsuccessful and $FORCE_DESTROY=yes then calls cancel command
function force_shutdown {
    [...]
}

Also new configuration variables are aded to the driver configuration:

# Senconds to wait after shutdown until timeout
export SHUTDOWN_TIMEOUT=120

# Uncoment this line to force VM cancellation after shutdown timeout
#export FORCE_DESTROY=yes

Also available in: Atom PDF