containers / storage

Container Storage Library
Apache License 2.0
566 stars 243 forks source link

Use BTRFS transactional nature to keep Rootless user artifact storage consistent #1073

Open PavelSosin-320 opened 3 years ago

PavelSosin-320 commented 3 years ago

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind feature

Description

Use BTRFS snapshot of the rootless user Podman storage area consistent over any possible failure in the container creation.

To avoid situations like

https://github.com/containers/podman/issues/12264

Since BTRFS subvolumes are well protected from writing by non-owner it can improve security too.

Steps to reproduce the issue:

  1. Create snapshot at the beginning of Podman container create or Buldah from
  2. Discard snapshot after container commit or successful starting of the container
  3. Restore User's storage in the consistent state in the case of failure.

Describe the results you received:

Describe the results you expected: Something in the style of Use of btrfs snapshots Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

(paste your output here)

Output of podman info --debug:

(paste your output here)

Package info (e.g. output of rpm -q podman or apt list podman):

(paste your output here)

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)

No

Additional environment details (AWS, VirtualBox, physical, etc.):

The most popular Linux desktop distros Fedora,Ubuntu, Suse used by developers support btrfs filesystem. The known btrfs weaknesses doesn't affect developer's productivity like inconsistency issues. Backup and restore of running on laptops dev. environment to the external storage is rarely usable. Uploading compressed subvolume to the cloud storage takes seconds.

vrothberg commented 3 years ago

Probably something for containers/storage but we don't have BTRFS expertise in the team. Overlay has the best quality.

@rhatdan @giuseppe PTAL

rhatdan commented 3 years ago

Yup, definitely something that the upstream community would need to develop. I don't see the core team working on this.