collectd icon indicating copy to clipboard operation
collectd copied to clipboard

slurm.c does not reflect changes made in slurm-21.08

Open dubmarm opened this issue 3 years ago • 1 comments

  • Version of collectd: 5.12
  • Operating system / distribution: RHEL7
  • Kernel version (if applicable):

Expected behavior

slurm 21.08 made many changes to it's node_states names.

Actual behavior

Building collectd with the most recent version of slurm-devel installed results in error:

src/slurm.c: In function 'slurm_node_state':
src/slurm.c:187:29: error: 'NODE_STATE_REBOOT' undeclared (first use in this function)
   bool reboot_flag = (inx & NODE_STATE_REBOOT);
                             ^
src/slurm.c:187:29: note: each undeclared identifier is reported only once for each function it appears in
src/slurm.c:191:33: error: 'NODE_STATE_POWER_SAVE' undeclared (first use in this function)
   bool power_down_flag = (inx & NODE_STATE_POWER_SAVE);
                                 ^
src/slurm.c:251:14: error: 'NODE_STATE_CANCEL_REBOOT' undeclared (first use in this function)
   if (inx == NODE_STATE_CANCEL_REBOOT)
              ^
make[1]: *** [src/slurm_la-slurm.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/root/rpmbuild/BUILD/collectd-5.12.0.2.ga3f5e2d'
make: *** [all] Error 2

Steps to reproduce

  • git clone -b collectd-5.12 https://github.com/collectd/collectd.git
  • cd collectd
  • yum install slurm-devel
  • yum-builddep -y ../collectd.spec (this is my own collectd.spec)
  • ./build.sh
  • ./configure --enable-slurm
  • make dist
  • cp collectd-$VER.tar.bz2 /root/rpmbuild/SOURCES/
  • rpmbuild -bb ../emsl_collectd.spec

Suggested Solution

I have a gist with the updates to the node_states along with updated enums however I'm unsure how to compare slurm-devel version and to use slurm.c_21.08 vs slurm.c_old.

GIST CODE: https://gist.github.com/dubmarm/3ccc2493040874d41ae863488f119350

dubmarm avatar Jan 04 '22 20:01 dubmarm

There's a PR to fix this: https://github.com/collectd/collectd/pull/3973

(But a lack of contributors with merging capability who could review + apply it. And some CI issues.)

eero-t avatar Mar 16 '22 10:03 eero-t