Remove statsd args to OpenStack API client call
Change If21a10c56f43a121d30aa802f2c89d31df97f121 modified nodepool to not use the inbuilt TaskManager but use openstackapi's task handling instead. The statsd arguments added here don't actually do anything and are ignored; an openstack.Connection() object doesn't setup the stats configuration. Things are somewhat working because of the STATSD_<HOST|PORT> environment variables -- openstacksdk notices these and turns on stats reporting. However, it uses the default prefix ('openstack.api') which is a regression over the previous behaviour of logging operations on a per-cloud basis. I have proposed the dependent-change that will allow setting the prefix for stats in the "metric" section of each cloud in the openstacksdk config file. This will allow users to return to the previous behaviour by setting each cloud with an individual prefix in the cloud configuration (or, indeed keep the current behaviour by not setting that). So along with removing the ineffective arguments, I've updated the relevant documentation and added a release note detailing this. Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/786814 Change-Id: I30e57084489d822dd6152d3e5712e3cd201372ae
This commit is contained in:
parent
9c83e8a95e
commit
9517be8ca6
@ -32,6 +32,13 @@ configured to send information to it. Set the environment variable
|
|||||||
``STATSD_PORT`` if this should be different to the default ``8125``)
|
``STATSD_PORT`` if this should be different to the default ``8125``)
|
||||||
for the Nodepool daemon to enable this support.
|
for the Nodepool daemon to enable this support.
|
||||||
|
|
||||||
|
If using the OpenStack driver, setting these variables will enable
|
||||||
|
``openstacksdk`` reporting. By default, ``openstacksdk`` will report
|
||||||
|
OpenStack API statistics prefixed with ``openstack.api``. To override
|
||||||
|
this, for example to report API statistics on a per-cloud basis, see
|
||||||
|
the OpenStack SDK configuration documentation on `metrics
|
||||||
|
<https://docs.openstack.org/openstacksdk/latest/user/guides/stats.html>`__.
|
||||||
|
|
||||||
Install Nodepool
|
Install Nodepool
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
import operator
|
import operator
|
||||||
import os
|
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
|
||||||
@ -93,9 +92,6 @@ class OpenStackProvider(Provider, QuotaSupport):
|
|||||||
config=self.provider.cloud_config,
|
config=self.provider.cloud_config,
|
||||||
use_direct_get=False,
|
use_direct_get=False,
|
||||||
rate_limit=rate_limit,
|
rate_limit=rate_limit,
|
||||||
statsd_host=os.getenv('STATSD_HOST', None),
|
|
||||||
statsd_port=os.getenv('STATSD_PORT ', None),
|
|
||||||
statsd_prefix='nodepool.task.{0}'.format(self.provider.name),
|
|
||||||
app_name='nodepool',
|
app_name='nodepool',
|
||||||
app_version=version.version_info.version_string()
|
app_version=version.version_info.version_string()
|
||||||
)
|
)
|
||||||
|
14
releasenotes/notes/openstack-statsd-ff1abe1a46794490.yaml
Normal file
14
releasenotes/notes/openstack-statsd-ff1abe1a46794490.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
Nodepool 0.3.6 introduced an unintended behaviour change with
|
||||||
|
``openstacksdk`` ``statsd`` reporting. Due to a change in the way
|
||||||
|
nodepool manages OpenStack API calls, all API related statistics
|
||||||
|
created during interaction with clouds are now generated by
|
||||||
|
``openstacksdk`` and prefixed with ``openstack.api`` instead of
|
||||||
|
being created by nodepool and prefixed with
|
||||||
|
``nodepool.provider.<cloud>`` as in prior versions. If you wish
|
||||||
|
to revert to the prior behaviour, changes have been provided to
|
||||||
|
``openstacksdk`` to allow setting custom prefixes via the cloud
|
||||||
|
configuration file; see `statsd documentation
|
||||||
|
<https://zuul-ci.org/docs/nodepool/installation.html#statsd-and-graphite>`__
|
Loading…
Reference in New Issue
Block a user