[SOLVED] An host show multiple DS with same ID

Since yesterday, our hosts give a the datastore 0 twice, in the dashboard and in the CLI :

$ onehost show 7
LOCAL SYSTEM DATASTORE #0 CAPACITY                                              
TOTAL:                : 2.1T                
USED:                 : 1003G               
FREE:                 : 1.1T                

LOCAL SYSTEM DATASTORE #0 CAPACITY                                              
TOTAL:                : 2.1T                
USED:                 : 250.1G              
FREE:                 : 1.8T                

How can I reset this data without edit the database by hand :wink:

Versions of the related components and OS (frontend, hypervisors, VMs):
OpenNebula 5.6.0
KVM nodes in 5.6.0

Steps to reproduce:
I don’t really know…

Current results:
Two results are shown, only the first one in good.

Expected results:

$ onehost show 7
LOCAL SYSTEM DATASTORE #0 CAPACITY                                              
TOTAL:                : 2.1T                
USED:                 : 1003G               
FREE:                 : 1.1T                            

Can you execute the following command and paste the result?

onedb show-body host --id 7

There is the result :

# onedb show-body host --id 7
    <KVM_CPU_MODELS><![CDATA[486 pentium pentium2 pentium3 pentiumpro coreduo n270 core2duo qemu32 kvm32 cpu64-rhel5 cpu64-rhel6 kvm64 qemu64 Conroe Penryn Nehalem Westmere SandyBridge IvyBridge Haswell-noTSX Haswell Broadwell-noTSX Broadwell Skylake-Client athlon phenom Opteron_G1 Opteron_G2 Opteron_G3 Opteron_G4 Opteron_G5]]></KVM_CPU_MODELS>
    <KVM_MACHINES><![CDATA[pc-i440fx-2.8 pc pc-0.12 pc-i440fx-2.4 pc-1.3 pc-q35-2.7 pc-q35-2.6 xenpv pc-i440fx-1.7 pc-i440fx-1.6 pc-i440fx-2.7 pc-0.11 pc-i440fx-2.3 pc-0.10 pc-1.2 pc-i440fx-2.2 isapc pc-q35-2.5 xenfv pc-0.15 pc-0.14 pc-i440fx-1.5 pc-i440fx-2.6 pc-i440fx-1.4 pc-i440fx-2.5 pc-1.1 pc-i440fx-2.1 pc-q35-2.8 q35 pc-1.0 pc-i440fx-2.0 pc-q35-2.4 pc-0.13]]></KVM_MACHINES>
    <MODELNAME><![CDATA[Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz]]></MODELNAME>

Do you think the only way is to update-body ?

Can you remove wrong DS from DATASTORES section with update-body and check if OpenNebula recreate it?

I have recently discovered the origin of the issue. There was a backup of the monitor_ds.sh script named monitor_ds.sh.old, and it was synced on the kvm (onehost sync) and being executed every time.

The solution was to remove the script on opennebula master and also on every kvm node.