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

Importing items in data source with empty 'interitance/template' field gives SQL error #2268

Closed
geoffhouse opened this issue Jan 18, 2021 · 0 comments

Comments

@geoffhouse
Copy link

Expected Behavior

I've created a data import source (and sync) which transfers addresses, names and notes from PHPIPAM.
Until this version of director you could import hosts with an empty 'import'/template field.
Icinga Director would fail to deploy, but you could fix the problem by adding one or more host templates, then redeploy.

Steps to Reproduce (for bugs)

  • import job creates a host with an empty template field
  • click on the created host in icinga director and see the following error:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) AND (object_type = 'template')' at line 1, query was: SELECT icinga_host.id FROM icinga_host WHERE (object_name in ()) AND (object_type = 'template')
See
stack_trace for more info ...

Possible Solution

Maybe this has been an undocumented bug (now fixed). If so, could you provide a way to either:

  1. fix the problem
  2. insist on a template value when importing (ideally a placeholder which can be overwritten by a user in the GUI)

Your Environment

  • Director version (System - About): master / e4e9620
  • Icinga Web 2 version and modules (System - About): 2.8.2
  • Icinga 2 version (icinga2 --version): r2.12.3-1
  • Operating System and version: Ubuntu 18.04.5
  • Webserver, PHP versions: Apache/2.4.29 / PHP 7.2.24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant