GenericMappingTools / gmtserver-admin

Cache data and script for managing the GMT data server
GNU Lesser General Public License v3.0
7 stars 3 forks source link

The cron job no longer runs so the server is not updated #267

Closed seisman closed 1 month ago

seisman commented 1 month ago

In #266, I added a new file to cache, but the server is not updated.

Then I login in the server and see the log file git_update.cron.log.

Start Time: Wed Feb 21 10:00:01 HST 2024
Already on 'master'
From https://github.com/GenericMappingTools/gmtserver-admin
 = [up to date]      master     -> origin/master
 = [up to date]      Venus-relief-CPT -> origin/Venus-relief-CPT
 = [up to date]      earth-distances -> origin/earth-distances
 = [up to date]      filter-inc -> origin/filter-inc
 = [up to date]      fix-check-mirrors -> origin/fix-check-mirrors
 = [up to date]      fix-resolution-in-name -> origin/fix-resolution-in-name
 = [up to date]      handle-backwards -> origin/handle-backwards
End Time: Wed Feb 21 10:00:02 HST 2024

The cron job hasn't run at all since February.

I also can't run the update script gmtserver-admin/scripts/srv_git_update.sh or git pull origin master, with errors like:

remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 9 (delta 3), reused 7 (delta 3), pack-reused 0
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed

I guess it's because Paul is the owner of these directories.

Esteban82 commented 1 month ago

I guess it's because Paul is the owner of these directories.

Where are those directories located?

There are also some files/directories own by Paul in the candidate server (e.g. /export/gmtserver/gmt/candidate/server/earth/earth_synbath).

What can we do? Make another directory?

seisman commented 1 month ago

I guess it's because Paul is the owner of these directories.

Where are those directories located?

There are also some files/directories own by Paul in the candidate server (e.g. /export/gmtserver/gmt/candidate/server/earth/earth_synbath).

What can we do? Make another directory?

I'm talking about the /export/gmtserver/gmt/gmtserver-admin. It's a local clone of this repository. The server should update the local clone and then copy the files in cache to the /export/gmtserver/gmt/data directory. But as I said, the cron job failed to run.

seisman commented 1 month ago

What can we do? Make another directory?

Since it's just a local copy of this repository, I think we can delete this directory, make a new clone, and then add the cron job. All these steps should be done by a single account. I can do it if you're OK with it.

Esteban82 commented 1 month ago

Since it's just a local copy of this repository, I think we can delete this directory, make a new clone, and then add the cron job. All these steps should be done by a single account. I can do it if you're OK with it.

Do you mean the gmtserver-admindirectory? or the candidate? or both?

seisman commented 1 month ago

Just the gmtserver-admin directory.

For other directories, the owner is still Paul and the group is gmt. We're all in the gmt group, so we should be able to read and write the directories without permission issues.

The gmtserver-admin directory is special that it contains .git directories which have files that are read-only to Paul.

Esteban82 commented 1 month ago

For other directories, the owner is still Paul and the group is gmt. We're all in the gmt group, so we should be able to read and write the directories without permission issues.

So you suggest to leave it like this?

Esteban82 commented 1 month ago

Since it's just a local copy of this repository, I think we can delete this directory, make a new clone, and then add the cron job. All these steps should be done by a single account. I can do it if you're OK with it.

Ok, go ahead with this.

seisman commented 1 month ago

Since it's just a local copy of this repository, I think we can delete this directory, make a new clone, and then add the cron job. All these steps should be done by a single account. I can do it if you're OK with it.

Ok, go ahead with this.

OK, I've renamed the old gmtserver-admin to gmtserver-admin-pwessel and also add a cron job using my account. The next cron job is expected to run in a few minutes. Will see if it works.

@Esteban82

drwxrwxr-x  14 pwessel   gmt  4096 Aug  8 16:50 .
drwxr-xr-x. 13 root      root  242 Mar  4 19:06 ..
drwxrwxr-x   2 pwessel   gmt   153 Nov  8  2023 ancient
drwxr-xr-x   2 seisman   gmt  4096 May 11  2020 BlackMarble2016
drwxrwxr-x   4 pwessel   gmt   163 Aug  8 10:10 candidate
drwxrwxr-x   5 pwessel   gmt  4096 Aug  8 14:56 data
drwxrwxr-x  10 seisman   gmt  4096 Aug  8 16:49 gmtserver-admin
drwxrwxr-x  10 pwessel   gmt  4096 Dec 12  2023 gmtserver-admin-pwessel
drwxrwxr-x   2 pwessel   gmt    33 Aug  5 02:24 LOGS
drwxrwxr-x  17 esteban82 gmt  4096 May 16 16:17 old-earth-relief_2.5.5
drwxrwxr-x   2 pwessel   gmt  4096 Oct 17  2019 old-earth-reliefs-v1
drwxrwxr-x   2 pwessel   gmt  4096 Mar 15  2020 old-earth-reliefs-v2
drwxrwxr-x   4 pwessel   gmt   105 Sep 13  2023 static
drwxrwxr-x   4 pwessel   gmt  4096 Dec 13  2023 test

Perhaps we should create a backup directory and move the old/unused directories like old-earth-reliefs-v1 to it.

seisman commented 1 month ago

I think it works.