[ZBX-8307] zabbix proxy sqlite / db upgrade 2.0 => 2.2 not working Created: 2014 Jun 05 Updated: 2022 Aug 16 Resolved: 2014 Jul 14 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Documentation (D), Proxy (P) |
Affects Version/s: | 2.2.2 |
Fix Version/s: | 2.3.2 |
Type: | Incident report | Priority: | Critical |
Reporter: | dakol | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | proxy, sqlite, upgrade | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
Description |
Upgrade from 2.0.10 to 2.2.2. Zabbix Proxy (SQLite) went ko 29381:20140605:140040.434 query [txnlev:0] [select 1 from sqlite_master where tbl_name='dbversion' and type='table'] but no luck. |
Comments |
Comment by Aleksandrs Saveljevs [ 2014 Jun 05 ] |
Perhaps we should document that database upgrade for SQLite is not supported. Instead, proxy's database file should simply be removed. When started, proxy will recreate it automatically. |
Comment by Oleksii Zagorskyi [ 2014 Jun 06 ] |
Interesting, could proxy do that (delete the file) itself ? |
Comment by Martins Valkovskis [ 2014 Jun 06 ] |
[1]
zalex_ua for now it's ok. sasha added the message "Zabbix does not support SQLite3 database upgrade." on proxy an server sides. CLOSED |
Comment by Marc [ 2014 Jun 06 ] |
Yeah, please document that. I run into the same issue a couple of month ago too and it took me some time to solve. Beside documenting it I'd appreciate a dedicated log messages that informs about this limitation. As for deletion I'd prefer the process would not do it automatically. The process can't reliably know whether the data might still be of any interest to the user or not. But an additional option to allow that, which of course by default is disabled, might be a compromise. |
Comment by dimir [ 2014 Jun 06 ] |
Good idea, okkuv9xh, to have proxy configuration parameter allowing that. |
Comment by Oleksii Zagorskyi [ 2014 Jun 06 ] |
There were discussion with devs about the idea to automatically remove db file with smart logic. Considering possibly existing historical data - there no way to do something with it. As for configuration option which is disabled by default - I don't agree. |
Comment by Marc [ 2014 Jun 06 ] |
I see your point zalex_ua. Just speaking for myself and for my current setup I could live with that. Nevertheless, deleting is generally an irreversible action. Users may have done some custom stuff like adding indirect connected data that might be joined with zabbix data in queries. The implementation of a clever algorithm, that might take care of any possible variable that might theoretically exist, sounds to me a lot more effort - when even successfully doable at all. As for referring to the way things are already done, I'd say: Let's do it the right way and make sqlite databases upgradeable in the same way it is already done for other database backends. Addendum: |
Comment by Oleksii Zagorskyi [ 2014 Jun 06 ] |
sasha in that discussion said:
|
Comment by Marc [ 2014 Jun 06 ] |
Never said that sqlite upgrade would be an easy(er) way In case the aim is use "[...] similar configuration thing for server upgrade", then I'd suggest to implement sqlite upgrade but not to implement something new that is not done somewhere else as well. In doubt, I believe it's by far better just to print/log a clear information about the current limitation. Addendum: |
Comment by richlv [ 2014 Jun 06 ] |
auto-deleting would be bad, as noted that's irreversible. |
Comment by Juris Miščenko (Inactive) [ 2014 Jul 09 ] |
For the time being, we are not going to implement a ``smart'' mechanism for upgrading SQLite databases. A log message has been added to note that SQLite DBs are not supported. Change implemented at svn://svn.zabbix.com/branches/dev/ZBX-8307 |
Comment by Juris Miščenko (Inactive) [ 2014 Jul 14 ] |
Fix merged in 2.3.3 (trunk) r47286 |
Comment by Oleksii Zagorskyi [ 2014 Jul 14 ] |
FYI - svn r47286 log message uses wrong issue number " sasha Thanks! FIXED |