Most of them are outdated, but provide historical design context.
They are not user documentation and should not be treated as such.
Documentation is available here.
Watchdog support in Engine
Summary
This feature adds watchdog support to engine. The feature will be available in server VM’s and especially useful when used with high availability.
Owner
- Name: Laszlo Hornyak (Lhornyak)
Current status
- Status: implementation
- Last updated: ,
- patchset
http://gerrit.ovirt.org/13057 - DB and entities changes, logic changes in BLL and vdsbroker
http://gerrit.ovirt.org/13059 - frontend
http://gerrit.ovirt.org/13060 - rest-api support
Detailed Description
Benefit to oVirt
Users will be able to add watchdog cards to their virtual machines. This will be especially important for highly available servers.
Dependencies / Related Features
This feature depends on the VDSM support for the watchdog cards (merged) The related patches:
Documentation / External references
For libvirt support, please see libvirt’s documentation on watchdog support.
User Interface
The watchdog support on the UI will be found on the new/edit VM/template window, on the high availablity tab, since mostly you need the watchdog in HA setups.
You can also find a user interface live demo on Youtube
Desktop
The desktop will have the very same HA tab as the server. This is a somewhat unrelated change, but the difference between desktop and server VM’s is about to be removed.
Backend changes
- Both Vm and Template will have support for watchdog cards
- Watchdog card is represented by a VmDevice
Watchdog notifications
- Since users must be aware of the watchdog operations, vdsm reports the last action taken by a watchdog for each VM in getVmStats.
-
This actions should be translated into system events
- An event will show up in the Web Admin.
- Users should be able to subscribe to watchdog event, so they will get a notification via the notification service.
Database changes
- none
REST Api changes
In REST API the VM and template will get a new optional tag watchdog directly under te vm tag. Watchdog tag will have two mandatory attributes: model and action
and then in the referenced watchdog url you will see something like this
Note here that there can be only one watchdog.
The watchdog cards and available actions will also get a list in the engine capabilities list (api/capabilities)
Watchdog behavior
In any case when the watchdog event is triggered, users will receive a **warning** level audit log entry associated with the VM.
- poweroff - shuts down the VM immediately. Not that if the VM is HA, it will be started automatically by the engine - possibly on another host.
- reset - restarts the VM. The engine will also be notified about the VM rebooting.
- pause - pauses the VM. User can resume the VM.
- dump - dumps and the VM goes to pause state
- none - no action is taken, but the watchdog event appears in the audit log
VDSM support
VDSM support for watchdog cards is already merged.
TODO
New features requested by Gilad Chaplik
- Adding watchdog data in vm general subtab
- Enabling watchdog fields according to supported compatibility version (iirc Missing in add watchdog canDoAction)
- Watchdog filtered events sub-tab for VM main tab (visible when watchdog is enabled)
- Search vms by last_event != null (> date (dream))
- Icon in VM grid (main tab) when watchdog is enabled or has event (in the last YYY time)
Test cases
- detecting the watchdog
- i6300esb is a pci device, the command
lspci | grep watchdog -i
in a guest linux OS will show you the watchdog card if it is installed - ib700: TODO
- i6300esb is a pci device, the command
- triggering the watchdog
- to crash the kernel:
echo c > /proc/sysrq-trigger
- to trigger watchdog:
kill -9 $(pgrep watchdog)
- to crash the kernel:
Create VM with watchdog (UI)
- Create a server VM
- set VM name
- click on “High Availability”
- set watchdog card to ‘i6300esb and watchdog action to reset
- save VM
- click on the new VM in the list
- click edit
- check if the watchdog device is set correctly
- use the rest api to see if the VM has the watchdog card
- click cancel
- start the VM
- click on the console icon to open SPICE console
- boot any linux distribution on the VM
- see if watchdog card is installed
Remove watchdog from VM (UI)
Depends on Create VM with watchdog (UI)
- create vm with watchdog (see above)
- edit vm
- go to high availablity tab
- set the watchdog model to empty
- save VM
- check on restapi, the watchdog tag must not appear now on the VM
Create template with watchdog (UI)
Dependens on Create VM with watchdog (UI)
- Create a server VM
- set VM name
- click on “High Availability”
- set watchdog card to ‘i6300esb and watchdog action to reset
- save VM
- create template from vm
- go to the templates tab
- click on the newly created template
- click on edit
- click on high availablity
- check if watchdog is set correctly
Create vm with watchdog from template (UI)
Depends: Create vm with watchdog from template (UI)
- go to the Virtual Machines tab
- click on the new server button
- select the template with watchdog as template
- save the VM
- edit the newvly created VM
- go to the high availability tab
- check that the watchdog settings are the same as in the template
Create vm with watchdog (REST-API)
- use the rest api to create a vm with a
<watchdog>
tag (see above) - check on the rest api if the watchdog card is persisted
Add watchdog to existing VM (REST-API)
- use the rest api to create a vm with a
<watchdog>
tag (see above) - check on the rest api if the watchdog card is persisted