UPPER_CONSTRAINTS_FILE is old name and deprecated
This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.
Change-Id: Ic64ec2e5b6562de7ea901d62aab446c661d675e8
CVE-2022-23302, CVE-2022-23305, and CVE-2022-23307.
Though it does not contain a vulnerable configuration of log4j, to avoid
needing to prove that and false positives of security scanners, this
commit is the result of running the following commands:
zip -q -d monasca_agent/collector/checks/libs/jmxfetch-0.3.0-jar-with-dependencies.jar org/apache/logging/log4j/core/lookup/JndiLookup.class org/apache/log4j/net/JMSAppender.class org/apache/log4j/jdbc/JDBCAppender.class org/apache/log4j/net/JMSSink.class org/apache/log4j/chainsaw"*"
unzip monasca_agent/collector/checks/libs/jmxterm-1.0-DATADOG-uber.jar WORLDS-INF/lib/log4j.jar
zip -q -d WORLDS-INF/lib/log4j.jar org/apache/logging/log4j/core/lookup/JndiLookup.class org/apache/log4j/net/JMSAppender.class org/apache/log4j/jdbc/JDBCAppender.class org/apache/log4j/net/JMSSink.class org/apache/log4j/chainsaw"*"
zip monasca_agent/collector/checks/libs/jmxterm-1.0-DATADOG-uber.jar WORLDS-INF/lib/log4j.jar
Change-Id: Id47ba9397e7fef1ac8622abb2a1691a260f4bc9c
The lib psutil in monasca-agent collector image is installed by
pip. An extra installation by apk isn't needed.
Change-Id: I580bdb01479522e7243bf3d2ace757edb2eff6db
Skip agent service detection if only installing plugins.
This will make it possible to use monasca-setup on the environments
where monasca-agent is not running as systemd service.
Typical usecase is running agent on kubernetes.
Change-Id: I232506e19f593b43cc011c6499242847c9bbc108
This reverts commit 9ff337881be12463b15ab56dfa7d76c36142970f.
Reason for revert:
The oslo_utils.fnmatch module was added to solve an issue in py2.7 but
it is no longer required because py2.7 is no longer supported.
The module was deprecated since oslo.utils 4.9.1[1] and the stdlib's
fnmatch module should be used instead.
[1] 4c893c92f551c9dd2a7cfbe7ae8171ad8139df0b
Change-Id: I84c0d2b2705e34b9853d42d03a398ecbe4f95330
With switching the SOAP library backing oslo.vmware [1], the internal
representation of ManagedObjectReference's attributes changes. To be able
to make the switch without interruption, we introduced helper functions
in oslo.vmware. This commit uses one of those - get_moref_value()
- to make the access to the "value" attribute compatible with both
backing libraries.
[1] https://specs.openstack.org/openstack/oslo-specs/specs/victoria/oslo-vmware-soap-library-switch.html
Change-Id: I50f0aa5d8865323515d15d1c1c5f10683bbac090
- In RHOSP16.1 (TripleO based) the Keystone process name is
`keystone`. In previous RHOSP10 the process name was
`keystone-admin` and `keystone-main`.
Change-Id: I58882af66979f324cb372696febda65a33eb81b6
- In PY3 the output of subprocess.Popen is a type bytes, but
strip() method requires a type str.
Story: 2008017
Task: 40669
Change-Id: I297c30044df9a94baa645a1a27de10bb49038440
The default nodeset was just changed to focal [1], which in the absence
of the python-is-python3 package doesn't provide a python binary.
[1] https://review.opendev.org/c/opendev/base-jobs/+/789098
Change-Id: I70984db7af7ce5f7028077db4debcd2cd9bd7c45
These plugins are not working with docker image because of docker architecture,
this kind of metrics are collected by cadvisor plugin.
Change-Id: I67c47ddfc26a30f6e48bcf4102c750812970be97
The 'libvirt_type' and 'libvirt_uri' options are currently set by oslo configuration library.
However, in 'monasca_agent/collector/virt/libvirt/inspector.py' file these options cannot be
provided by a configuration file. Changing this to retrieve both options from
'conf.d/libvirt.yaml' file.
Change-Id: I1918fda471e951f42db0d302e371108b664e936c
assertItemsEqual was removed from Python's unittest.TestCase in
Python 3.3 [1][2]. We have been able to use them since then, because
testtools required unittest2, which still included it. With testtools
removing Python 2.7 support [3][4], we will lose support for
assertItemsEqual, so we should switch to use assertCountEqual.
[1] - https://bugs.python.org/issue17866
[2] - https://hg.python.org/cpython/rev/d9921cb6e3cd
[3] - testing-cabal/testtools#286
[4] - testing-cabal/testtools#277
Change-Id: I1b269b5c06a99e8f62f7c5a33b2314de06389041
assertItemsEqual was removed from Python's unittest.TestCase in
Python 3.3 [1][2]. We have been able to use them since then, because
testtools required unittest2, which still included it. With testtools
removing Python 2.7 support [3][4], we will lose support for
assertItemsEqual, so we should switch to use assertCountEqual.
[1] - https://bugs.python.org/issue17866
[2] - https://hg.python.org/cpython/rev/d9921cb6e3cd
[3] - testing-cabal/testtools#286
[4] - testing-cabal/testtools#277
Change-Id: I7ea008e1d1b83b9ad264b6846de8ab16780c9528
The imp module is deprecated[1] since version 3.4, use importlib to
instead
[1]: https://docs.python.org/3/library/imp.html
Change-Id: I10f2c8c165aebddc8fd39601a0a23231ff89cdf7
When checking response of Cinder API, a pattern match is done.
As of now, it is checked if "version 1" is installed.
This version is not supported any longer since Cinder train release, as mentioned in release notes:
https://docs.openstack.org/releasenotes/python-cinderclient/train.html
Now, http_check of monasca-agent accepts all known API versions: 1-3
Change-Id: I22b32bcc49760a2da38310aed8e04e44f691a974
Story: 2008021
Task: 40673
Single quote in help text caused issues on Red Hat.
In order to avoid issues on any platform,
single quote (') has been removed.
Change-Id: Iccab9a225539a1d87a6ad6bfd873a65d36b8a515
Story:2007978
Task: 40601
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.
Change-Id: Ia3f2c8abc87cf5551d3469d616790e8e9d567bce
The json_plugin tests read the localhost name in a different way
to how the hostname is fetched in the Monasca Agent check. This can
cause these tests to fail since the hostnames may differ. For example,
only one may contain .home as a suffix. In this change we avoid reading
the hostname from the system running the tests.
Story: 2007743
Task: 39921
Change-Id: Ifddba6aa9350f722a741a28a152ed9bc3e0b7da6
Add error handler that prevent crash of forwarded
when agent is not able to connect to keystone
Story: 2007674
Task: 39781
Change-Id: If6366e5b94f9cbe3f21ce9dbeb26d28e3a36ae88