Patch out charmhelpers.osplatform.get_platform() and
charmhelpers.core.host.lsb_release() globally in the unit tests to
insulate the unit tests from the platform that the unit tests are being
run on.
Change-Id: I7116d1232d19996e39665f5e6f15dae7b8e74118
This is a subordinate charm and since a recent
commit [1] it shares a list of its services with
the principal charm nova-compute, which has now
the responsibility to pause and resume services. [2]
The ceilometer-agent-compute service has a
dependency to the nova-compute service anyway, so
it is impossible for this charm to resume its
service if its principal charm nova-compute is
paused. This is what also led to errors in
ceilometer-agent's post-series-upgrade hook. This
hook attempted to resume its service although
the principal service was still paused. Removing
this logic entirely solves this issue.
Validated by running openstack-upgrade and
series-upgrade tests. [3]
[1]: https://opendev.org/openstack/charm-ceilometer-agent/commit/be45f779
[2]: https://opendev.org/openstack/charm-nova-compute/commit/8fb37dc0
[3]: https://github.com/openstack-charmers/charmed-openstack-tester
Closes-Bug: #1952882
Change-Id: Ia22b53b52b541250f7f803c6708968d75e64475c
For principal - subordinate plugin type relations where the
principal Python payload imports code from packages managed by a
subordinate, upgrades can be problematic.
This change will allow a subordinate charm that have opted into the
feature to inform its principal about all implemented release -
packages combinations ahead of time. With this information in place
the principal can do the upgrade in one operation without risk of
charm relation RPC type processing at a critical moment.
This is similar to
https://review.opendev.org/c/openstack/charm-interface-keystone-domain-backend/+/781658https://review.opendev.org/c/openstack/charm-layer-openstack/+/781624
Change-Id: Ibd5bdcb141fc3103ee97123ff284fb2957802eba
Closes-Bug: #1927277
The ceilometer compute agent uses the default polling.yaml
from the installed packages without the ability to configure its contents.
This change adds two configuration options: 'polling-interval' and
'enable-all-pollsters', borrowing from the implementation in
charm-ceilometer. We start off with a limited set of meters as before
and if these are not enough, the user can set 'enable-all-pollsters' to
'true' to collect all available 'Pollster' metrics as listed in the
documentation [1].
Verification:
I tested this change on a cluster built from the OpenStack base bundle
and the ceilometer and gnocchi charms. I confirmed that extra metrics
that originate from the Compute Agent pollster (e.g. disk.device.read.latency)
are available in gnocchi after setting 'enable-all-pollsters' to true.
[1] https://docs.openstack.org/ceilometer/latest/admin/telemetry-measurements.html
Closes-Bug: #1914442
Change-Id: I21c9a93e7dd91bced9365e44f3e6a5315976c3bb
* charm-helpers sync for classic charms
* charms.ceph sync for ceph charms
* rebuild for reactive charms
* sync tox.ini files as needed
* sync requirements.txt files to sync to standard
Change-Id: I602a2a9c241de5898f737aacec6f85390d0be4f7
Samples collected can be batched together,
consequently increasing or reducing the
amount of API calls and body data
sent to the configured publisher.
This config is available since Rocky,
receiving the value from ceilometer-charm
to allow its tuning.
Change-Id: I986073fdacd750cf96d662abf1d58844479c25ba
Closes-bug: #1885190
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.
Note that https://github.com/openstack/charms.openstack is used during tests
and he need `mock`, unfortunatelly it doesn't declare `mock` in its
requirements so it retrieve mock from other charm project (cross dependency).
So we depend on charms.openstack first and when
Ib1ed5b598a52375e29e247db9ab4786df5b6d142 will be merged then CI
will pass without errors.
Depends-On: Ib1ed5b598a52375e29e247db9ab4786df5b6d142
Change-Id: Ibddd954daaf3cd008985ff27cd95dfe649476555
Switch to marking non-leaf python-* packages as automatically
installed so that they will be purged once the last remaining
package that depends on them that was manually installed is
removed.
Change-Id: If821cb511a2fdb65ac3e8ad8db88a00770864d42
Closes-Bug: 1802400
Ceilometer has had an openstack-origin and supported upgrading
the Ceilometer version independently of the principle that it is
associated with. This can cause issues with clashes in package
dependencies between the two. This change makes the
ability for the agent to be upgraded independently of the principle
and instead has the upgrade triggered by the principle. This brings
this charm inline with the other OpenStack subordinate charms.
Change-Id: I641ac2168ac705191d916eaa0624214791e1745d
Closes-Bug: #1802400
Switch package install to Python 3 for OpenStack Rocky or later.
When upgrading, remove any python-* packages that where explicitly
installated and then autoremove --purge any dependencies that are
no longer required.
Change-Id: If189859cbc98f326adb5b1da8d31e9a20da95af9
If rabbitmq is deployed in a cluster then the ceilometer charm will
pass rabbitmq_hosts and rabbitmq_host to ceilometer-agent. This charm
was ignoring the rabbitmq_hosts key and thus always talking to a
single rabbit even if there were multiple.
Change-Id: I42c2e3ee4ee2bd1feb9815a4d9895a7121801995
Closes-Bug: #1670273
In enable_memcache, ensure that the os_release cache is reset
after upgrade.
Additionally, call apt_install(get_packages()) for upgrades
to ensure that release-specific packages (such as memcached)
are installed.
Change-Id: Ia3689d2d0c549fc55f1bd533654f80c98ce5462a
Partial-Bug: 1715624
Update configuration supplied to nova-compute charm to switch
to real notification drivers, rather than old/obsolete keys
which are not longer supported.
Change-Id: Ic58fa78ae80d88113abc5e2f8361a143ba380d01
With the release of 4.2.0 of keystonemiddleware using the
in-process token cache is no longer recommended. It is recommended
that a memcache backend to store tokens is used instead,
This installs and configures memcache and configures ceilometer agent
to use memcache for token caching.
http://docs.openstack.org/releasenotes/keystonemiddleware/mitaka.html#id2
Change-Id: If7dd4c5472a7842f06d0fd44c1b2012c9c9d1075
When using v3 authentication and authorization Ceilometer must
authenticate to services project in service_domain.
Change-Id: Ibb19fa8476cf712ccb4bc524a48d3501f42fc62c
Closes-Bug: 1636098
Use shared section template for keystone authotken and update
service_credentials section to support Keystone v3 for OpenStack
Mitaka or later.
Change-Id: Ia7750276e6a6a52dc95a93f1d5cb8d1f544a94d5
Closes-Bug: #1624173
Juju 2.0 provides support for display of the version of
an application deployed by a charm in juju status.
Insert the os_application_version_set function into the
existing assess_status function - this gets called after
all hook executions, and periodically after that, so any
changes in package versions due to normal system updates
will also be reflected in the status output.
This review also includes a resync of charm-helpers to
pickup hookenv and contrib.openstack support for this
feature.
Change-Id: I0cef2ddc2dfc04bb6631ec61e7f890ebae94961f
All contributions to this charm where made under Canonical
copyright; switch to Apache-2.0 license as agreed so we
can move forward with official project status.
Change-Id: I081ca71ffd24c8169bed053c351ad4019956e99b
Adds improved pause and resume unit to the charm such tha the
charm stays paused during maintenance operations.
Sync latest version of charm-helpers for maintenance mode.
Amulet test for pause/resume actions
Change-Id: I3ec090fb9eb85561834b79003606c4d4b38dc84c