spurious logs about apt_pkg deprecation in 19.10 unit logs
Bug #1852004 reported by
Drew Freiberger
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-
Changed in charm-ceph-mon: | |
status: | New → Triaged |
importance: | Undecided → Low |
To post a comment you must log in.
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: /github. com/juju/ charm-helpers/ commit/ d2ea1b8d8c2fb5b c80b8ff2f7f81c8 2a02bd611b
https:/
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.