T390415 CVN API no longer syncing, last updated 2023-02-13 (original) (raw)

CVN API no longer syncing, last updated 2023-02-13

Data given by this script are outdated. Can you please have a look?

https://cvn.wmcloud.org/api.php?users=KrinkleSock

{ "users": {}, "lastUpdate": 1676305503 }

Which translates to:

$ date --date='@1676305503' Mon Feb 13 16:25:03 UTC 2023

And indeed I can confirm when I instruct one of the CVNBot instance on Libera Chat (e.g. #cvn-wp-nl, #cvn-sw, or #cvn-bots) that new additions do not show up even after 5-15 minutes.

/cc @HideonRosie

Related Changes in Gerrit:

Event Timeline

Comment Actions

krinkle@cvn-app11:/data/project/cvn-common/dropbox$ ls -halF … -rw------- 1 root project-cvn 71M Sep 29 2023 .nfs000000000006002e00000001 -rw------- 1 root project-cvn 71M Sep 29 2023 .nfs000000000006002f00000002 -rw------- 1 root project-cvn 71M Sep 29 2023 .nfs000000000006003100000004 … -rw-r--r-- 1 root root 71M Mar 30 05:45 cvn-api-db.sqlite

krinkle@cvn-apache10:/data/project/cvn-common/dropbox$ ls -halF … -rw-r--r-- 1 root root 71M Mar 30 05:45 cvn-api-db.sqlite

Okay, so the cronjob that copies from cvn-app11 (CVNBot14) to shared storage is working.

And, both servers have a working NFS mount of our "dropbox" directory.

Comment Actions

krinkle@cvn-apache10:/srv/cvn/git/cvn-api/data$ ls -halF … -rw-r--r-- 1 root project-cvn 71M Feb 13 2023 Lists.sqlite

And this indeed hasn't gotten updated in a long time.

Krinkle triaged this task as Medium priority.

Comment Actions

Looking at /var/log/syslog on cvn-apache10 reveals why:

… Mar 30 06:40:01 cvn-apache10 cron[705]: (systemcvndb-pull) INSECURE MODE (group/other writable) (/etc/cron.d/cvndb-pull) … Mar 30 06:41:01 cvn-apache10 cron[705]: (systemcvndb-pull) INSECURE MODE (group/other writable) (/etc/cron.d/cvndb-pull) Mar 30 06:42:01 cvn-apache10 cron[705]: (systemcvndb-pull) INSECURE MODE (group/other writable) (/etc/cron.d/cvndb-pull) Mar 30 06:43:01 cvn-apache10 cron[705]: (systemcvndb-pull) INSECURE MODE (group/other writable) (/etc/cron.d/cvndb-pull) Mar 30 06:45:01 cvn-apache10 cron[705]: (systemcvndb-pull) INSECURE MODE (group/other writable) (/etc/cron.d/cvndb-pull) …

And indeed, contrary to the provisioning at
https://gerrit.wikimedia.org/r/plugins/gitiles/labs/countervandalism/cvn-infrastructure/+/2f8a73199f4f3a4450dcb09e7613f0422fda3f53/setup.yaml#71

sudo chmod 644 /srv/cvn/git/infrastructure/crontab-config/*.cron

... the /etc/cron.d/cvndb-pull file on cvn-apache10 actually has mode 664 instead of 644.

I'm guessing during a server replacement we forgot to set it up correctly, and it takes a while to realize that it isn't working. Either that, or its mode changed for some other reason.

Anyway, I've run the provision steps again and it works correctly now.

… Mar 30 06:46:01 cvn-apache10 cron[705]: (systemcvndb-pull) RELOAD (/etc/cron.d/cvndb-pull) … Mar 30 06:50:01 cvn-apache10 CRON[2875683]: (root) CMD (/srv/cvn/git/infrastructure/bin/cvndb-pull > /dev/null) … Mar 30 06:55:01 cvn-apache10 CRON[2876589]: (root) CMD (/srv/cvn/git/infrastructure/bin/cvndb-pull > /dev/null) …

From the task description:

It now has a recent timestamp, and includes actual data that I submitted to CVNBot14 earlier today:

{ "users": { "KrinkleSock": { "type": "whitelist", "comment": "No reason given", "expiry": 1745112769, "adder": "Krinkle" } }, "lastUpdate": 1743317403 }

Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct. · Wikimedia Foundation · Privacy Policy · Code of Conduct · Terms of Use · Disclaimer · CC-BY-SA · GPL · Credits