← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1410411] Re: unit tests are leaking sudo commands

 

Neutron hits are legitimate due to issue in patches that are tested in
those runs, so removing Neutron.

** No longer affects: neutron

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1410411

Title:
  unit tests are leaking sudo commands

Status in OpenStack Telemetry (Ceilometer):
  In Progress

Bug description:
  infra has just recently fixed a bug so that the jenkins user on slaves
  correctly has no sudo access.  Previously, it had mistakenly been
  granted sudo access.  Since then, ceilometer's unit test jobs are
  periodically failing because of attempts to use sudo:

  2015-01-13 10:15:34.499 | + sudo /usr/local/jenkins/slave_scripts/jenkins-sudo-grep.sh post
  2015-01-13 10:15:34.501 | sudo: unable to resolve host bare-trusty-1421072110
  2015-01-13 10:15:34.629 | 1a2,3
  2015-01-13 10:15:34.630 | > Jan 13 10:14:05 bare-trusty-1421072110 sudo:  jenkins : command not allowed ; TTY=unknown ; PWD=/home/jenkins/workspace/gate-ceilometer-python27 ; USER=root ; COMMAND=/home/jenkins/workspace/gate-ceilometer-python27/.tox/py27/bin/ceilometer-rootwrap /etc/ceilometer/rootwrap.conf ipmitool sdr info
  2015-01-13 10:15:34.630 | > Jan 13 10:14:05 bare-trusty-1421072110 sudo:  jenkins : command not allowed ; TTY=unknown ; PWD=/home/jenkins/workspace/gate-ceilometer-python27 ; USER=root ; COMMAND=/home/jenkins/workspace/gate-ceilometer-python27/.tox/py27/bin/ceilometer-rootwrap /etc/ceilometer/rootwrap.conf ipmitool raw 0x0a 0x2c 0x00
  2015-01-13 10:15:34.630 | + sudoresult=1
  2015-01-13 10:15:34.630 | + '[' 1 -ne 0 ']'
  2015-01-13 10:15:34.631 | + echo
  2015-01-13 10:15:34.631 | 
  2015-01-13 10:15:34.631 | + echo 'This test has failed because it attempted to execute commands'
  2015-01-13 10:15:34.631 | This test has failed because it attempted to execute commands
  2015-01-13 10:15:34.631 | + echo 'with sudo.  See above for the exact commands used.'
  2015-01-13 10:15:34.631 | with sudo.  See above for the exact commands used.
  2015-01-13 10:15:34.631 | + echo
  2015-01-13 10:15:34.631 | 
  2015-01-13 10:15:34.631 | + exit 1

  Note that the unit test run itself succeeds, but the post-job script
  to check for sudo attempts detects two ipmitool commands were
  attempted to be run with sudo and the job fails.  I assume this is
  happening because of a missed mock somewhere in the tests.  I'm not
  sure if it is specific to certain devstack slaves that the job is run,
  or the patch, but I originally hit it on a stable/juno patch:

  https://review.openstack.org/#/c/146623/

  But its happening on master as well:

  https://review.openstack.org/#/c/144192/

  I've attempted to push a debug patch to raise an exception for
  anything that actually shells out, but cannot seem to trigger the
  issue with that:

  https://review.openstack.org/#/c/146684/

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