BSC-ES / autosubmit-api

Autosubmit API is a package that consumes the information generated by Autosubmit and serves it as an API.
GNU General Public License v3.0
4 stars 0 forks source link

as_times database #20

Open LuiggiTenorioK opened 1 year ago

LuiggiTenorioK commented 1 year ago

In GitLab by @dbeltrankyl on Mar 7, 2023, 14:36

Hello @ jberlin , fyi @mcastril

2023-03-06 09:45:22,901 Autosubmit couldn't set your experiment as running on the autosubmit times database: /esarchive/autosubmit/as_times.db. Exception: attempt to write a readonly database
2023-03-07 14:09:56,393 Autosubmit couldn't set your experiment as running on the autosubmit times database: /esarchive/autosubmit/as_times.db. Exception: attempt to write a readonly database

Seems that there is an issue with the as_times database. Do you think this could explain some issues with the GUI?

dbeltran@bscearth357:/esarchive/autosubmit> ll -hart | grep as_times
-rw-r--r--    1 eadmin   Earth 543M Sep 13 18:45 as_times.db.dump
-rwxrwxrwx    1 eadmin   Earth 499M Sep 13 18:45 as_times.db~
-rw-r--r--    1 eadmin   Earth 564M Mar  7 14:33 as_times.db

For some reason, there is a dump, and as_times.db~ and also the correct one, as_times.db has no written permissions.. is there any reason for it? I can give it the correct permissions using eadmin.

Edit: Well I will give it the correct permissions because the as_times.db~ has them.

Also, do you know why the owner is eadmin?

LuiggiTenorioK commented 1 year ago

In GitLab by @dbeltrankyl on Mar 7, 2023, 14:37

Note: I don't know how long this has occurred, because usually I'm using my local laptop

LuiggiTenorioK commented 1 year ago

In GitLab by @ jberlin on Mar 7, 2023, 15:32

Hi @dbeltrankyl , as far as I remember, as_times db is deprecated, I guess is still being used by populate_times.py worker. I think there was some planned maintenance on these machines some weeks ago. maybe it is related, for the moment, I can ask operations to add the proper permissions. about the ownership, no idea why

LuiggiTenorioK commented 1 year ago

In GitLab by @ jberlin on Mar 7, 2023, 15:35

which user should be the correct owner for these DBs ?

LuiggiTenorioK commented 1 year ago

In GitLab by @dbeltrankyl on Mar 7, 2023, 15:42

Hi @dbeltrankyl , as far as I remember, as_times db is deprecated,

I think autosubmit is writing something there, but if it is not being read by the GUI we should remove it from Autosubmit,

I can ask operations to add the proper permissions. about the ownership, no idea why

Don't worry, I have access to eadmin so it is not an issue

LuiggiTenorioK commented 1 year ago

In GitLab by @mcastril on Mar 7, 2023, 17:40

Also, do you know why the owner is eadmin?

I imagine that the original owner is either Wilmer or me. For some reason, it turned out to be eadmin.

I think autosubmit is writing something there, but if it is not being read by the GUI we should remove it from Autosubmit,

In general terms this is legacy but still used for legacy experiments that still had not distributed database. In other words, it contains data that is in any other place.

According to the wiki and the documentation, populate_times.py updates the active status in that database, which in turn is used by the GUI.

Can you figure out at which point is Autosubmit using the ddbb?

LuiggiTenorioK commented 1 year ago

In GitLab by @mcastril on Mar 7, 2023, 17:44

I think this is the main module: autosubmit/history/database_managers/experiment_status_db_manager.py

But I am not sure if that's really used, given that it points to the central ddbb and I assume that for most of those operations it should use the distributed one

LuiggiTenorioK commented 1 year ago

In GitLab by @ jberlin on Mar 8, 2023, 19:39

Hi @dbeltrankyl , Now it seems the DB has the right permissions. Which GUI issues were you referring to ?

ll /esarchive/autosubmit/*.db
-rwxrwxrwx 1 eadmin  Earth 590969856 Mar  8 19:36 /esarchive/autosubmit/as_times.db

anyways, if there still logic in Autosubmit that concerns this DB, I guess it should be removed. the main job database that concerns the GUI are the distributed ones. I think for the moment and as it was mentioned we keep this db for backward compatibility

LuiggiTenorioK commented 1 year ago

In GitLab by @mcastril on Mar 9, 2023, 10:52