VMware Cloud Community
DanMc85
Enthusiast
Enthusiast
Jump to solution

Site Read Locality Mismatch Force

 

This one is an odd one that I am wondering if there is a file in vCenter that I can edit in the shell or with an editor pulling a file with WinSCP.

There is a VSAN cluster that at one point was a ROBO deployment with 2-nodes and witness.

It was removed and replaced with a new cluster with three hosts in a VSAN deployment.

 

Somehow, vCenter kept the Site Read Locality setting disabled when it should be enabled by default.

vCenter keeps changing  /VSAN/DOMOwnerForceWarmCache to 1 when it should be 0.

 

I can run esxcfg-advcfg -s 0 /VSAN/DOMOwnerForceWarmCache on each host, however vCenter complains of a mismatch on the setting, and it tries to change it back to 1.

The GUI option for this, as it should be, is locked and greyed out.

 

Anyway I can force this in a backend config file or database so vCenter sees it as enabled and stops trying to change it from a 0 to a 1?

 

 

 

- DanMc85
VCP-DCV 2021
Reply
0 Kudos
2 Solutions

Accepted Solutions
TheBobkin
Champion
Champion
Jump to solution

@DanMc85 , Can you try changing this on the cluster config via the MOB?
 
Log into vCenter via SSH and log into RVC to enable the MOB:
 
root@vcsa-temp-b [ ~ ]# rvc localhost
 
> vsan.debug.mob -s /localhost
vSAN managed object browser is started, please access: https://vcsa-temp-b.abc.vmware.com/vsan/mob.
 
Via Browser, go to the address shown, log in as administrator@vsphere.local and you can check the current cluster-level configs via VsanClusterGetConfig, insert the cluster MOID (you can get the cluster MOID by clicking on the cluster in the vSphere client and looking at the URL bit that changes e.g. domain-xxxx) and invoke method e.g.:
 
<cluster type="ClusterComputeResource">domain-c9</cluster>
 
Values can be changed via VsanClusterReconfig spec by using the same cluster MOID, changing the value of disableSiteReadLocality and invoke method.
 
This can also be done via PowerCLI and also this isn't the only setting that can be changed (including other ones that no-longer exist in 7.0 UI e.g. cluster-level resync throttling).

 

View solution in original post

DanMc85
Enthusiast
Enthusiast
Jump to solution

 

Based on your area of what I needed to change.   I basically did it out step by step in PowerCLI to make sure I didn't make a mistake. Could have shortened it a bit, but either way it worked out. The setting is toggled as it should be and mismatch errors have gone away. Thanks for your guidance!

I tried it this way since I was getting that error using the Managed Object Browser you had me enable in your previous post.

 

Install-Module VMware.PowerCLI -Scope CurrentUser

import-module VMware.PowerCLI

 

$VsanCluster = Get-Cluster -Name "CLUSTER_NAME"
$vsanReconfigSpec = New-Object VMware.Vsan.Views.VimVsanReconfigSpec
$ExtendedConfig = New-Object VMware.Vsan.Views.VsanExtendedConfig
$ExtendedConfig.DisableSiteReadLocality = $False
$vsanReconfigSpec.ExtendedConfig = $ExtendedConfig
$VsanVcClusterConfig = Get-VsanView -Id "VsanVcClusterConfigSystem-vsan-cluster-config-system"
$VsanVcClusterConfig.VsanClusterReconfig($VsanCluster.ExtensionData.MoRef,$vsanReconfigSpec)

 

 

- DanMc85
VCP-DCV 2021

View solution in original post

Reply
0 Kudos
5 Replies
depping
Leadership
Leadership
Jump to solution

I have not seen this before. Normally changing the DomOwnerForceWarmCache setting should do it. I would suggest contacting support.

Reply
0 Kudos
TheBobkin
Champion
Champion
Jump to solution

@DanMc85 , Can you try changing this on the cluster config via the MOB?
 
Log into vCenter via SSH and log into RVC to enable the MOB:
 
root@vcsa-temp-b [ ~ ]# rvc localhost
 
> vsan.debug.mob -s /localhost
vSAN managed object browser is started, please access: https://vcsa-temp-b.abc.vmware.com/vsan/mob.
 
Via Browser, go to the address shown, log in as administrator@vsphere.local and you can check the current cluster-level configs via VsanClusterGetConfig, insert the cluster MOID (you can get the cluster MOID by clicking on the cluster in the vSphere client and looking at the URL bit that changes e.g. domain-xxxx) and invoke method e.g.:
 
<cluster type="ClusterComputeResource">domain-c9</cluster>
 
Values can be changed via VsanClusterReconfig spec by using the same cluster MOID, changing the value of disableSiteReadLocality and invoke method.
 
This can also be done via PowerCLI and also this isn't the only setting that can be changed (including other ones that no-longer exist in 7.0 UI e.g. cluster-level resync throttling).

 

DanMc85
Enthusiast
Enthusiast
Jump to solution

Thanks! 

Does this look right (see attached screenshot)?

I figured I only need to edit that one value versus that entire list it shows, with values different from the VsanClusterGetConfig.

 

cluster (required)

<cluster type="ClusterComputeResource">domain-c3524</cluster>

 

vsanReconfigSpec (required)

<vsanReconfigSpec xmlns:vim25="urn:vim25">
<vim25:extendedConfig>
<disableSiteReadLocality>false</disableSiteReadLocality>
</vim25:extendedConfig>
</vsanReconfigSpec>

 

 

However doing it this way gives:

Method Invocation Result: SystemError

NAME TYPE VALUE
faultCause MethodFault Unset
faultMessage LocalizableMessage[] Unset
reason string "boolean.modify"

- DanMc85
VCP-DCV 2021
Reply
0 Kudos
DanMc85
Enthusiast
Enthusiast
Jump to solution

 

Based on your area of what I needed to change.   I basically did it out step by step in PowerCLI to make sure I didn't make a mistake. Could have shortened it a bit, but either way it worked out. The setting is toggled as it should be and mismatch errors have gone away. Thanks for your guidance!

I tried it this way since I was getting that error using the Managed Object Browser you had me enable in your previous post.

 

Install-Module VMware.PowerCLI -Scope CurrentUser

import-module VMware.PowerCLI

 

$VsanCluster = Get-Cluster -Name "CLUSTER_NAME"
$vsanReconfigSpec = New-Object VMware.Vsan.Views.VimVsanReconfigSpec
$ExtendedConfig = New-Object VMware.Vsan.Views.VsanExtendedConfig
$ExtendedConfig.DisableSiteReadLocality = $False
$vsanReconfigSpec.ExtendedConfig = $ExtendedConfig
$VsanVcClusterConfig = Get-VsanView -Id "VsanVcClusterConfigSystem-vsan-cluster-config-system"
$VsanVcClusterConfig.VsanClusterReconfig($VsanCluster.ExtensionData.MoRef,$vsanReconfigSpec)

 

 

- DanMc85
VCP-DCV 2021
Reply
0 Kudos
TheBobkin
Champion
Champion
Jump to solution

@DanMc85 Sorry, could have saved you some time if had thought to link this kb https://kb.vmware.com/s/article/83742 - my colleague wrote the attached PowerCLI script for changing values via same API as MOB but different approach, likely only thing that would need modification to it is changing ResyncIopsLimitConfig to ExtendedConfig.DisableSiteReadLocality.

 

Either way, happy to help get this sorted.

Reply
0 Kudos