[virt-tools-list] [vhostmd PATCH 3/3] Change default transport order in vm-dump-metrics.

Jim Fehlig jfehlig at suse.com
Wed Dec 18 21:59:46 UTC 2019


On 11/25/19 11:36 AM, Michael Trapp wrote:
> From: d032747 <michael.trapp at sap.com>
> 
>>From a security perspective virtio should be the preferred transport
> and therefore the default transport order is virtio, disk[, xenstore]

This makes it sound as though we are changing the default transport order, when 
in fact we are only changing the order in which the transports are checked by 
the vm-dump-metrics tool.

> 
> A more problematic situation is an active vhostmd disk in the qemu config
> combined with a deactivated disk in the vhostmd config.

This sounds like the admin's self-inflicted wound :-).

> This configuration error would result in missing updates for vm-dump-metrics
> and a changed default transport order helps to prevent this situation.
> ---
>   vm-dump-metrics/main.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/vm-dump-metrics/main.c b/vm-dump-metrics/main.c
> index aff92ad..d902ac3 100644
> --- a/vm-dump-metrics/main.c
> +++ b/vm-dump-metrics/main.c
> @@ -127,10 +127,10 @@ int main(int argc, char *argv[])
>   
>      /*
>       * If no metrics source is specfied, try default order
> -    * disk, virtio, xenstore
> +    * virtio, disk, xenstore
>       */
> -   if (dump_metrics(dfile) == -1) {
> -       if (dump_virtio_metrics(dfile) == -1) {

Wouldn't dump_metrics() return -1 if "deactivated disk in the vhostmd config"?

Regards,
Jim

> +   if (dump_virtio_metrics(dfile) == -1) {
> +       if (dump_metrics(dfile) == -1) {
>   #ifdef WITH_XENSTORE
>              if (dump_xenstore_metrics(dfile) == -1)
>                  exit(1);
> 





More information about the virt-tools-list mailing list