spurious logs about apt_pkg deprecation in 19.10 unit logs

Bug #1852004 reported by Drew Freiberger
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ceph Monitor Charm
Triaged
Low
Unassigned
charms.ceph
New
Undecided
Unassigned

Bug Description

Seeing many lines like the below example in the logs repeatedly for charm ceph-mon stable/19.10 on xenial-queens cloud.

unit-ceph-mon-0: 17:09:04 WARNING unit.ceph-mon/0.juju-log osd:38: Support for use of upstream ``apt_pkg`` module in conjunctionwith charm-helpers is deprecated since 2019-06-25

Changed in charm-ceph-mon:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Trent Lloyd (lathiat) wrote :

The only usage of apt_pkg in ceph-mon appears to be from charms.ceph:

lib/charms_ceph/utils.py
708: import apt_pkg as apt

It's being used for a simple call to apt.upstream_version to get the upstream version number.

Based on the following commit message:
https://github.com/juju/charm-helpers/commit/d2ea1b8d8c2fb5bc80b8ff2f7f81c82a02bd611b

the apt_pkg interface is not stable across releases, hence charm-helpers has implemented it's own version and triggers this deprecation warning because the charm may have expected apt_pkg.init() to have been called by charmhelpers which it would no longer do although currently it still makes the call as it would lead to a segfault if not.

So actual impact is low but the log message is annoying and the there is an upstream_version method implemented in charmhelpers so we should be able to simply switch to that.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.