Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL Import -> Data too long for column #35

Closed
wolf-in-sheeps-clothing opened this issue Nov 11, 2018 · 3 comments
Closed

SQL Import -> Data too long for column #35

wolf-in-sheeps-clothing opened this issue Nov 11, 2018 · 3 comments
Assignees
Labels
Milestone

Comments

@wolf-in-sheeps-clothing

Expected Behavior

The import of the host should be carried out

Current Behavior

After the first start of the daemon with "icingacli vspheredb daemon run", the connection to the vCenter is successfully established. The query of the host is also successful, but an import into the SQL DB is not possible because of the following error:

2018-11-11 09:28:28: Got 1 HostSystem from VCenter
2018-11-11 09:28:28: Ready to store HostSystem
2018-11-11 09:28:28: Storing host_system[XXXXXX] failed: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'bios_version' at row 1, 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' => 'XXXXXX',
'vcenter_uuid' => 'XXXXXX',
'host_name' => 'XXX.XXX.XXX.XXX',
'product_api_version' => '6.5',
'product_full_name' => 'VMware ESXi 6.5.0 build-5969303',
'bios_version' => 'SE5C610.86B.01.01.0020.122820161512',
'bios_release_date' => '2016-12-28 00:00:00',
'sysinfo_vendor' => 'TAROX',
'sysinfo_model' => 'ParX T4082i G5 Server',
'sysinfo_uuid' => '80df8d75-12f8-e511-8000-001e67fc2cf2',
'service_tag' => '1516258',
'hardware_cpu_model' => 'Intel(R) Xeon(R) CPU E5-2623 v3 @ 3.00GHz',
'hardware_cpu_mhz' => 2993,
'hardware_cpu_packages' => 2,
'hardware_cpu_cores' => 8,
'hardware_cpu_threads' => 16,
'hardware_memory_size_mb' => 98207.0,
'hardware_num_hba' => 3,
'hardware_num_nic' => 2,
'runtime_power_state' => 'poweredOn',
)}

The host is not imported and therefore not displayed. However, the import of the VM, the datastore, etc. is successful.

By the way, on my test system, the BIOS version is shorter and the import or the module works without problems! Good job, I love it.

Possible Solution

Extension of the field "BIOS Version" in the SGL schema?

Steps to Reproduce (for bugs)

Get the daemon to query a server with a long BIOS version! ;-)

Your Environment

  • VMware vCenter®/ESXi™-Version: ->see above
  • Version/GIT-Hash of this module: master
  • Icinga Web 2 version: 2.6.1
  • Operating System and version: Ubuntu Server 16.04.5 x64
@Thomas-Gelf Thomas-Gelf self-assigned this Nov 11, 2018
@Thomas-Gelf
Copy link
Contributor

Thanks for reporting this, has been fixed. Please pull the latest master, go to Virtualization (VMware) - Configuration and Apply the pending schema migration.

@Thomas-Gelf Thomas-Gelf added this to the v1.0.2 milestone Nov 11, 2018
@wolf-in-sheeps-clothing
Copy link
Author

Wow, what a quick fix!
Looks very good. Everything works as desired.
Many Many Thanks.

@Thomas-Gelf
Copy link
Contributor

Glad to hear that, you're welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants