Skip to content

New ol-home0 Crons need to run/trigger ol-www1 ipstats #5144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #2036 ...
mekarpeles opened this issue May 5, 2021 · 3 comments
Closed
Tracked by #2036 ...

New ol-home0 Crons need to run/trigger ol-www1 ipstats #5144

mekarpeles opened this issue May 5, 2021 · 3 comments
Assignees
Labels
Affects: Configuration Related to the configuration of the dev/staging/prod environments, CI, docker, etc. [managed] Lead: @mekarpeles Issues overseen by Mek (Staff: Program Lead) [managed] Priority: 2 Important, as time permits. [managed]

Comments

@mekarpeles
Copy link
Member

mekarpeles commented May 5, 2021

We need our new Crons on ol-home0 to run or trigger the following via ssh on ol-www1:

source /opt/openlibrary/venv/bin/activate;sudo /opt/openlibrary/venv/bin/python /opt/openlibrary/openlibrary/scripts/ipstats.py /opt/openlibrary/olsystem/etc/openlibrary.yml from ol-www1

Originally posted by @mekarpeles in #2481 (comment)

Related:

@mekarpeles mekarpeles self-assigned this May 8, 2021
@mekarpeles mekarpeles added Priority: 1 Do this week, receiving emails, time sensitive, . [managed] Affects: Configuration Related to the configuration of the dev/staging/prod environments, CI, docker, etc. [managed] Lead: @mekarpeles Issues overseen by Mek (Staff: Program Lead) [managed] labels May 8, 2021
@mekarpeles
Copy link
Member Author

This may have been solved -- I manually updated updated /etc/cron.d/openlibrary to look like:

MAILTO=""
SCRIPTS=/opt/openlibrary/openlibrary/scripts
LOG=/var/log/openlibrary

# OL data dumps
0 20 1 * * openlibrary /olsystem/bin/verify-node.sh ol-www1 && mkdir -p /1/var/lib/openlibrary/sitemaps && rsync -av --delete rsync://ol-home/var_1/tmp/sitemaps/sitemaps /1/var/lib/openlibrary/sitemaps/

PYTHON_EGG_CACHE="/tmp/ol-egg-cache"
# Admin section count updates
0 * * * * www-data /olsystem/bin/verify-node.sh ol-www1 && /olsystem/bin/olenv $SCRIPTS/ipstats.py  /opt/openlibrary/olsystem/etc/openlibrary.yml
59 23 * * * www-data /olsystem/bin/verify-node.sh ol-www1 && /olsystem/bin/olenv $SCRIPTS/ipstats.py  /opt/openlibrary/olsystem/etc/openlibrary.yml

@cdrini + @cclauss -- note that the above is rsyncing to ol-home for sitemaps!!! Probably what we want? But just fyi.

I then used 🙈 forcefully removed /var/run/crond.pid lockfile (as it seemed like things were not behaving correctly) with sudo rm /var/run/crond.pid and then I ran sudo cron restart and then /etc/init.d/cron status to verify it was running.

I then tail'ed /var/log/cron.log and saw:

May  8 02:00:01 ol-www1.us.archive.org CRON[22653]: (www-data) CMD (/olsystem/bin/verify-node.sh ol-www1 && /olsystem/bin/olenv $SCRIPTS/ipstats.py  /opt/openlibrary/olsystem/etc/openlibrary.yml)

Which looks promising!

@mekarpeles
Copy link
Member Author

mekarpeles commented May 9, 2021

I re-ran crontab /etc/cron.d/openlibrary on ol-www1 and it looks like the latest up-to-date ol-www1 cron may now be running.

If it is, we can lower the priority of this task until we're ready to migrate ol-www1 to ol-www0 see #4252

@cdrini cdrini added this to the Next (proposed) milestone Jun 1, 2021
@mekarpeles mekarpeles added Priority: 2 Important, as time permits. [managed] and removed Priority: 1 Do this week, receiving emails, time sensitive, . [managed] labels Jun 7, 2021
@mekarpeles mekarpeles removed this from the Next (proposed) milestone Apr 4, 2022
@cdrini
Copy link
Collaborator

cdrini commented Mar 17, 2023

Closed in favour of #7622

@cdrini cdrini closed this as not planned Won't fix, can't repro, duplicate, stale Mar 17, 2023
@cclauss cclauss added this to the Sprint 2023-04 milestone Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects: Configuration Related to the configuration of the dev/staging/prod environments, CI, docker, etc. [managed] Lead: @mekarpeles Issues overseen by Mek (Staff: Program Lead) [managed] Priority: 2 Important, as time permits. [managed]
Projects
None yet
Development

No branches or pull requests

3 participants