/tmp directory is being deleted
Bug #1974218 reported by
Nicholas Malacarne
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-backup-all |
Fix Released
|
Undecided
|
Garrett Neugent |
Bug Description
Hello,
The BootStack team recently ran into an issue with `juju-backup-all` on some of our clouds. In some instances, the entire `/tmp` directory is removed.
This may be due to cases where the `action_output` results are an empty string which would result in the deletion of the entire /tmp directory:
https:/
https:/
https:/
Thanks.
Related branches
~thogarre/juju-backup-all:bug-1974218
- Eric Chen: Approve
- Paul Goins: Approve
-
Diff: 12 lines (+1/-1)1 file modifiedjujubackupall/backup.py (+1/-1)
description: | updated |
tags: | added: bseng-124 |
Changed in juju-backup-all: | |
assignee: | nobody → Garrett Thompson (thogarre) |
Changed in juju-backup-all: | |
status: | New → In Progress |
Changed in juju-backup-all: | |
status: | In Progress → Fix Committed |
Changed in juju-backup-all: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
It looks like an old version of the snap is running where this is happening. This line looks to be the culprit line (note that it’s the parent, not the path to the file):
```python filepath. parent)
rm_command = "sudo rm -r {}".format(
```
This line has since been removed [0], but a new version the snap has not yet been built, so it hasn't been tested/rolled out anywhere yet.
In the current version of the file, the `-r` flag is still being provided, despite all the backups being individual gzip files. I've submitted MR 424592 [1] to address this.
Note that I've also updated the ownership of the snap, and created a snap recipe [2] so that new snaps will automatically be built and published to the latest/edge edge when the master branch of this repo is updated.
I'll mark this as pending review to reflect the current status.
[0] https:/ /git.launchpad. net/juju- backup- all/commit/ ?id=16c68c9cfe7 ce5f48313c79e4e 5a90a982ab2383 /code.launchpad .net/~thogarre/ juju-backup- all/+git/ juju-backup- all/+merge/ 424592 /launchpad. net/juju- backup- all/+snaps
[1] https:/
[2] https:/