Page MenuHomePhabricator

check-mariadb-backups pkg_resources.VersionConflict: 0.2 (/usr/lib/python3/dist-packages), Requirement.parse('wmfbackups==0.1')
Closed, ResolvedPublic

Description

Since moving Icinga to alert1001 I've noticed that "dump of" and "snapshot of" checks are reporting unknown status.

Looking closer it seems that check-mariadb-backups is failing with the below. Currently wmfbackups 0.2 is what's available via apt in buster.

alert1001: /usr/bin/check-mariadb-backups --help

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (wmfbackups 0.2 (/usr/lib/python3/dist-packages), Requirement.parse('wmfbackups==0.1'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/check-mariadb-backups", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3191, in <module>
    @_call_aside
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3175, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3204, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 585, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'wmfbackups==0.1' distribution was not found and is required by the application

Event Timeline

herron renamed this task from check-mariadb-backups pkg_resources.VersionConflict: 0.2 (/usr/lib/python3/dist-packages), Requirement.parse('wmfbackups==0.1' to check-mariadb-backups pkg_resources.VersionConflict: 0.2 (/usr/lib/python3/dist-packages), Requirement.parse('wmfbackups==0.1').Sep 23 2020, 4:50 PM

Was there an OS upgrade on the change from icinga1001 to alert1001? I must not have uploaded all versions for all os versions, or something.

Was there an OS upgrade on the change from icinga1001 to alert1001? I must not have uploaded all versions for all os versions, or something.

Yes there was an OS upgrade from Stretch (icinga1001) to Buster (alert1001)

I see the issue, after apt upgrade, the 0.2 version was available, which was the one that worked. It must have been caught in the small window between first deploy (0.1) and 0.2 fix, and I didn't notice alert1001 was about to be made the primary host.

0.1 had missing dependencies. Those are fixed on 0.2. Now it works. Apologies.

Is there an alert2001 to do the same fix?

apt install wmfbackups-check  #so it installs 0.2
jcrespo claimed this task.

This should be fixed now in alert1001 and alert2001. The issue was that my puppet only had ensure_package(wmfbackups-check) but I didn't upgrade to 0.2 on alert* hosts, only the icinga ones.

I see the issue, after apt upgrade, the 0.2 version was available, which was the one that worked. It must have been caught in the small window between first deploy (0.1) and 0.2 fix, and I didn't notice alert1001 was about to be made the primary host.

0.1 had missing dependencies. Those are fixed on 0.2. Now it works. Apologies.

No problem at all, thanks much for the quick fix! Confirmed that these Icinga checks are green once again.

Is there an alert2001 to do the same fix?

apt install wmfbackups-check  #so it installs 0.2

Yes indeed there is, let's add a package require to puppet as well.

This should be fixed now in alert1001 and alert2001. The issue was that my puppet only had ensure_package(wmfbackups-check) but I didn't upgrade to 0.2 on alert* hosts, only the icinga ones.

ah, even better. thanks @jcrespo!

I will, it is just that by the time we add >= 0.2, I will have a 0.3 version.

I think for now I will check on debdeploy all places where it is installed and control it manually, and when it is more stable, I will add the >=0.3 or more.