new ceilometer

Dmitrii Shcherbakov dmitrii.shcherbakov at canonical.com
Sun Jul 9 11:09:28 UTC 2017


Hi Giuseppe,

First of all, thank you for looking into writing a gnocchi charm!

There is already an ongoing effort from James Page on charming gnocchi:
https://github.com/openstack-charmers/charm-gnocchi
https://github.com/openstack-charmers/charm-interface-gnocchi

https://review.openstack.org/#/c/475282/3/specs/pike/approved/gnocchi.rst -
design doc.

It is a reactive charm based upon charms.openstack.

A lot of code is abstracted away by the layer:openstack-api
https://github.com/openstack-charmers/charm-gnocchi/blob/master/src/layer.yaml
https://github.com/openstack/charm-layer-openstack-api

https://github.com/openstack-charmers/charm-gnocchi/blob/master/src/lib/charm/openstack/gnocchi.py#L89
- package installation

It might be worthwhile to consolidate the effort on a single charm to avoid
duplicate work.

---

Per the master branch of charm-cinder, oslo_messaging_notifications section
is present in two templates. The template for mitaka is used for newton as
well - this is a result of a library code.
https://github.com/openstack/charm-cinder/search?utf8=%E2%9C%93&q=oslo_messaging_notifications&type=

http://bazaar.launchpad.net/~charm-helpers/charm-helpers/devel/view/head:/charmhelpers/contrib/openstack/templating.py#L153
- the library code comment for OSConfigRenderer that discusses versioning
and how templates are rendered with regards to the OpenStack versions.

That's how messagingv2 got into the templates for cinder:
https://github.com/openstack/charm-cinder/commit/07ae3acbb49368c58b0ad3d119ff21db39fb31c2

The notification_driver option from the DEFAULT section is deprecated now.
The option with the new name is an array and is empty by default:
https://docs.openstack.org/oslo.messaging/latest/configration/opts.html?highlight=messagingv2#oslo-messaging-notifications
https://github.com/openstack/oslo.messaging/blob/master/oslo_messaging/notify/notifier.py#L33-L40

So the current charm templates seem a bit wrong to me as both the
'notification_driver' option in the DEFAULT section and 'driver' options
are used in the same template:
https://github.com/openstack/charm-cinder/blob/master/templates/ocata/cinder.conf#L17-L20
https://github.com/openstack/charm-cinder/blob/master/templates/ocata/cinder.conf#L69-L72

# ambiguous :^\
juju run --unit cinder/0 'cat /etc/cinder/cinder.conf' | grep -P
'transport_url|^driver|notification_driver'
notification_driver = cinder.openstack.common.notifier.rpc_notifier
driver = messagingv2

# the driver configuration section of a config file
[oslo_messaging_rabbit]
rabbit_userid = cinder
rabbit_virtual_host = openstack
rabbit_password = very_secure
rabbit_hosts = 192.0.2.105,192.0.2.111,192.0.2.67

These options deprecated in favor of 'transport_url':
https://github.com/openstack/oslo.messaging/blob/master/oslo_messaging/_drivers/impl_rabbit.py#L117-L122

Although you can track how oslo_messaging_rabbit configuration will result
in 'transport_url' being filled out (see the _url variable of
type TransportURL)
https://github.com/openstack/oslo.messaging/blob/master/oslo_messaging/_drivers/impl_rabbit.py#L533-L544
https://github.com/openstack/oslo.messaging/blob/master/oslo_messaging/_drivers/base.py#L327-L336
- the rabbit driver inherits from this base class and fills the _url
variable

'transport_url' falls back to whatever is used for RPC if the value is not
explicitly set which is RabbitMQ in our case (
https://github.com/openstack/oslo.messaging/blob/master/oslo_messaging/notify/notifier.py#L41-L47
"A URL representing the messaging driver to use for notifications. If not
set, we fall back to the same configuration used for RPC."):
https://docs.openstack.org/oslo.messaging/latest/configration/opts.html?highlight=messagingv2#oslo_messaging_notifications.transport_url

We need to maintain compatibility with the currently supported OpenStack
versions: charm versions may go forward and you would use an Ocata charm
release with OpenStack Mitaka, but the charm code has to know that the
config files it renders are compatible with the previous versions.

https://www.ubuntu.com/info/release-end-of-life
https://assets.ubuntu.com/v1/dd209641-openstack-release-eol-20161213.png

That being said, I would first check if we can completely replace the old
config options with the new ones and if so, do that for all the charms of
interest.

It seems like notification_driver option was deprecated since Mitaka (which
is EoL upstream as of now):
https://review.openstack.org/gitweb?p=openstack%2Fopenstack-manuals.git;a=commitdiff;h=de5811b94088ff41631d9aaca1900e06e0092fdf

https://github.com/openstack/oslo.messaging/commit/33c1010c3281804456a22b769c4bac5ac6a7cca1#diff-60d9d920c907281c0886983986a46a84R33

git describe --abbrev=0 33c1010c3281804456a22b769c4bac5ac6a7cca1

3.0.0

Not sure how many people care about Icehouse + charms nowadays but I know
that there are some active clouds still relying on 14.04 + icehouse + juju
1.x so it is debatable whether we should enable the new 'driver' option
unconditionally in new charm releases before 14.04 + Liberty go EoL from
our perspective.

---

To sum up: we need to make a decision on how to modify the current config
files to use the new options without breaking old deployments that could
potentially get updated charms.

As always, patches are welcome :^)



Best Regards,
Dmitrii Shcherbakov

Field Software Engineer
IRC (freenode): Dmitrii-Sh

On Thu, Jul 6, 2017 at 6:46 PM, Giuseppe Attardi <giuseppe.attardi at garr.it>
wrote:

> The  ceilometer service has gone through a major overhaul, where some of
> its parts have been removed and assigned to gnocchi.
>
> https://docs.openstack.org/ceilometer/latest/architecture.html
>
> In particular the ceilometer api has been discontinued and the ceilometer
> collector is superseded by ceilometer agent-notification.
> Since ceilometer no longer collects data, also the mongodb is no longer
> needed.
>
> Therefore the Ceilometer charm must be updated as well as other charms
> that must be configured to talk to ceilometer, according to the
> instructions here:
>
> https://docs.openstack.org/project-install-guide/telemetry/ocata/install-
> controller.html
>
> I am working on a gnocchi charm and now need to do modifications to te
> following charms:
>
> - ceilometer
> - cinder
> - glance
> - neutron
> - swift
>
> In particular for example, one needs to add this to the
> /etc/glance/glance-api.conf file:
>
> [DEFAULT]...transport_url = rabbit://openstack:RABBIT_PASS@controller
> [oslo_messaging_notifications]...driver = messagingv2
>
>
> Could someone advise of where this change should go in the Glance charm?
>
> Surprisingly, the section oslo_messaging_notifications is already present
> in the Cinder file cinder-api.conf generated by the charm, but I could not
> find where in the code of the charm it gets done.
>
> When the gnocchi charm and the changes to the others will be ready, I will
> post them.
>
> Any help appreciated.
>
> — Beppe
>
>
>
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/juju
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20170709/79502a13/attachment.html>


More information about the Juju mailing list