group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #04340
[Bug 1578144] Re: cacti and cacti-spine are not compatible with MySQL 5.7 default sql_mode
This bug was fixed in the package cacti - 0.8.8f+ds1-4ubuntu4.16.04
---------------
cacti (0.8.8f+ds1-4ubuntu4.16.04) xenial; urgency=medium
* Add make_cacti_sql_mode-strict_compatible.patch to enable cacti to
work with the default settings of MySQL 5.7 (LP: #1578144)
-- Paul Gevers <elbrus@xxxxxxxxxx> Sat, 14 May 2016 21:00:40 +0200
** Changed in: cacti (Ubuntu Xenial)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1578144
Title:
cacti and cacti-spine are not compatible with MySQL 5.7 default
sql_mode
Status in Cacti:
Incomplete
Status in cacti package in Ubuntu:
Fix Released
Status in cacti-spine package in Ubuntu:
Fix Released
Status in cacti source package in Xenial:
Fix Released
Status in cacti-spine source package in Xenial:
Fix Released
Status in cacti source package in Yakkety:
Fix Released
Status in cacti-spine source package in Yakkety:
Fix Released
Bug description:
[Impact]
* When cacti and/or cacti-spine is used with the MySQL server on the same
host and without modifications to the MySQL global setting, cacti fails to
install and (e.g. for installations that upgraded) cacti and cacti-spine
fail to run properly since MySQL 5.7 became the default (shortly before
the Xenial release).
* This bug renders the cacti and cacti-spine packages nearly useless for
most users.
* The fix forces the sql_mode NO_ZERO_DATE setting in the MySQL connection
to be unset which enables the MySQL INSERT and UPDATE commands that
involve the date "0000-00-00" to succeed.
[Test Case]
[ Verify issue ]
* Install cacti on a xenial system with mysql-server installed, and see it
fails during the population of the database via dbconfig-common. If the
dbconfig-common defaults are choosen for the error handling (abort), the
package fails to install.
* Install cacti on a wily system with mysql-server installed. Connect to
http://localhost/cacti, pass through the install process (i.e. hit "Ok",
log in with admin/admin credentials and provide a new admin password).
Then upgrade to xenial and see that every five minutes a line like the
following is added to the /var/log/cacti/cacti.log file:
05/13/2016 06:55:02 PM - CMDPHP: Poller[0] ERROR: A DB Exec
Failed!, Error:'1292', SQL:"INSERT INTO poller_time (poller_id, pid,
start_time, end_time) VALUES (0, 4044, NOW(), '0000-00-00 00:00:00')'
* Install cacti-spine on a wily system with mysql-server installed. Connect
to http://localhost/cacti, pass through the install process (i.e. hit
"Ok", log in with admin/admin credentials and provide a new admin
password). Now
navigate to the settings item, select the poller tab and change the field
"The poller type to use. This setting will take effect at next polling
interval." to "spine". Then upgrade to xenial and see that every five
minutes a line like the following is added to the /var/log/cacti/cacti.log
file:
05/13/2016 07:50:00 PM - SPINE: Poller[0] ERROR: SQL Failed!
Error:'1292', Message:'Incorrect datetime value: '0000-00-00 00:00:00'
for column 'end_time' at row 1', SQL Fragment:'INSERT INTO poller_time
(poller_id, pid, start_time, end_time) VALUES (0, 4685, NOW(),
'0000-00-00 00:00:00')'
[ Verify fix ]
* Install the proposed cacti package on a xenial system with mysql-server
installed and very that it installs cleanly.
* Same as previous point, but also connect to http://localhost/cacti, pass
through the install process (i.e. hit "Ok", log in with admin/admin
credentials and provide a new admin password). Verify that you see lines
like the following appear every five minutes
05/13/2016 07:09:59 PM - SYSTEM STATS: Time:298.6378 Method:cmd.php
Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5
RRDsProcessed:5
and that lines like the following line are absent:
05/13/2016 06:55:02 PM - CMDPHP: Poller[0] ERROR: A DB Exec
Failed!, Error:'1292', SQL:"INSERT INTO poller_time (poller_id, pid,
start_time, end_time) VALUES (0, 4044, NOW(), '0000-00-00 00:00:00')'
* Install cacti-spine on a xenial system with mysql-server installed.
Connect to http://localhost/cacti, pass through the install process (i.e.
hit "Ok", log in with admin/admin credentials and provide a new admin
password). Now
navigate to the settings item, select the poller tab and change the field
"The poller type to use. This setting will take effect at next polling
interval." to "spine". Verify that you see lines like the following
appear every five minutes
05/14/2016 06:00:02 PM - SYSTEM STATS: Time:1.1864 Method:spine
Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:5
RRDsProcessed:5
and that lines like the following line are absent:
05/13/2016 07:50:00 PM - SPINE: Poller[0] ERROR: SQL Failed!
Error:'1292', Message:'Incorrect datetime value: '0000-00-00 00:00:00'
for column 'end_time' at row 1', SQL Fragment:'INSERT INTO poller_time
(poller_id, pid, start_time, end_time) VALUES (0, 4685, NOW(),
'0000-00-00 00:00:00')'
[Regression Potential]
* As the package is useless for most users, the regression potential is
low. However, if people already changed their MySQL settings to exclude
the NO_ZERO_DATE from the global settings there is a risk for regression.
As there is only one SQL command added to the flow of commands and this
command
has been verified to work on systems with and withoug this sql_mode set, I
can only imagin regressions related to the rebuilding of the packages with
an updated build stack. Both packages were build very late in the release
process as cacti-spine needed adjustments for the new libmysql package and
cacti needed multiple fixes for the new php version.
[Other Info]
* I am the maintainer of cacti in Debian and will incorporate these changes
in sid as well, as this solves the same issue in the case that cacti
and/or cacti-spine are installed on a Debian system, but the MySQL server
is already at version 5.7 or where the MySQL server has a sql_mode
including NO_ZERO_DATE.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cacti/+bug/1578144/+subscriptions