wido commented on a change in pull request #1707: CLOUDSTACK-9397: Add Watchdog
timer to KVM Instance
URL: https://github.com/apache/cloudstack/pull/1707#discussion_r138831591
##########
File path:
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java
##########
@@ -237,6 +241,23 @@ public boolean parseDomainXML(String domXML) {
rngDefs.add(def);
}
+ NodeList watchDogs = devices.getElementsByTagName("watchdog");
+ for (int i = 0; i < watchDogs.getLength(); i++) {
+ WatchDogDef def = null;
+ Element watchDog = (Element)watchDogs.item(i);
+ String action = watchDog.getAttribute("action");
+ String model = watchDog.getAttribute("model");
+
+ if (Strings.isNullOrEmpty(action)) {
+ def = new
WatchDogDef(WatchDogModel.valueOf(model.toUpperCase()));
+ } else {
+ def = new
WatchDogDef(WatchDogAction.valueOf(action.toUpperCase()),
+
WatchDogModel.valueOf(model.toUpperCase()));
+ }
+
+ watchDogDefs.add(def);
+ }
Review comment:
I can do a check for that, but it's libvirt which will always return a model
there. I'll add a if-statement around it, but that shouldn't make a huge
difference. Thanks for the feedback!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services