-
Notifications
You must be signed in to change notification settings - Fork 21
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
icingadb-migrate fails with '"name": converting NULL to string is unsupported' #766
Comments
Thanks a lot for your detailed report and please excuse the inconvenience. Based on your output, it seems the Would it be possible for you to mitigate this issue by updating all those
Otherwise, we would gladly take the offer of testing this based on your SQL dump. |
Thanks for the reply @oxzi :) I ran into another table with NULL values:
I fixed them with
I emailed you the dump. |
Historical data from an older Icinga 2 installation contained NULL values for the name column in some rows of the icinga_commenthistory and icinga_downtimehistory tables. Normally this field contains something like ${name1}!${name2}!${unique_value} where the $unique_value is based on a timestamp for older entries and a UUID for newer ones. For a concrete example, this could be "host.example.com!ping6!123…". Unfortunately, using an empty string for these NULL values will cause an error later because the new primary key will be calculated based on it. Therefore, a new deterministic name is generated based on the primary keys and the known name1 and name2 values. Closes #766.
Thanks a lot for sending your dump, which helped a lot working on this. I have just created #767 and would kindly ask you to test this updated version. This change allowed me to import your dump into Icinga DB, but without your Icinga 2 setup, some things were hard to verify. To build this PR, checkout the PR branch and execute Please note that you have to undo your UPDATE which I incorrectly suggested before:
Please report back if this worked for you. |
Thanks a lot! The migration worked and I can see events from 2015-03 in the Icinga DB module for Icingaweb2. |
Describe the bug
Hello,
I'm attempting to migrate a 2015 Icinga installation and I get this error:
To Reproduce
I can provide a SQL dump privately if it helps.
Expected behavior
This should not fail.
Your Environment
Include as many relevant details about the environment you experienced the problem in
Additional context
I noticed that some of my comments have a NULL name and this seems to have stopped occurring between August and December 2015. I probably upgraded something during this time frame.
The text was updated successfully, but these errors were encountered: