Commit Graph

47 Commits

Author SHA1 Message Date
OpenDev Sysadmins ce837c630f OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:50:29 +00:00
Emma Foley e143d1bfc2 Added six to requirements
six is a required package to run the collectd-ceilometer-plugin.
It has been added to requirements.txt

Change-Id: Ibdce74802a731815dddec485ae9ae28f57563e38
(cherry picked from commit 7505f014bd)
2017-07-12 10:15:25 +00:00
Emma Foley eb3069512a Remove pbr-dependent code
- Remove the pbr import in colelctd_ceiloemter/__init__.py
- PBR is still needed for a pip_install, but was causing import
  errors in the plugin.

Change-Id: I24c6349caba3fdd097a5218cc048aa696bd27550
Closes-Bug: #1644254
2017-01-25 15:04:49 +00:00
helena mcgough f1355f788d Adding a getting started guide for manually building collectd
- how to prepare the system
 - install,build and configure collectd
 - install the ceilometer plugin for collectd

Change-Id: I5ce84fbe1243fa238dd16c164b7963f2b6f28bd4
2016-11-07 17:48:28 +00:00
Jenkins 2837d6bd33 Merge "Added collateral to README.rst document" 2016-10-28 12:32:39 +00:00
Emma Foley 33158cfff2 Add logfle.conf to "restore conf" logic
There is code to remove collectd-ceilometer-plugin.conf when unstacking,
however, the same logic wasn't added when logfile.conf was introduced.

This change adds that logic so that logfile.conf is removed along with
collectd-ceilometer-plugin.conf

Change-Id: Ib100db5603fc22a640fe18002d754ba8b8538041
2016-10-13 21:08:02 +01:00
Federico Ressi 6356c05194 Provide Vagrant configuration file.
The Vagrantfile creates a basic up-to-date VirtualBox image
with Ubuntu Server 16.04 LTS and all dependencies required
to run Tox and DevStack.

Provided Vagrantfile requires Vagrant, Virtual Box. A fast
internet connection it is recommended.

If environment variables like http_proxy, https_proxy and no_proxy
it will assume a proxy connection is required to download
archives from upload repositories. In such cases
Vagrant plugin vagrant-proxyconf is required to provide proxy
enviroment to provided virtual machine.

Closes-Bug: #1606338
Change-Id: I5fc5060d78276ec5b801118d8d6873f0071ecad9
2016-10-13 18:42:27 +00:00
Helena McGough 41333abfa8 Added collateral to README.rst document
Change-Id: I888cbb66b789598426d306c8bc70112df2211162
2016-10-13 08:16:25 +00:00
Federico Ressi df6a4f6597 Refactor and test log handler
- Write unit tests for the handler
- Forward constructor parameters to the super-class
- Takes verbosity from outside instead of using configuration class

Closes-Bug: #1610348
Change-Id: I15b96d14e513889efbb50e2c51863bc224e71465
2016-10-12 09:02:09 +00:00
Federico Ressi 652ed97af1 Fix POST result verification.
The result of POST request is threated using a more explicit
approach via raise_for_status method instead of using ambigous
bool operator.

Requests library is mocked in plugin test instead of base test class.
The test for this behaviour has been fixed.

Closes-Bug: #1614772
Change-Id: I9079246b1b501b69e850878bef13c16c7c6d0b59
2016-10-11 09:59:21 +00:00
Federico Ressi 3df52a97bc Remove base test case from test_config.
Remove collectd_ceilometer.tests.base.TestCase from base classes
of collectd_ceilometer.tests.base.test_config test cases.

Related-Bug: #1615349
Change-Id: Ic407752a07fb96a5fc431e4253e976148800b5ea
2016-09-29 16:03:20 +00:00
Jenkins 09d86e8c50 Merge "Discover only tests in tests folder." 2016-09-28 16:03:55 +00:00
Emma Foley de5d0375e3 Change settings for ceilometer user in collectd config
When creating the collectd-ceilometer-plugin.conf file,
incorrect values were used

This commit changes the following variables:
- OS_USERNAME "$OS_USERNAME" -> OS_USERNAME "ceilometer"
  the service username is hardcoded, and OS_USERNAME overrides an
  existing variable used by OpenStack

- OS_PASSWORD "$OS_PASSWORD" -> OS_PASSWORD "$SERVICE_PASSWORD"
  these are usually identical for devstack, but can be set differently

- OS_TENANT_NAME "service" -> OS_TENANT_NAME "$SERVICE_TENANT_NAME"
  set to service by default.

This change also removes the code that overwrote the OS_USERNAME
and OS_PASSWORD variables in devstack/settings

Change-Id: I9c8435766aa8448210bf06676f4e06d8fbf3a7a8
Closes-Bug: #1605352
2016-09-24 08:29:31 +00:00
Emma Foley 88a6c59570 Make tox test py35
Partial-Bug: #1617432
Change-Id: Ieb440869e119d312da361d03277fe63d1e956ff8
2016-09-23 13:29:29 +00:00
Emma Foley 8c8e2dc0b6 Fix typo on default conf dir
/etc/collect.d -> /etc/collectd.d

Change-Id: I0c42e134d96d17493773ea7c6e43f12b94c1efc0
2016-09-21 14:47:23 +00:00
Emma Foley 7dcdb3618f Change default BATCH_SIZE to 1
Change-Id: Ibd6713d8d82c55c6064e3eafcbc50185c69c42c4
Closes-bug: #1594718
2016-09-20 12:11:34 +00:00
Federico Ressi 3f5320f43b Discover only tests in tests folder.
This is to prevent python 3 unittest2 failing to load all modules when
libvirt is not installed.

Partial-Bug: #1617432
Change-Id: I37d8d21d4cd0bda099ea08b8b2f807e006edcab8
2016-09-05 11:47:41 +00:00
Federico Ressi 7bcd8a9e01 Restart and configure collectd log file.
When installing collectd is usually automatically started. If it is
already running, the start operation has no effects. Therfore, to make
any configuration setting effective it has to be instead restarted
(stop + start).

Collectd log file is stored by logfile plugin to stack log folder.
The actual location of this file can be configured.

Verbosity of plugin can be increased to make debug messages visible
when running inside a collectd release compiled without deubgging
support. This option is mainly useful for plugin developers.

Related-Bug: #1606338
Change-Id: I658c1c3837970f3732ea64acd791838ee54c61ac
2016-08-31 15:46:47 +00:00
Jenkins 595b58ae0e Merge "Add counter type mappings" 2016-08-31 12:32:08 +00:00
Emma Foley f3e73866bd Add counter type mappings
- Add mappings between counter type in collectd and Ceilometer.
  Previously, all counters were given "gauge" type.
  Now, the following mappings are applied:
    - gauge -> gauge
    - derive -> delta
    - absolute, counter -> cumulative
- Add unit tests

Closes-Bug: #1583301
Change-Id: I13e75fcc57ed2b44c2b9a02ee9562f70748d01c2
2016-08-30 15:49:56 +01:00
Federico Ressi b205ce2898 Remove import collectd from logger.py
collectd is now passed from the plugin by using logger
handler constructor

Closes-Bug: #1615352
Change-Id: I353dc42cc24669a38554ea952355e62b1942b219
2016-08-23 16:51:48 +01:00
Emma Foley 4b47d1a273 pbr: version_string()
The pbr.VersionInfo version_string function was causing
a failure when collectd is initiated from a service. This
fix simply removes the invocation of that function. collectd
can now be started as a service without any pbr issues.

Change-Id: Iba3f6647d16fa0834e6ccd27d333b6a25366beec
Closes-bug: 1609810
Co-authored-by: maryam.tahhan@intel.com
2016-08-23 12:13:20 +01:00
Federico Ressi 77a2d9b965 Remove empty tests.
Related-Bug: #1615349
Change-Id: I16076ce63e33b1c54f91be76576e25faced26bac
2016-08-21 09:52:16 +01:00
Federico Ressi cac62bf2b1 Make collectd available to plugin components
Collectd module could be required by plugin components
but importing it from their modules makes unit testing
harder because it would require running tests from
inside collectd process.

This changes make the module available by passing it
to component constructors which makes testing and mocking
easier.

Related-Bug: #1583301
Change-Id: I6abfd330c8f3b5108e78543df7c803cd65a15655
2016-08-18 12:42:45 +00:00
Jenkins e13d118a0c Merge "unpin package version" 2016-07-29 13:21:32 +00:00
Sean Mooney c8cf31367e unpin package version
- This change removes the hard coded
  package version from the setup.cfg.
- Following this change the package
  version will be generated by pbr.

Change-Id: If5b374060ce2a1639d94bac75d392679ed38d0d1
Closes-Bug: #1607545
2016-07-28 21:38:17 +00:00
Sean Mooney 9b56c14d85 fix config generation
- This change qoutes the module name
- This change fixes processing of
  COLLECTD_BATCH_SIZE

Change-Id: I1de49d65351e5973b794eec973efec852d42151b
Closes-Bug: #1607526
2016-07-28 20:58:24 +00:00
Federico Ressi d1b85e9796 Force flake8<3.0
Flake8 3.0 is having some problems with some of its plug-ins.
Downgrade it to workaround the issue sow here:

  http://goo.gl/Bv2NJw

Change-Id: Id5898e0d0a5b75cda51c09888b9ec822f55346b4
Closes-Bug: #1606553
2016-07-26 19:58:12 +01:00
Jenkins 987869d46a Merge "Added missing documentation" 2016-07-25 08:47:06 +00:00
Jenkins 30daed6d97 Merge "Make sure the collectd config dir exists" 2016-07-22 14:05:47 +00:00
radoslaw kuschel ccdb19bb28 Added missing documentation
- Adding documentation for config options
- Adding contact information to README.rst

Change-Id: I966bc07071b13e93cbc3274a9ef91280117d8dba
Partial-Bug: #1568178
2016-07-22 14:50:35 +01:00
radoslaw kuschel 251cb0f6ee Make sure the collectd config dir exists
* Adding fuction to check if collectd config folder exists, and create
    the folder if it doesn't.

Change-Id: I87d2e233d6db7db083aa6795037f9e73fe708b80
Closes-Bug: #1596971
2016-07-22 13:49:18 +00:00
Emma Foley 912c941207 Change COLLECTD_DIR to COLLECTD_CEILOMTER_DIR
- change the name of the var used to store the
  collectd-ceilometer-plugin so that it doesn't conflict with
  OpenStack naming conventions later on.
- There is no end-user impact as this is set and used internally.

Closes-Bug #1603996

Change-Id: I5abd39a323aaddc66894e0a3ec3e475c0960d0dc
2016-07-19 13:30:32 +01:00
Emma Foley cd29802869 Remove the duplicate file collectd_ceilometer_plugin.py
- Remove the collectd_ceilometer_plugin.py file
- Adjust devstack code to use collectd_ceilometer/plugin.py file

Change-Id: Ib396b15476b4d6d3e2f3d54a315b61db6f5ce908
2016-07-12 16:57:46 +01:00
Emma Foley 3a4a108756 Add COLLECTD_CONF_DIR config option
Add COLLECTD_CONF_DIR config option so that a non-default config
dir can be specified for collectd.

Closes-Bug #1583282

Change-Id: Ic697b9e35f6d3b063e53dca2cb44fa24f8be3598
2016-05-30 20:25:06 +01:00
Jaroslav Safka 19fb15f51a Better logging of exceptions
Add workaround for Collectd which limits log size to 1023B.
Add stack trace to exception handling for better logs/debugging.

Closes-Bug #1570397

Change-Id: Ie9f1911e0fb367d5ce3637afd0909ab42a5efc61
2016-04-25 07:38:31 +00:00
Jenkins eed7db17d3 Merge "Fix exception on wrong response" 2016-04-22 18:42:05 +00:00
Jaroslav Safka 9a356297d2 Fix exception on wrong response
Fix exception when receive wrong data from keystone

Closes-Bug #1564381

Change-Id: I6fb4e37f613dd99cd81b94b845e84cd34e50b07b
2016-04-14 15:07:12 +01:00
Carlos Goncalves ed185d2ab9 Add collectd support for Ubuntu
Change-Id: I923b3d327f7a0c2ba059f3ae54f176d560b8c73d
2016-04-14 14:04:28 +02:00
Emma Foley fd068a8570 Adds option to disable collectd installation
Adds the COLLECTD_INSTALL option which toggles whether collectd is installed.
Defaults to True.
Should be set to False to use custom versions of collectd.

Closes-Bug #1567521

Change-Id: I8235e19ae90f6a3af21117cb07534831801d52d3
2016-04-12 14:44:17 +00:00
Jaroslav Safka f787a09bed Fix testcases race condition
Because CI runs the individual testcases in multiple threads.
And Config class is singleton, so there was race condition.

Closes-Bug #1567480

Change-Id: I569a69758c30e04333f4d0c274de666b9207aeca
2016-04-12 07:52:28 +01:00
Emma Foley fe6d579a28 Fix path issue for devstack
Add collectd_ceilometer_plugin.py so collectd doesn't get confused
between module and file.

Change-Id: Icd63feafebc3e057e4e0cf9392237464b7c7a5f1
Co-Authored-By: Jaroslav Safka <jaroslavx.safka@intel.com>
2016-03-01 13:41:22 +00:00
Emma Foley 92331ba067 Add documentation
- Update README.rst for features
- Update installation instructions

Change-Id: I9891d485ca46414367d9fca17e6ffc8f9c5ef4c6
2016-01-18 15:49:47 +00:00
Emma Foley ecc9a6ee9d Add devstack support
Add devstack plugin for deploying the plugin.

Change-Id: I4ecbc8e30025604eae5d159b4f2506fe3ed484ce
2016-01-18 15:49:25 +00:00
Emma Foley a00f360f8f Implement plugin
Add functionality to the plugin:
- Convert from collectd data sources to Ceilometer format
- Add unit mappings for Ceilometer
- Define resource IDs
- Add unit tests

Change-Id: Ica1f49ea3c9bbc4bc857044dea7da39869b33bba
2016-01-18 15:45:47 +00:00
Emma Foley af84348370 Apply cookie cutter template.
Add some structure to the repo.
Add very bare testing infrastructure.
Add basic repo information (contact, launchpad, etc).

Change-Id: I4f5595e38f61a0298d0b6828fe64f6a5ff70eac2
2015-12-18 14:12:42 +00:00
OpenStack Project Creator caafe4ab73 Added .gitreview 2015-11-08 20:04:59 +00:00