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

Sync rule (Object type „datalistEntry“) after update to 1.10.0: Column not found: 1054 Unknown column 'uuid' #2618

Closed
tectumopticum opened this issue Sep 29, 2022 · 3 comments
Assignees
Labels
Milestone

Comments

@tectumopticum
Copy link

Current Behavior

When klicking on "Trigger this Sync" the following exception is shown:

Oops, an error occurred! SQLSTATE[42S22]: Column not found: 1054 Unknown column 'uuid' in 'order clause', query was: SELECT director_datalist_entry.* FROM director_datalist_entry ORDER BY uuid ASC (Pdo.php:225) #0 /usr/share/icingaweb2/library/vendor/Zend/Db/Statement.php(297): Zend_Db_Statement_Pdo->_execute(Array) #1 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Abstract.php(470): Zend_Db_Statement->execute(Array) #2 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT director...', Array) #3 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Abstract.php(725): Zend_Db_Adapter_Pdo_Abstract->query(Object(Zend_Db_Select), Array) #4 /usr/share/icingaweb2/modules/director/library/Director/Data/Db/DbObjectStore.php(69): Zend_Db_Adapter_Abstract->fetchAll(Object(Zend_Db_Select)) #5 /usr/share/icingaweb2/modules/director/library/Director/Import/Sync.php(410): Icinga\Module\Director\Data\Db\DbObjectStore->loadAll('director_datali...') #6 /usr/share/icingaweb2/modules/director/library/Director/Import/Sync.php(659): Icinga\Module\Director\Import\Sync->loadExistingObjects() #7 /usr/share/icingaweb2/modules/director/library/Director/Import/Sync.php(119): Icinga\Module\Director\Import\Sync->prepare() #8 /usr/share/icingaweb2/modules/director/library/Director/Import/Sync.php(106): Icinga\Module\Director\Import\Sync->getExpectedModifications() #9 /usr/share/icingaweb2/modules/director/application/forms/SyncRunForm.php(55): Icinga\Module\Director\Import\Sync->hasModifications() #10 /usr/share/icinga-php/ipl/vendor/ipl/html/src/Form.php(224): Icinga\Module\Director\Forms\SyncRunForm->onSuccess() #11 /usr/share/icingaweb2/modules/director/application/controllers/SyncruleController.php(69): ipl\Html\Form->handleRequest(Object(GuzzleHttp\Psr7\ServerRequest)) #12 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Director\Controllers\SyncruleController->indexAction() #13 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch('indexAction') #14 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #15 /usr/share/php/Icinga/Application/Web.php(304): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #16 /usr/share/php/Icinga/Application/webrouter.php(109): Icinga\Application\Web->dispatch() #17 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/php/...') #18 {main}

Possible Solution

The column is missing in the director_datalist_entry-table:
desc director_datalist_entry; +---------------+------------------------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------------+------------------------------------+------+-----+---------+-------+ | list_id | int(10) unsigned | NO | PRI | NULL | | | entry_name | varchar(255) | NO | PRI | NULL | | | entry_value | text | YES | | NULL | | | format | enum('string','expression','json') | YES | | NULL | | | allowed_roles | varchar(255) | YES | | NULL | | +---------------+------------------------------------+------+-----+---------+-------+
I have two possible solutions in mind:

  1. add the missing column
  2. change the related query for the "Trigger this Sync"-button

Steps to Reproduce (for bugs)

  1. add a new Sync rule with Object Type "Data List Entry", Update Policy "Replayce", Purge "Yes", Purge Action "Delete".
  2. change the query related to "Trigger"-button

Your Environment

  • Director version (System - About): 10.1.0
  • Icinga Web 2 version and modules (System - About): 2.10.3
  • Icinga 2 version (icinga2 --version): r2.13.5-1
  • Operating System and version: SLES 15 SP3
  • Webserver, PHP versions: Apache/2.4.51, PHP 7.4.6
@carraroj
Copy link

ref/NC/764703

@Thomas-Gelf
Copy link
Contributor

Thanks for reporting this, will be fixed!

@Thomas-Gelf
Copy link
Contributor

A fix for this specific problem has been pushed, still working on a better generic solution

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

3 participants