Page MenuHomePhabricator

wmfuniq_experiment_fetcher.py fails to run on Trixie
Closed, ResolvedPublic

Description

Feb 14 00:45:13 cp2043 wmfuniq-experiment-fetcher[2753429]: Traceback (most recent call last):
Feb 14 00:45:13 cp2043 wmfuniq-experiment-fetcher[2753429]:   File "/usr/local/bin/wmfuniq-experiment-fetcher", line 101, in main
Feb 14 00:45:13 cp2043 wmfuniq-experiment-fetcher[2753429]:     temp_path.replace(config_path)
Feb 14 00:45:13 cp2043 wmfuniq-experiment-fetcher[2753429]:     ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
Feb 14 00:45:13 cp2043 wmfuniq-experiment-fetcher[2753429]:   File "/usr/lib/python3.13/pathlib/_local.py", line 782, in replace
Feb 14 00:45:13 cp2043 wmfuniq-experiment-fetcher[2753429]:     os.replace(self, target)
Feb 14 00:45:13 cp2043 wmfuniq-experiment-fetcher[2753429]:     ~~~~~~~~~~^^^^^^^^^^^^^^
Feb 14 00:45:13 cp2043 wmfuniq-experiment-fetcher[2753429]: OSError: [Errno 18] Invalid cross-device link: '/tmp/tmpx3gyiwld' -> '/etc/varnish/uniques.json'
Feb 14 00:45:13 cp2043 wmfuniq-experiment-fetcher[2753429]: During handling of the above exception, another exception occurred:
Feb 14 00:45:13 cp2043 wmfuniq-experiment-fetcher[2753429]: Traceback (most recent call last):
Feb 14 00:45:13 cp2043 wmfuniq-experiment-fetcher[2753429]:   File "/usr/local/bin/wmfuniq-experiment-fetcher", line 111, in <module>
Feb 14 00:45:13 cp2043 wmfuniq-experiment-fetcher[2753429]:     main(Path(sys.argv[1]))
Feb 14 00:45:13 cp2043 wmfuniq-experiment-fetcher[2753429]:     ~~~~^^^^^^^^^^^^^^^^^^^
Feb 14 00:45:13 cp2043 wmfuniq-experiment-fetcher[2753429]:   File "/usr/local/bin/wmfuniq-experiment-fetcher", line 103, in main
Feb 14 00:45:13 cp2043 wmfuniq-experiment-fetcher[2753429]:     raise Exception("Unable to write config file", ose)
Feb 14 00:45:13 cp2043 wmfuniq-experiment-fetcher[2753429]: Exception: ('Unable to write config file', OSError(18, 'Invalid cross-device link'))
Feb 14 00:45:13 cp2043 systemd[1]: wmfuniq-experiment-fetcher.service: Failed with result 'exit-code'.

Trixie versions of pathlib would allow us to use Path.move() without such errors but bullseye's version is too old.

Event Timeline

Change #1239458 had a related patch set uploaded (by BCornwall; author: BCornwall):

[operations/puppet@production] wmfuniq_experiment_fetcher: Use shutil for conf mv

https://gerrit.wikimedia.org/r/1239458

BCornwall changed the task status from Open to In Progress.Sat, Feb 14, 2:39 AM
BCornwall triaged this task as Medium priority.
BCornwall moved this task from Backlog to Actively Servicing on the Traffic board.

Change #1239458 abandoned by BCornwall:

[operations/puppet@production] wmfuniq_experiment_fetcher: Use shutil for conf mv

Reason:

Not atomic cross-filesystem

https://gerrit.wikimedia.org/r/1239458