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

Hooks missing exections record with postgress DB backend #5017

Closed
7 tasks
xorel opened this issue Aug 6, 2020 · 1 comment
Closed
7 tasks

Hooks missing exections record with postgress DB backend #5017

xorel opened this issue Aug 6, 2020 · 1 comment

Comments

@xorel
Copy link
Member

xorel commented Aug 6, 2020

Description
When using Postgres DB backend, hooks are executed, but the execution record is not created

To Reproduce
Create hook using template

CALL="one.zone.raftstatus"
COMMAND="/$(which echo) testing"
REMOTE="NO"

run onezone list
check hook execution record are missing

Details
In oned.log:

Thu Aug  6 10:36:09 2020 [Z0][HKM][E]: Error executing Hook 0
Thu Aug  6 10:36:09 2020 [Z0][ONE][E]: SQL command was: SELECT IFNULL(MAX(exeid), -1), COUNT(*) FROM hook_log WHERE hkid = 0, error ERROR:  function ifnull(integer, integer) does not exist
LINE 1: SELECT IFNULL(MAX(exeid), -1), COUNT(*) FROM hook_log WHERE ...

It seems in postgresql the IFNULL is called NULLIF (https://www.postgresqltutorial.com/postgresql-nullif/)

Progress Status

  • Branch created
  • Code committed to development branch
  • Testing - QA
  • Documentation
  • Release notes - resolved issues, compatibility, known issues
  • Code committed to upstream release/hotfix branches
  • Documentation committed to upstream release/hotfix branches
@christian7007
Copy link
Contributor

#5072 (duplicated)

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

No branches or pull requests

2 participants