Re: [PATCH v2 01/10] hyperv: make Msvm_ComputerSystem WQL queries locale agnostic
> On Oct 6, 2020, at 4:21 AM, Daniel P. Berrangé wrote: > > On Mon, Oct 05, 2020 at 09:13:29PM -0400, Matt Coleman wrote: >>> On Oct 5, 2020, at 8:54 PM, Neal Gompa wrote: >>> >>> Should we require a bump to openwsman 2.6 for this? >> >> That won’t make any difference: openwsman 2.6+ supports specifying the >> locale, but Windows ignores it. So, this patch changes the queries to >> not use localized strings. > > Looking on repology.org for openwsman, I think we're totally fine to > bump the min openswman to 2.6.3 Since that change doesn’t directly affect this patchset, I’ll submit it separately instead of adding it to this series. -- Matt
Re: [PATCH v2 01/10] hyperv: make Msvm_ComputerSystem WQL queries locale agnostic
On Mon, Oct 05, 2020 at 09:13:29PM -0400, Matt Coleman wrote: > > On Oct 5, 2020, at 8:54 PM, Neal Gompa wrote: > > > > Should we require a bump to openwsman 2.6 for this? > > That won’t make any difference: openwsman 2.6+ supports specifying the > locale, but Windows ignores it. So, this patch changes the queries to > not use localized strings. Note we only need to target software versions present in our supported distro matrix. https://libvirt.org/platforms.html Looking on repology.org for openwsman, I think we're totally fine to bump the min openswman to 2.6.3 Regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|
Re: [PATCH v2 01/10] hyperv: make Msvm_ComputerSystem WQL queries locale agnostic
> On Oct 5, 2020, at 8:54 PM, Neal Gompa wrote: > > Should we require a bump to openwsman 2.6 for this? That won’t make any difference: openwsman 2.6+ supports specifying the locale, but Windows ignores it. So, this patch changes the queries to not use localized strings. -- Matt
Re: [PATCH v2 01/10] hyperv: make Msvm_ComputerSystem WQL queries locale agnostic
On Mon, Oct 5, 2020 at 9:13 PM Matt Coleman wrote: > > > On Oct 5, 2020, at 8:54 PM, Neal Gompa wrote: > > > > Should we require a bump to openwsman 2.6 for this? > > That won’t make any difference: openwsman 2.6+ supports specifying the > locale, but Windows ignores it. So, this patch changes the queries to > not use localized strings. > > -- > Matt > Ahh, okay then. Reviewed-by: Neal Gompa -- 真実はいつも一つ!/ Always, there's only one truth!
Re: [PATCH v2 01/10] hyperv: make Msvm_ComputerSystem WQL queries locale agnostic
On Mon, Oct 5, 2020 at 12:21 PM Matt Coleman wrote: > > There are two specific WQL queries we're using to get either a list of > virtual machines or the hypervisor host itself from Msvm_ComputerSystem. > Those queries rely on filtering results based on the "Description" > field. Since the "Description" field is locale sensitive, the queries > will fail if the Windows host is using a language pack. While the WSMAN > spec allows the client to set the requested locale (and it is supported > since openwsman 2.6.x), the Windows WinRM service does not respect this > setting: it returns non-English strings despite the WSMAN request > properly setting the locale to 'en-US'. Therefore, this patch changes > the WQL query to make use of the "__SERVER" field to stop relying on > English strings in queries and side step the issue. > > Co-authored-by: Dawid Zamirski > Signed-off-by: Matt Coleman > --- > src/hyperv/hyperv_wmi_classes.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/hyperv/hyperv_wmi_classes.h b/src/hyperv/hyperv_wmi_classes.h > index a19b6a656d..7465684d6e 100644 > --- a/src/hyperv/hyperv_wmi_classes.h > +++ b/src/hyperv/hyperv_wmi_classes.h > @@ -44,10 +44,10 @@ > */ > > #define MSVM_COMPUTERSYSTEM_WQL_VIRTUAL \ > -"Description = \"Microsoft Virtual Machine\" " > +"Name != __SERVER " > > #define MSVM_COMPUTERSYSTEM_WQL_PHYSICAL \ > -"Description = \"Microsoft Hosting Computer System\" " > +"Name = __SERVER " > > #define MSVM_COMPUTERSYSTEM_WQL_ACTIVE \ > "(EnabledState != 0 and EnabledState != 3 and EnabledState != 32769) " > -- > 2.27.0 > > Should we require a bump to openwsman 2.6 for this? -- 真実はいつも一つ!/ Always, there's only one truth!