Skip to content

Deal with empty sysinfo_uuid values #83

@emanuel-b-q

Description

@emanuel-b-q

Current Behavior

When starting daemon, the data imported from VCenter containes the same value for different systems, but constraint prevents insert into DB.
When running: /usr/bin/icingacli vspheredb daemon run --trace --debug
I get the error message:

Task hostSystems failed: Storing host_system[q"_h
۳Ɵ] failed: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '00000000-0000-0000-0000-000000000000' for key 'sysinfo_uuid', query was: INSERT INTO host_system (uuid, vcenter_uuid, host_name, product_api_version, product_full_name, bios_version, bios_release_date, sysinfo_vendor, sysinfo_model, sysinfo_uuid, service_tag, hardware_cpu_model, hardware_cpu_mhz, hardware_cpu_packages, hardware_cpu_cores, hardware_cpu_threads, hardware_memory_size_mb, hardware_num_hba, hardware_num_nic, runtime_power_state) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) {array (
'uuid' => 'q"_h
۳Ɵ',
'vcenter_uuid' => 'yi6G7%S',
'host_name' => 'HOST.LOCAL.DOMAIN',
'product_api_version' => '6.0',
'product_full_name' => 'VMware ESXi 6.0.0 build-10719132',
'bios_version' => 'I27',
'bios_release_date' => '2015-08-16 00:00:00',
'sysinfo_vendor' => 'HP',
'sysinfo_model' => 'ProLiant BL460c G7',
'sysinfo_uuid' => '00000000-0000-0000-0000-000000000000',
'service_tag' => NULL,
'hardware_cpu_model' => 'Intel(R) Xeon(R) CPU X5660 @ 2.80GHz',
'hardware_cpu_mhz' => 2800,
'hardware_cpu_packages' => 2,
'hardware_cpu_cores' => 12,
'hardware_cpu_threads' => 24,
'hardware_memory_size_mb' => 196597.0,
'hardware_num_hba' => 1,
'hardware_num_nic' => 7,
'runtime_power_state' => 'poweredOn',
)}
Loading existing VirtualMachine from DB
Got 0 existing VirtualMachine
SOAPClient: got 13.43 MiB response in 3056.77ms
Got 5287 VirtualMachine from VCenter
Ready to store VirtualMachine
Task virtualMachines failed: First parameter must either be an object or the name of an existing class

Possible Solution

Remove constraint?

Steps to Reproduce (for bugs)

Even after droping DB, after restart/reinstall/recreate error persist.

Your Environment

  • VMware vCenter®/ESXi™-Version: 6.5U2
  • ESXi Hosts: 6.0U3
  • VSphere Client : 6.5.0
  • Version/GIT-Hash of this module: tried both: v1.0.3 and master
  • Icinga Web 2 version: 2.6.2
  • Operating System and version: RHEL7.4
  • Webserver, PHP versions: httpd-2.4.6-88.el7.x86_64; rh-php71-php-fpm-7.1.8

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions