Nothing Special   »   [go: up one dir, main page]

Skip to content
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

scheduler.py never reaches the cleaner code #2318

Open
6 tasks done
ClaudioWayne opened this issue Sep 16, 2024 · 0 comments
Open
6 tasks done

scheduler.py never reaches the cleaner code #2318

ClaudioWayne opened this issue Sep 16, 2024 · 0 comments

Comments

@ClaudioWayne
Copy link
Contributor

About accounts on capesandbox.com

  • Issues isn't the way to ask for account activation. Ping capesandbox in Twitter with your username

This is open source and you are getting free support so be friendly!

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • I am running the latest version
  • I did read the README!
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I'm reporting the issue to the correct repository (for multi-repository projects)
  • I have read and checked all configs (with all optional parts)

Expected Behavior

Invoke cleanup if <= of free space detected

Current Behavior

I am trying to make use of the free-space-monitor and the new cleaner function that you can configure in cooko.conf.
It doesn't work properly for me, I think scheduler.py never reaches the cleaner code because the parameter return_value=True is passed when the method is called.

need_space, space_available = free_space_monitor(dir_path, return_value=True, analysis=True)

So cleaners_utils.py returns always before execute_cleanup()

    if return_value:
        return need_space, space_available

    if need_space:
        if not printed_error:
            log.error(
                "Not enough free disk space! (Only %d MB!). You can change limits it in cuckoo.conf -> freespace",
                space_available,
            )
            printed_error = True

        # Invoke cleaups here if enabled
        if config.cleaner.enabled:
            # prepare dict on startup
            execute_cleanup(cleanup_dict)

free_space_monitor is also used in process.py but without without return_value. So i tried to set freespace_processing = 50000 and freespace = 0 to skip the check in scheduler.py.

free_space_monitor(dir_path, processing=True)

But proccess.py checks cfg.cuckoo.freespace. I would expect a check for cfg.cuckoo.freespace_processing?!
if cfg.cuckoo.freespace:

Failure Information (for bugs)

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

Steps to Reproduce

configure cleaner and freespace/freespace_processing in cuckoo.conf

[cleaner]
# Invoke cleanup if <= of free space detected. see/set freespace/freespace_processing
enabled = yes
# set any value to 0 to disable it. In days
binaries_days = 30
tmp_days = 1
# Remove analysis folder
analysis_days = 30
# Delete mongo data
mongo = no
# Clean orphan files in mongodb
unused_files_in_mongodb = no

start cuckoo.py

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions. Operating system version, bitness, installed software versions, test sample details/hash/binary (if applicable).

Question Answer
Git commit ba39c0c
OS version Ubuntu 22.04, Windows 10 21H2

Failure Logs

Please include any relevant log snippets or files here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant