Noticed while investigating T294136, swift-proxy was failing on freshly provisioned ms-fe2009 due to missing python-monotonic (though python3-monotonic was installed). I suspect this a "recent" regression though with latest versions of swift package (and related). I've installed python-monotonic manually to verify and swift-proxy then indeed starts as expected
OK, I know what the problem is (at least at one level). Our swift front-ends use a bit of middleware wmf.rewrite which is shipped by us from puppet; that calls import monotonic. But there's nothing to say that python-monotonic (or python3-monotonic) should be installed from swift front-ends as far as I can see.
I'm not sure what was causing python-monotonic to get installed in the past, but it might have just been luck! I'll have a look at puppetizing this.
@fgiunchedi while investigating this, I find in modules/swift/files/python3.9/SwiftMedia/README the note
The files in the wmf directory come from the svn repo for the SwiftMedia extension. That is the canonical copy; any changes here should be copied there as well.
I can only find signs of a long-deleted https://www.mediawiki.org/wiki/Extension:SwiftMedia ...? If this is now part of code MW could we move the rewriting work there?