** Description changed:

- Ubuntu 16.04 LTS
+ [Impact]
  
- 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.
+  * 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 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
+  * 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.

** Description changed:

  [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).
+  * 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.
+  * 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.
+  * 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 ]
+  [ 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 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:
+  * 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!,
+    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:
+  * 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!
+    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 ]
+  [ Verify fix ]
  
-  * Install the proposed cacti package on a xenial system with mysql-server
-    installed and very that it installs cleanly.
+  * 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
+  * 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
+    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:
+    and that lines like the following line are absent:
  
-    05/13/2016 06:55:02 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!,
+    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
+  * 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
+    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:
+    and that lines like the following line are absent:
  
-    05/13/2016 07:50:00 PM - SPINE: Poller[0] ERROR: SQL Failed!
+    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.
+  * 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.
+ 
+  * 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.

** Description changed:

  [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
+    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).
+    the Xenial release).
  
   * This bug renders the cacti and cacti-spine packages nearly useless for
-    most users.
+    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.
+    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:
+    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
+  * 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
+  * 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
+    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
+    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.
+  * 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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1578144

Title:
  cacti and cacti-spine are not compatible with MySQL 5.7 default
  sql_mode

To manage notifications about this bug go to:
https://bugs.launchpad.net/cacti/+bug/1578144/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to