Activity log for bug #1578144

Date Who What changed Old value New value Message
2016-05-04 10:23:35 Hans Rönnbäck bug added bug
2016-05-08 14:20:02 Launchpad Janitor cacti (Ubuntu): status New Confirmed
2016-05-12 05:43:15 Hans Rönnbäck tags apport-collected xenial
2016-05-12 05:43:16 Hans Rönnbäck description Ubuntu 16.04 LTS Cacti 0.8.8f which is the default version for Ubuntu 16.04 uses invalid datetime values ("0000-00-00 00:00:00"). MySQL 5.7 does not support zero-dates, this causes the Cacti poller script to run amok and execute the same SQL queries over and over. In my case this ends up with MySQL consuming about 35% CPU and php (via the poller) about 15% CPU. This probably goes for clean installs as well (as Cacti has this invalid datetime in a number of the php-files supplied by the Cacti package) Ubuntu 16.04 LTS Cacti 0.8.8f which is the default version for Ubuntu 16.04 uses invalid datetime values ("0000-00-00 00:00:00"). MySQL 5.7 does not support zero-dates, this causes the Cacti poller script to run amok and execute the same SQL queries over and over. In my case this ends up with MySQL consuming about 35% CPU and php (via the poller) about 15% CPU. This probably goes for clean installs as well (as Cacti has this invalid datetime in a number of the php-files supplied by the Cacti package) --- ApportVersion: 2.20.1-0ubuntu2 Architecture: amd64 DistroRelease: Ubuntu 16.04 InstallationDate: Installed on 2013-11-08 (915 days ago) InstallationMedia: Ubuntu-Server 13.10 "Saucy Salamander" - Release amd64 (20131016) Package: cacti 0.8.8f+ds1-4ubuntu4 [modified: usr/share/cacti/site/lib/database.php] PackageArchitecture: all ProcVersionSignature: Ubuntu 4.4.0-22.39-generic 4.4.8 Tags: xenial Uname: Linux 4.4.0-22-generic x86_64 UpgradeStatus: Upgraded to xenial on 2016-05-03 (8 days ago) UserGroups: adm cdrom dip lpadmin media plugdev sambashare sudo www-data _MarkForUpload: True modified.conffile..etc.cron.d.cacti: #MAILTO=root #*/5 * * * * www-data php --define suhosin.memory_limit=512M /usr/share/cacti/site/poller.php 2>&1 >/dev/null | if [ -f /usr/bin/ts ] ; then ts ; else tee ; fi >> /var/log/cacti/poller-error.log mtime.conffile..etc.cron.d.cacti: 2016-05-04T14:31:46.265760
2016-05-12 05:43:17 Hans Rönnbäck attachment added Dependencies.txt https://bugs.launchpad.net/bugs/1578144/+attachment/4661049/+files/Dependencies.txt
2016-05-12 05:43:18 Hans Rönnbäck attachment added JournalErrors.txt https://bugs.launchpad.net/bugs/1578144/+attachment/4661050/+files/JournalErrors.txt
2016-05-12 05:43:19 Hans Rönnbäck attachment added ProcEnviron.txt https://bugs.launchpad.net/bugs/1578144/+attachment/4661051/+files/ProcEnviron.txt
2016-05-12 18:26:47 Paul Gevers bug watch added http://bugs.cacti.net/view.php?id=2159
2016-05-12 18:26:47 Paul Gevers bug task added cacti
2016-05-12 18:27:46 Paul Gevers cacti (Ubuntu): assignee Paul Gevers (paul-climbing)
2016-05-12 18:28:02 Paul Gevers cacti (Ubuntu): importance Undecided Critical
2016-05-12 18:28:42 Paul Gevers cacti (Ubuntu): milestone xenial-updates
2016-05-12 23:36:22 Bug Watch Updater cacti: status Unknown Incomplete
2016-05-13 12:46:44 Paul Gevers nominated for series Ubuntu Yakkety
2016-05-13 12:46:44 Paul Gevers bug task added cacti (Ubuntu Yakkety)
2016-05-13 12:46:44 Paul Gevers nominated for series Ubuntu Xenial
2016-05-13 12:46:44 Paul Gevers bug task added cacti (Ubuntu Xenial)
2016-05-13 12:57:30 Paul Gevers cacti (Ubuntu Xenial): status New Confirmed
2016-05-13 12:57:33 Paul Gevers cacti (Ubuntu Xenial): importance Undecided Critical
2016-05-13 12:57:36 Paul Gevers cacti (Ubuntu Xenial): assignee Paul Gevers (paul-climbing)
2016-05-13 12:57:42 Paul Gevers cacti (Ubuntu Yakkety): milestone xenial-updates
2016-05-13 12:57:46 Paul Gevers cacti (Ubuntu Xenial): milestone xenial-updates
2016-05-13 13:01:32 Paul Gevers attachment added First try to fix the issue (UNRELEASED) https://bugs.launchpad.net/ubuntu/+source/cacti/+bug/1578144/+attachment/4662119/+files/LP1578144.debdiff
2016-05-13 16:24:31 Ubuntu Foundations Team Bug Bot tags apport-collected xenial apport-collected patch xenial
2016-05-13 19:04:39 Paul Gevers bug task added cacti-spine (Ubuntu)
2016-05-13 19:04:57 Paul Gevers cacti-spine (Ubuntu Xenial): assignee Paul Gevers (paul-climbing)
2016-05-13 19:05:00 Paul Gevers cacti-spine (Ubuntu Yakkety): assignee Paul Gevers (paul-climbing)
2016-05-13 19:05:05 Paul Gevers cacti-spine (Ubuntu Xenial): importance Undecided Critical
2016-05-13 19:05:08 Paul Gevers cacti-spine (Ubuntu Yakkety): importance Undecided Critical
2016-05-13 19:06:04 Paul Gevers summary Cacti causes high CPU load via MySQL after upgrade to Ubuntu 16.04 cacti and cacti-spine are not compatible with MySQL 5.7 default sql_mode
2016-05-14 11:55:30 Paul Gevers cacti-spine (Ubuntu Xenial): status New Confirmed
2016-05-14 11:55:33 Paul Gevers cacti-spine (Ubuntu Yakkety): status New Confirmed
2016-05-14 12:02:53 Paul Gevers attachment added First try for cacti-spine fix https://bugs.launchpad.net/ubuntu/+source/cacti-spine/+bug/1578144/+attachment/4662840/+files/LP1578144_cacti-spine.debdiff
2016-05-14 18:44:28 Paul Gevers description Ubuntu 16.04 LTS Cacti 0.8.8f which is the default version for Ubuntu 16.04 uses invalid datetime values ("0000-00-00 00:00:00"). MySQL 5.7 does not support zero-dates, this causes the Cacti poller script to run amok and execute the same SQL queries over and over. In my case this ends up with MySQL consuming about 35% CPU and php (via the poller) about 15% CPU. This probably goes for clean installs as well (as Cacti has this invalid datetime in a number of the php-files supplied by the Cacti package) --- ApportVersion: 2.20.1-0ubuntu2 Architecture: amd64 DistroRelease: Ubuntu 16.04 InstallationDate: Installed on 2013-11-08 (915 days ago) InstallationMedia: Ubuntu-Server 13.10 "Saucy Salamander" - Release amd64 (20131016) Package: cacti 0.8.8f+ds1-4ubuntu4 [modified: usr/share/cacti/site/lib/database.php] PackageArchitecture: all ProcVersionSignature: Ubuntu 4.4.0-22.39-generic 4.4.8 Tags: xenial Uname: Linux 4.4.0-22-generic x86_64 UpgradeStatus: Upgraded to xenial on 2016-05-03 (8 days ago) UserGroups: adm cdrom dip lpadmin media plugdev sambashare sudo www-data _MarkForUpload: True modified.conffile..etc.cron.d.cacti: #MAILTO=root #*/5 * * * * www-data php --define suhosin.memory_limit=512M /usr/share/cacti/site/poller.php 2>&1 >/dev/null | if [ -f /usr/bin/ts ] ; then ts ; else tee ; fi >> /var/log/cacti/poller-error.log mtime.conffile..etc.cron.d.cacti: 2016-05-04T14:31:46.265760 [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.
2016-05-14 18:45:23 Paul Gevers 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. [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.
2016-05-14 18:48:04 Paul Gevers 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. [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.
2016-05-14 19:26:57 Paul Gevers attachment removed First try to fix the issue (UNRELEASED) https://bugs.launchpad.net/ubuntu/+source/cacti/+bug/1578144/+attachment/4662119/+files/LP1578144.debdiff
2016-05-14 19:27:18 Paul Gevers attachment removed First try for cacti-spine fix https://bugs.launchpad.net/ubuntu/+source/cacti/+bug/1578144/+attachment/4662840/+files/LP1578144_cacti-spine.debdiff
2016-05-14 19:42:12 Paul Gevers attachment added Proposed debdiff for cacti https://bugs.launchpad.net/ubuntu/+source/cacti/+bug/1578144/+attachment/4662987/+files/LP1578144_cacti.debdiff
2016-05-14 19:43:17 Paul Gevers attachment added Proposed debdiff for cacti-spine https://bugs.launchpad.net/ubuntu/+source/cacti/+bug/1578144/+attachment/4662988/+files/LP1578144_cacti-spine_v2.debdiff
2016-05-19 10:22:14 Robie Basak tags apport-collected patch xenial apport-collected mysql-5.7-transition patch xenial
2016-05-19 10:22:40 Robie Basak bug added subscriber Robie Basak
2016-05-20 08:23:58 Paul Gevers cacti (Ubuntu Xenial): assignee Paul Gevers (paul-climbing)
2016-05-20 08:24:02 Paul Gevers cacti (Ubuntu Yakkety): assignee Paul Gevers (paul-climbing)
2016-05-20 09:34:47 Launchpad Janitor cacti (Ubuntu Yakkety): status Confirmed Fix Released
2016-05-20 13:18:22 Paul Gevers attachment added cacti-spine debdiff for yakkety (against Debian) https://bugs.launchpad.net/ubuntu/+source/cacti/+bug/1578144/+attachment/4666900/+files/LP1578144_cacti-spine_yakkety__debian.debdiff
2016-05-20 13:19:41 Paul Gevers attachment added cacti-spine debdiff for yakkety (against Ubuntu) https://bugs.launchpad.net/ubuntu/+source/cacti/+bug/1578144/+attachment/4666902/+files/LP1578144_cacti-spine_yakkety__ubuntu.debdiff
2016-05-20 14:10:07 Robie Basak cacti-spine (Ubuntu Yakkety): status Confirmed Fix Committed
2016-05-20 15:42:38 Launchpad Janitor cacti-spine (Ubuntu Yakkety): status Fix Committed Fix Released
2016-05-21 06:47:25 Paul Gevers cacti (Ubuntu Xenial): status Confirmed In Progress
2016-05-21 06:47:29 Paul Gevers cacti (Ubuntu Xenial): assignee Paul Gevers (paul-climbing)
2016-05-21 10:20:08 Robie Basak cacti-spine (Ubuntu Xenial): status Confirmed In Progress
2016-05-24 20:11:14 Martin Pitt cacti-spine (Ubuntu Xenial): status In Progress Fix Committed
2016-05-24 20:11:17 Martin Pitt bug added subscriber Ubuntu Stable Release Updates Team
2016-05-24 20:11:19 Martin Pitt bug added subscriber SRU Verification
2016-05-24 20:11:22 Martin Pitt tags apport-collected mysql-5.7-transition patch xenial apport-collected mysql-5.7-transition patch verification-needed xenial
2016-05-24 20:42:03 Martin Pitt cacti (Ubuntu Xenial): status In Progress Fix Committed
2016-05-27 08:27:15 Paul Gevers tags apport-collected mysql-5.7-transition patch verification-needed xenial apport-collected mysql-5.7-transition patch verification-done xenial
2016-05-28 12:30:42 Paul Gevers bug watch added http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=825644
2016-05-30 19:44:02 Launchpad Janitor cacti (Ubuntu Xenial): status Fix Committed Fix Released
2016-05-30 19:44:06 Adam Conrad removed subscriber Ubuntu Stable Release Updates Team
2016-05-30 19:44:36 Launchpad Janitor cacti-spine (Ubuntu Xenial): status Fix Committed Fix Released
2016-07-19 19:17:30 Bug Watch Updater cacti: status Incomplete Fix Released