GabrielBrascher commented on a change in pull request #3171: Keep iotune
section in the VM's XML after live migration
URL: https://github.com/apache/cloudstack/pull/3171#discussion_r255931060
##########
File path:
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java
##########
@@ -346,13 +346,17 @@ String replaceIpForVNCInDescFile(String xmlDesc, final
String target) {
return xmlDesc;
}
- // Pass in a list of the disks to update in the XML (xmlDesc). Each disk
passed in needs to have a serial number. If any disk's serial number in the
- // list does not match a disk in the XML, an exception should be thrown.
- // In addition to the serial number, each disk in the list needs the
following info:
- // * The value of the 'type' of the disk (ex. file, block)
- // * The value of the 'type' of the driver of the disk (ex. qcow2, raw)
- // * The source of the disk needs an attribute that is either 'file' or
'dev' as well as its corresponding value.
- private String replaceStorage(String xmlDesc, Map<String,
MigrateCommand.MigrateDiskInfo> migrateStorage)
+ /**
+ * Pass in a list of the disks to update in the XML (xmlDesc). Each disk
passed in needs to have a serial number. If any disk's serial number in the
+ * list does not match a disk in the XML, an exception should be thrown.
+ * In addition to the serial number, each disk in the list needs the
following info:
+ * <ul>
+ * <li>The value of the 'type' of the disk (ex. file, block)
+ * <li>The value of the 'type' of the driver of the disk (ex. qcow2, raw)
+ * <li>The source of the disk needs an attribute that is either 'file' or
'dev' as well as its corresponding value.
+ * </ul>
+ */
Review comment:
> Do these two references to 'type' in any way have to do with the element
'auth'?
No, they are related to the disk 'type' and the driver 'type' only.
This documentation might be a bit confusing, I just formatted from a comment
to a Javadoc. However, it matches the code when describing a 'type' for the
disk `diskNodeAttributes.getNamedItem("type")` and another 'type' for the
driver `driverNodeAttributes.getNamedItem("type")`.
An XML for a disk with the type _file_ and with the driver _qcow2_ would be
structured as follows:
```
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
...
</disk>
```
The element 'auth' is related with the disk in case of the VM volume being
stored in a ceph cluster; however the 'auth' does not have a 'type' in its
section. Having the auth section as follows:
```
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<auth username='username'>
<secret type='ceph' uuid='ab123bbe-e1a0-3911-9928-3154566ca1c7'/>
</auth>
...
</disk>
```
Thanks for reviewing @DaanHoogland. Did I answer your question?
----------------------------------------------------------------
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