coq / coq.github.io

Source files of the coq.inria.fr website
https://coq.inria.fr/
Other
15 stars 37 forks source link

Auto-sync not working. #149

Closed Zimmi48 closed 4 years ago

Zimmi48 commented 4 years ago

@maximedenes

Lately, I've noticed that I had to manually run the sync.sh script (in sudo mode) on the Coq server to have the changes that were merged in this repo propagated to the website.

Here is the content of /var/deploy/latest-sync.log:

========== GIT PULL ==========
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed
Zimmi48 commented 4 years ago

Deployment failed again (I was monitoring) with:

COQ WEBSITE UPDATE
Sat Jun 13 16:20:01 CEST 2020
========== GIT PULL ==========
From http://github.com/coq/www
   1e0fbe8..7e4c770  master     -> origin/master
Updating 1e0fbe8..7e4c770
Fast-forward
 NEWSINDEX              |  1 +
 incl/macros.html       |  6 +++---
 news/coq-8-11-2-is-out | 11 +++++++++++
 3 files changed, 15 insertions(+), 3 deletions(-)
 create mode 100644 news/coq-8-11-2-is-out
========== MAKE ========
yamlpp-0.3/yamlpp -o incl/news/recent.html news/coq-8-11-2-is-out incl/news/li.html news/coq-8-11-1-is-out incl/news/li.html news/coq-8-11-0-is-out incl/news/li.html
Uncaught exception: Sys_error("incl/news/recent.html: Permission denied")
Makefile:92: recipe for target 'incl/news/recent.html' failed
make: *** [incl/news/recent.html] Error 2
maximedenes commented 4 years ago

@Zimmi48 how's the script triggered again?

maximedenes commented 4 years ago

Ok, I found the cron file.

maximedenes commented 4 years ago

Lately, I've noticed that I had to manually run the sync.sh script (in sudo mode)

But that script is not expected to be run by root. It is expected to be run by www-deploy. This probably messed up permissions. What was the failure before you run the script with the wrong user, the first time?

maximedenes commented 4 years ago

I think I fixed the permissions now.

maximedenes commented 4 years ago

Closing for now, please reopen if you see new failures.

Zimmi48 commented 4 years ago

Thanks! Next time I see a failure of the sync script, I will be more careful. Should I do sudo www-deploy or something like this to run it? Unfortunately, I cannot tell what the problem was because (IIRC) the script had failed after the git pull step, then the log had been overwritten by the next cron runs with "Nothing to update".