Skip to content

NC | Update config might result with deleted config file #8930

Open
@romayalon

Description

@romayalon

Environment info

  • NooBaa Version: 4.19
  • Platform: NC

Actual behavior

  1. While debugging notifications + lifecycle, in an old version of NC lifecycle we used update_config_file() and we saw that on some failure the buckets config files were deleted, therefore we checked the code and saw that
    it might be because of the next line -
await safe_unlink(fs_context, config_path, stat, undefined, tmp_dir_path); 

we need to evaluate this code more and fix this potential issue.

Expected behavior

  1. config files can not be deleted as a result of a failure of update_config_file()

Steps to reproduce

  1. it's probably can be reproducible artificially when throwing an error after the safe_unlink()

More information - Screenshots / Logs / Other output

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