{"id":122,"date":"2015-09-30T09:36:18","date_gmt":"2015-09-30T08:36:18","guid":{"rendered":"http:\/\/www.haxed.me.uk\/?p=122"},"modified":"2015-09-30T09:38:59","modified_gmt":"2015-09-30T08:38:59","slug":"cancelling-a-stuck-soft-reboot-task-on-xen-server","status":"publish","type":"post","link":"https:\/\/haxed.me.uk\/index.php\/2015\/09\/30\/cancelling-a-stuck-soft-reboot-task-on-xen-server\/","title":{"rendered":"Cancelling a stuck soft reboot task on Xen Server"},"content":{"rendered":"<p>Today, one of my fellow colleagues received a call about a server that had run out of memory. They sent a soft reboot, and because of that the process task hung. This is because the hypervisor compute node sends a message to the nova agent running on the guest virtual machine! If the guest virtual machine has run out of memory, it&#8217;s not possible for nova to receive that command, or, if it does, then the soft (software) reboot can fail, because there is not enough memory to fork the process.<\/p>\n<p>This could have been avoided by issuing a hard reboot straight away, but in this case we needed to cancel the task and send a hard reboot. Here is what I did:<\/p>\n<p>List all pending tasks on xen-server<\/p>\n<pre>\r\n# xe task-list\r\n\r\nuuid ( RO)                : a9f84f3d-0b96-8da2-a1d1-f5b774cd9173\r\n          name-label ( RO): VM.clean_reboot\r\n    name-description ( RO): \r\n              status ( RO): pending\r\n            progress ( RO): 0.275\r\n<\/pre>\n<p>Cancel a pending task on xen-server<\/p>\n<pre>\r\nxe task-cancel uuid=a9f84f3d-0b96-8da2-a1d1-f5b774cd9173\r\n<\/pre>\n<p>This sets the active_state back to normal and gets rid of the &#8216;pending soft reboot&#8217;, but we need to restart the server too.<\/p>\n<p>Using supernova API to stop and restart the server<\/p>\n<pre>\r\nsupernova lon stop serveruuidhere\r\nsupernova lon start serveruuidhere\r\n<\/pre>\n<p>and&#8230;The customer is back up online and running, yay!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today, one of my fellow colleagues received a call about a server that had run out of memory. They sent a soft reboot, and because of that the process task hung. This is because the hypervisor compute node sends a &hellip; <a href=\"https:\/\/haxed.me.uk\/index.php\/2015\/09\/30\/cancelling-a-stuck-soft-reboot-task-on-xen-server\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-122","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/comments?post=122"}],"version-history":[{"count":0,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/122\/revisions"}],"wp:attachment":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/categories?post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/tags?post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}