Skip to content
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

collection.cgi: contextswitch graph broken on Ubuntu 14.04 #8

Closed
4 tasks done
mgedmin opened this issue Apr 20, 2015 · 6 comments
Closed
4 tasks done

collection.cgi: contextswitch graph broken on Ubuntu 14.04 #8

mgedmin opened this issue Apr 20, 2015 · 6 comments

Comments

@mgedmin
Copy link
Member

mgedmin commented Apr 20, 2015

Problem: some of the graphs (e.g. contextswitch) do not work on Ubuntu 14.04

Apache's error.log says

collection.cgi: RRDs::graph: No DS called 'contextswitches' in '/var/lib/collectd/rrd/example.com/contextswitch/contextswitch.rrd'

Cause: collectd 5.0 changed the data schema in a backwards-incompatible way:

The convention was and is that data sets with only one data source should use the name "value" for this data source. This has been fixed for the following types:
...

  • contextswitch

...

(there are 25 items in total listed there).

Complication:

The CGI script should continue to work on Ubuntu 12.04 LTS servers that have the old data schema.

Note that on upgrade to 14.04 LTS the data migration script doesn't appear to be run, so you might encounter Ubuntu 14.04 LTS servers using the old data schema. I don't mind if those become broken.

Scope:

Broken graphs that I care about are:

  • contextswitch
  • entropy
  • ntpd
  • users
@mgedmin
Copy link
Member Author

mgedmin commented Apr 20, 2015

The same server where I encountered the problem with contextswitch also has issues with

  • entropy
  • ntpd
  • swap
  • users

Errors from apache's error.log:

RRDs::graph: No DS called 'entropy' in '.../entropy/entropy.rrd'
RRDs::graph: No DS called 'seconds' in '.../ntpd/time_offset-error.rrd'
RRDs::graph: No DS called 'users' in '.../users/users.rrd'

and this one is especially special:

RRDs::graph: invalid rpn expression in: _nnl at /usr/lib/pov-server-page/collection.cgi line 3205.
main::meta_graph_generic_stack('HASH(0x258bbd8)', 'ARRAY(0x25dd208)') called at /usr/lib/pov-server-page/collection.cgi line 3717
main::meta_graph_swap('example.com', 'swap', undef, 'swap', undef) called at /usr/lib/pov-server-page/collection.cgi line 806
main::action_show_graph('example.com', 'swap', undef, 'swap', undef) called at /usr/lib/pov-server-page/collection.cgi line 943
main::main() called at /usr/lib/pov-server-page/collection.cgi line 65

but I have other servers running Ubuntu 14.04 that don't exhibit those problems (update: because the data schema migration script was never run on them).

@mgedmin
Copy link
Member Author

mgedmin commented Apr 20, 2015

Swap is missing in 14.04 OpenVZ containers due to https://bugs.launchpad.net/ubuntu/+source/collectd/+bug/1372750

@mgedmin
Copy link
Member Author

mgedmin commented Apr 20, 2015

I now suspect do-release-upgrade doesn't show me the debconf question asking about automated migration from collectd 4 to 5, and so I haven't actually performed the migration on any of the servers I upgraded to 14.04!

Clue: /var/cache/debconf/config.dat has

Name: collectd/auto-migrate-4-5
Template: collectd/auto-migrate-4-5
Value: false
Owners: collectd-core
Flags: seen

@mgedmin
Copy link
Member Author

mgedmin commented Nov 6, 2015

Heard on IRC:

mgedmin: regarding 12.04, I prepared a PPA for 5.5.0 recently: https://launchpad.net/~collectd/+archive/ubuntu/collectd-5.5

@mgedmin
Copy link
Member Author

mgedmin commented Nov 6, 2015

collection.cgi does not know collectd's version number.

Maybe I could add a parameter at the top and modify it during package build? But currently I build on precise and then copy the binary debs into newer Ubuntu releases.

@mgedmin mgedmin closed this as completed in ae63754 Nov 6, 2015
@mgedmin
Copy link
Member Author

mgedmin commented Nov 6, 2015

Submitted the fix to upstream: collectd/collectd#1339

mgedmin pushed a commit that referenced this issue Sep 25, 2020
Preparation for npm publishing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant