Skip to content

Purging of action logs doesn't remove old records. #615

Open

Description

@TheReptile
  • API: CE 5.13.0
  • Environment
  • Operating system: Ubuntu 22.04.5 LTS
  • PHP: 8.2
  • Web server: nginx 1.18.0 (Ubuntu)
  • Database server: mariadb Ver 15.1 Distrib 10.6.23-MariaDB

What you did?

I tried cleaning up the action logs with the cleanup documented here:
https://www.passbolt.com/docs/hosting/maintenance/performance/purge-action-logs/

I used this command line:

sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake passbolt action_logs_purge -r 30 -v" www-data

What happened?

The cleanup happened, but when I query the database directly, I still see older records.

MariaDB [passbolt]> select created from action_logs limit 25;
+---------------------+
| created             |
+---------------------+
| 2021-05-18 09:57:04 |
| 2021-05-18 09:57:15 |
| 2021-07-08 12:02:55 |
| 2021-07-08 12:02:59 |
| 2021-07-08 12:03:01 |
| 2021-07-08 12:03:18 |
| 2022-02-25 07:31:44 |
| 2022-02-25 07:36:40 |
| 2022-02-25 08:24:40 |
| 2022-02-25 08:30:16 |
| 2022-02-25 08:31:17 |
| 2022-02-25 08:32:17 |
| 2022-02-25 08:33:17 |
| 2022-02-25 08:34:17 |
| 2022-02-25 08:35:17 |
| 2022-02-25 08:36:17 |
| 2022-02-25 08:37:17 |
| 2022-02-25 08:38:17 |
| 2022-02-25 08:38:36 |
| 2022-02-25 08:39:17 |
| 2022-02-25 08:40:17 |
| 2022-02-25 08:41:17 |
| 2022-02-25 08:42:17 |
| 2022-02-25 08:43:17 |
| 2022-02-25 08:43:51 |
+---------------------+
25 rows in set (0.005 sec)

And right after that select a cleanup:

# sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake passbolt action_logs_purge -r 30 -v" www-data

     ____                  __          ____  
    / __ \____  _____ ____/ /_  ____  / / /_ 
   / /_/ / __ `/ ___/ ___/ __ \/ __ \/ / __/ 
  / ____/ /_/ (__  |__  ) /_/ / /_/ / / /    
 /_/    \__,_/____/____/_.___/\____/_/\__/   

 Open source password manager for teams
-------------------------------------------------------------------------------
0 action logs entries were deleted.

What you expected to happen?

Older records to be deleted as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions