Commit Graph

189 Commits

Author SHA1 Message Date
Kathryn Baldauf
f8992f451c add optional check that snapshotter supports the image platform when unpacking
Signed-off-by: Kathryn Baldauf <kabaldau@microsoft.com>
2020-12-10 10:54:22 -08:00
Maksym Pavlenko
da68609866 Fix devmapper test
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2020-12-09 09:35:17 -08:00
Maksym Pavlenko
2b87d4554f Add retries when deleting a devmapper device
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2020-12-09 09:13:34 -08:00
Michael Crosby
b9092fae15
Merge pull request #4643 from dcantah/feedback-lcow-snapshotter
Optimize Windows and LCOW snapshotters to only create scratch layer on the final snapshot
2020-12-01 10:38:02 -05:00
Daniel Canter
a91c298d1d Optimize Windows and LCOW snapshotters to only create scratch layer on the final snapshot
For LCOW currently we copy (or create) the scratch.vhdx for every single snapshot
so there ends up being a sandbox.vhdx in every directory seemingly unnecessarily. With the default scratch
size of 20GB the size on disk is about 17MB so there's a 17MB overhead per layer plus the time to copy the
file with every snapshot. Only the final sandbox.vhdx is actually used so this would be a nice little
optimization.

For WCOW we essentially do the exact same except copy the blank vhdx from the base layer.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2020-11-30 16:25:38 -08:00
Wei Fu
625da6b3e6
Merge pull request #4719 from estesp/fix-shm-relabel-test
Reenable make test targets in GH Actions CI
2020-11-23 13:11:32 +08:00
Phil Estes
85d9fe3e8c
Adjust overlay tests to expect "index=off"
When running tests on any modern distro, this assumption will work. If
we need to make it work with kernels where we don't append this option
it will require some more involved changes.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2020-11-19 10:59:40 -05:00
Phil Estes
027ee569a3
Import crypto for all snapshotters during testsuite
Fixes runtime panic for testing snapshotters

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2020-11-19 08:50:07 -05:00
Kazuyoshi Kato
bb8aac38a0 Do not hardcode "amd64" on LCOW and Windows-related files
Fixes #3281.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2020-11-09 13:39:07 -08:00
Daniel Canter
9a1f6ea4dc Cri - Pass snapshotter labels into customopts.WithNewSnapshot
Previously there wwasn't a way to pass any labels to snapshotters as the wrapper
around WithNewSnapshot didn't have a parm to pass them in.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2020-10-14 04:14:03 -07:00
Teemu Kallio
71fd68a920 devicemapper: seperate implementation pkg from plugin pkg
Signed-off-by: Teemu Kallio <teemu.kallio@pm.me>
2020-09-18 12:00:14 +02:00
Derek McGowan
d4e78200d6
Merge pull request #4518 from knight42/feat/btrfs-config-root-path
feat(snapshot::btrfs): config root_path
2020-09-03 11:12:27 -07:00
Jian Zeng
c50ff694f0
refactor(native): separate init from implementation
Part of #4513

Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>
2020-09-03 19:58:31 +08:00
Jian Zeng
98b0b2a7c6
feat: make native root_path configurable
Part of #4514

Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>
2020-09-03 19:58:05 +08:00
Jian Zeng
a52daa26ae
refactor(btrfs): separate init from implementation
Part of #4513

Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>
2020-09-03 19:54:18 +08:00
Jian Zeng
4154235735
feat: make btrfs root_path configurable
Part of #4514

Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>
2020-09-03 19:52:13 +08:00
Derek McGowan
70ffb12c1b
Separate overlay implementation from plugin
Put the overlay plugin in a separate package to allow the overlay package to be
used without needing to import and initialize the plugin.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-08-26 18:50:51 -07:00
Ashray Jain
5ed177a2da Add configurable overlayfs path
This allows configuring the location of the overlayfs snapshotter by
adding the following in config.toml
```
[plugins]
  [plugins.overlayfs]
    root_path = "/custom_location"
```

This is useful to isolate disk i/o for overlayfs from the rest of
containerd and prevent containers saturating disk i/o from negatively
affecting containerd operations and cause timeouts.

Signed-off-by: Ashray Jain <ashrayj@palantir.com>
2020-08-26 16:08:10 +01:00
Kazuyoshi Kato
a1f6c9dd88 snapshots/devmapper: fix rollback
The rollback mechanism is implemented by calling deleteDevice() and
RemoveDevice(). But RemoveDevice() is internally calling
deleteDevice() as well.

Since a device will be deleted by first deleteDevice(),
RemoveDevice() always will see ENODATA. The specific error must be
ignored to remove the device's metadata correctly.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2020-08-17 15:41:03 -07:00
Kazuyoshi Kato
74e9aa7abb snapshots/devmapper: don't hardcord the platform strings
The snapshotter doesn't have to exclude non-amd64 platforms.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2020-08-03 11:55:36 -07:00
Kazuyoshi Kato
c383436af7 snapshots/devmapper: suspend a device to avoid data corruption
According to https://github.com/torvalds/linux/blob/v5.7/Documentation/admin-guide/device-mapper/thin-provisioning.rst#internal-snapshots;

> If the origin device that you wish to snapshot is active, you
> must suspend it before creating the snapshot to avoid corruption.

However the devmapper snapshotter was not doing that.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2020-07-16 15:08:07 -07:00
Rudy Zhang
d36810d66d overlay: use index=off to fix EBUSY on mount
kernel version > 4.13rc1 support index=on feature, it will be failed
with EBUSY when trying to mount.

Related: https://github.com/moby/moby/pull/37993

Signed-off-by: Rudy Zhang <rudyflyzhang@gmail.com>
2020-06-08 15:51:15 +08:00
Sebastiaan van Stijn
dc92ad6520
Replace errors.Cause() with errors.Is()
Dependencies may be switching to use the new `%w` formatting
option to wrap errors; switching to use `errors.Is()` makes
sure that we are still able to unwrap the error and detect the
underlying cause.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-08 14:36:45 +02:00
Eric Ren
63b7587cd6 snapshots/devmapper: fix race windown causing IO hangup
The issue beblow happens several times beforing the root
cause found:

  1. A `fdisk -l` process has being hung up for a long time;
  2. A image layer snapshot device is visiable to dmsetup, which
       should *not* happen because it should be deactivated after
       `Commit()`;

The backtrace of `fdisk` is always the same over time:

```bash
[<ffffffff810bbc6a>] io_schedule+0x2a/0x80
[<ffffffff81295a3f>] do_blockdev_direct_IO+0x1e9f/0x2f10
[<ffffffff81296aea>] __blockdev_direct_IO+0x3a/0x40
[<ffffffff81290e43>] blkdev_direct_IO+0x43/0x50
[<ffffffff811b8a14>] generic_file_read_iter+0x374/0x960
[<ffffffff81291ad5>] blkdev_read_iter+0x35/0x40
[<ffffffff8125229b>] new_sync_read+0xfb/0x240
[<ffffffff81252406>] __vfs_read+0x26/0x40
[<ffffffff81252b96>] vfs_read+0x96/0x130
[<ffffffff812540e5>] SyS_read+0x55/0xc0
[<ffffffff81003c04>] do_syscall_64+0x74/0x180
```

The root cause is, in Commit(), there's a race window between
`SuspendDevice()` and `DeactivateDevice()`, which may cause the
IOs of a process or command like `fdisk` on the "suspended" device
hang up forever. It has twofold:

  1. The IOs suspends on the devices;
  2. The device is in `Suspended` state, because it's deactivated with
     `deferred` flag and without `force` flag;

So they cannot make progress.

One reproducer is:
 1. enlarge the race window by putting sleep seconds there;
 2. run `while true; do sudo fdisk -l; sleep 0.5; done` on one terminal;
 3. and pull image on another terminal;

Fixes it by:
 1. Resume the devices again after flushing IO by suspend;
 2. Remove device without `deferred` flag;

Fix: #4234
Signed-off-by: Eric Ren <renzhen@linux.alibaba.com>
2020-05-07 07:46:45 +08:00
Maksym Pavlenko
bd22653003 Add devmapper configuration examples
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2020-03-17 18:16:58 -07:00
Maksym Pavlenko
e2e40e19d7
Merge pull request #3924 from renzhengeek/renzhen/snapshot-gc
snapshots/devmapper: do not stop snapshot GC when one snapshot removing fails
2020-03-12 19:28:55 -07:00
Maksym Pavlenko
8cddb5f91d Pass snapshotter opts during Pull
For remote snapshotter cases it's quite often there is need to pass extra info
from client (for instance - registry URL to query remote layer from, credentials, etc).

This commit slightly extends WithPullSnapshotter to pass extra labels to a snapshotter.

Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2020-03-02 13:45:40 -08:00
Eric Ren
a3685262fe snapshots/devmapper: do not stop snapshot GC when one snapshot removing fails
Snapshots GC takes use of pruneBranch() function to remove snapshots,
but GC will stop if snapshotter.Remove() returns error and the error
number is not ErrFailedPrecondition. This results in thousands of
dm snapshots not deleted if one snapshot is not deleted, due to
errors like "contains a filesystem in use".

So return ErrFailedPrecondition error number in Remove() function where
appropriate, and let GC process go on collecting other snapshots.

Fix: #3923
Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
Signed-off-by: Eric Ren <renzhen.rz@linux.alibaba.com>
2020-02-29 13:32:48 +08:00
Eric Ren
b6bf7b97c2 devmapper: async remove device using Cleanup
Fix: #3923
Signed-off-by: Eric Ren <renzhen@linux.alibaba.com>
2020-02-29 13:32:48 +08:00
Sebastiaan van Stijn
f2edc6f164
vendor: update gotest.tools v3.0.2
full diff: https://github.com/gotestyourself/gotest.tools/compare/v2.3.0...v3.0.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-28 17:47:20 +01:00
Maksym Pavlenko
f5d8ff57c8
Merge pull request #3965 from jterry75/wcow_lcow_scratch_size
Add support for custom wcow and lcow sandbox scratch sizes
2020-01-30 22:34:35 -08:00
Maksym Pavlenko
f0652e1434 Make tests less flaky
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2020-01-30 09:57:34 -08:00
Justin Terry (VM)
bb8af922bb Add support for custom wcow and lcow sandbox scratch sizes
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2020-01-30 07:27:06 -08:00
Shengjing Zhu
1189cc40f2 snapshots: fix flaky TestMetastore
35a8e6e589/check/containerd-build-arm64/de237af/logs/make_test.txt

--- FAIL: TestMetastore (18.27s)
    --- FAIL: TestMetastore/GetInfo (13.91s)
        metastore_test.go:242: assertion failed:
            --- expected
            +++ info
            {snapshots.Info}.Created:
            	-: s"0001-01-01 00:00:00 +0000 UTC"
            	+: s"2020-01-15 14:15:38.71882571 +0000 UTC"
            {snapshots.Info}.Updated:
            	-: s"0001-01-01 00:00:00 +0000 UTC"
            	+: s"2020-01-15 14:15:38.71882571 +0000 UTC"
            : on key committed-1

Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2020-01-15 23:12:05 +08:00
Justin Terry (VM)
cd1cad9d55 Support disk usage in windows-lcow snapshot
Windows snapshot usage was completed in ref: #3785 but lcow didnt get updated.

Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2020-01-08 13:43:48 -08:00
Phil Estes
80d50a8a63
Merge pull request #3925 from dmcgowan/snapshot-cleanup-api
Add Cleanup to snapshot API
2020-01-08 10:03:18 -05:00
Derek McGowan
123af61c0b
Add Cleanup to snapshot API
Cleanup is an optional method a snapshotter may implement.
Cleanup can be used to cleanup resources after a snapshot
has been removed. This function allows a snapshotter to defer
longer resource cleanup until after snapshot removals are
completed. Adding this to the API allows proxy snapshotters
to leverage this enhancement.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2020-01-07 14:59:20 -08:00
Akihiro Suda
a4b423b19b overlay: test actual Opts
AsynchronousRemove opt was untested while it is specified by default in the plugin init.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-01-07 13:52:13 +09:00
ktock
493a36de95 Move label filter to snapshots package
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2019-12-25 12:13:08 +09:00
Maksym Pavlenko
75efbaf678 Attempt to make device mapper snapshotter tests less flaky
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-12-13 13:20:23 -08:00
Derek McGowan
d1261b5087
Update snapshot parent filter property to always exist
The parent property may be empty but always exists.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-11-25 10:07:25 -08:00
Eric Ernst
731e144a48 devmapper: update example base image size in README
base_image_size effectively is the limit of a layer size that can be
created using the devmapper snapshotter. While this will also depend on
the thinpool size itself, something closer to the total image size
(80%?) is more appropriate.

As is, if you try to run an image like elastic, you'll need a much
larger base_image_size than 128MB.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-11-20 12:26:16 -08:00
Derek McGowan
a176179a08
Merge pull request #3785 from Random-Liu/support-disk-usage-windows
Support disk usage in windows snapshot.
2019-11-12 14:40:38 -08:00
Wei Fu
843423ec38 snapshots: return error if readSnapshot fails
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2019-11-11 17:53:44 +08:00
Lantao Liu
8f9eff4fec Support disk usage in windows snapshot.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-11-01 00:12:10 -07:00
Derek McGowan
66aa1d3ef6
Add snapshot walk implementations
Temporarily remove zfs and aufs until interface update

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-10-24 11:11:22 -07:00
bpopovschi
e8c14c07c6
Added filters to snapshots API
Signed-off-by: bpopovschi <zyqsempai@mail.ru>
2019-10-24 11:11:22 -07:00
Akihiro Suda
d52cbc19be snapshots/native: ignore xattr errors during CopyDir
`secuity.*` xattrs cannot be copied in most cases

For moby/buildkit#1189

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2019-10-13 01:53:35 +09:00
Derek McGowan
772032598a
Fix flaky btrfs test
Add logging and move the creation of the snapshotter inside
the attempt loop to catch cases where the mountinfo may
not be updated yet. When all attempts are reached there
is no reason to create the snapshotter as the unmount has
already occurred.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-10-04 17:51:45 -07:00
Michael Crosby
c5821baa41 Sync and stat btrfs loopback in tests
Fixes #3676

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-09-25 15:40:16 -04:00
renzhen.rz
4d11bb36ad devmapper: activate dm device if snap device marked as activated
- reproducer
 1. stop a container;
 2. reboot, or dmsetup remove its corresponding dm device;
 3. start the container, it will fail like:

 """
 Error: failed to start containers: {"message":"failed to create container(4f33d2760760c41518a84821153ccdf7f80980b797b783cdd75178fc6ca0bf4b) on containerd: failed to create task for container(4f33d2760760c41518a84821153ccdf7f80980b797b783cdd75178fc6ca0bf4b): failed to mount rootfs component &{ext4 /dev/mapper/vg0-mythinpool-snap-2 []}: no such file or directory: unknown"}
 """
- how the fix works
 activate the dm device if necessary, and give a warn msg:

 """
 time="2019-08-21T22:44:08.422695797+08:00" level=warning msg="devmapper device \"vg0-mythinpool-snap-2\" marked as \"Activated\" but not active, activating it"
 """

Signed-off-by: Eric Ren <renzhen@linux.alibaba.com>
2019-08-23 10:19:28 +08:00
Derek McGowan
5a0ff41c81
Update continuity vendor
Pulls in copy and fstest changes

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-08-16 15:49:47 -07:00
Maksym Pavlenko
0a4bf1bd1e Mark faulty devices
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-08-05 12:05:36 -07:00
Maksym Pavlenko
3741fd8591 Remove deferred flag when removing devmapper device
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-07-31 11:28:33 -07:00
Maksym Pavlenko
4d5a0e19eb Mark faulty device in one transaction
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-07-30 16:26:55 -07:00
Maksym Pavlenko
878a3205cd Better error recovery in devmapper
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-07-30 15:17:17 -07:00
Derek McGowan
63ceaf877d
Add testing log context
Enables showing debug logs in testing output.
For integration tests the client log output will show
in addition to daemon output, with timestamps for better
correlation.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-07-16 10:31:43 -07:00
Eric Hotinger
9fda4a5fe6 Bumps the version of go-winio.
This also refactors the lcow and windows
snapshotters to use go-winio's utility functions for checking the
filesystem type.

Signed-off-by: Eric Hotinger <ehotinger@gmail.com>
2019-07-01 14:51:06 -07:00
Eric Hotinger
75f183887a Allow opts to flow to the backend snapshotter during snapshot creation.
Signed-off-by: Eric Hotinger <ehotinger@gmail.com>
2019-06-19 11:00:22 -07:00
Eric Ren
6f463d3505 test/snapshots: umount before committing snapshot
For block device like devicemapper, umount before committing
active snapshot can sync data onto disk. Otherewise:

1. deactivating a block device in use will fail or IO error
when forced;
2. new snapshot on it will not catch the data not laid on disk yet.

Signed-off-by: Eric Ren <renzhen.rz@alibaba-linux.com>
2019-05-09 12:27:05 +08:00
renzhen.rz
3887053177 snapshots/devmapper: deactivate thin device after committed
1. reason to deactivate committed snapshot

The thin device will not be used for IO after committed,
and further thin snapshotting is OK using an inactive thin
device as origin. The benefits to deactivate are:
 - device is not unneccesary visible avoiding any unexpected IO;
 - save useless kernel data structs for maintaining active dm.

 Quote from kernel doc (Documentation/device-mapper/provisioning.txt):

"
  ii) Using an internal snapshot.

  Once created, the user doesn't have to worry about any connection
  between the origin and the snapshot.  Indeed the snapshot is no
  different from any other thinly-provisioned device and can be
  snapshotted itself via the same method.  It's perfectly legal to
  have only one of them active, and there's no ordering requirement on
  activating or removing them both.  (This differs from conventional
  device-mapper snapshots.)
"

2. an thinpool metadata bug is naturally removed

An problem happens when failed to suspend/resume origin thin device
when creating snapshot:

"failed to create snapshot device from parent vg0-mythinpool-snap-3"
error="failed to save initial metadata for snapshot "vg0-mythinpool-snap-19":
object already exists"

This issue occurs because when failed to create snapshot, the
snapshotter.store can be rollbacked, but the thin pool metadata
boltdb failed to rollback in PoolDevice.CreateSnapshotDevice(),
therefore metadata becomes inconsistent: the snapshotID is not
taken in snapshotter.store, but saved in pool metadata boltdb.

The cause is, in PoolDevice.CreateSnapshotDevice(), the defer calls
are invoked on "first-in-last-out" order. When the error happens
on the "resume device" defer call, the metadata is saved and
snapshot is created, which has no chance to be rollbacked.

Signed-off-by: Eric Ren <renzhen@linux.alibaba.com>
2019-05-09 10:58:21 +08:00
Derek McGowan
c10eb8d122
Merge pull request #3256 from dvrkps/redundant
Remove redundant error checks
2019-05-03 16:23:40 -07:00
Davor Kapsa
cfc36388b3 Remove redundant error checks
Signed-off-by: Davor Kapsa <davor.kapsa@gmail.com>
2019-04-30 21:28:51 +02:00
Davor Kapsa
eded188f4f Fix misspells
Signed-off-by: Davor Kapsa <davor.kapsa@gmail.com>
2019-04-30 20:38:24 +02:00
Maksym Pavlenko
90085a7ac5 Add empty file to prevent build from failing
Go build fails on directory with only test files
https://github.com/golang/go/issues/8279

Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-04-02 17:35:19 -07:00
Maksym Pavlenko
8784eb6308 Move snapshotters benchmark to a separate package
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-04-02 14:42:21 -07:00
Maksym Pavlenko
d9526f5c4f Move CloudFormation template to contrib
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-04-01 13:34:48 -07:00
Maksym Pavlenko
515be73c82 Add snapshotters benchmark
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-04-01 11:13:27 -07:00
Michael Crosby
e7b6fea572
Merge pull request #3022 from mxpv/devmapper
Integrate device mapper snapshotter
2019-03-29 00:06:11 -04:00
Maksym Pavlenko
87289a0c62 devmapper: implement Usage
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2019-03-27 14:50:12 -07:00
Maksym Pavlenko
010b4da36f devmapper: implement dmsetup status
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2019-03-27 14:26:07 -07:00
Eric Hotinger
e13a4b67e8 Update the snapshotter docs to refer to the snapshots package for
WithLabels.

Signed-off-by: Eric Hotinger <ehotinger@gmail.com>
2019-02-28 15:03:37 -08:00
Maksym Pavlenko
208957ba3c
devmapper: proper cleanup in pool device test
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-02-22 12:51:27 -08:00
Maksym Pavlenko
734989c2a0
Update README
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-02-22 11:10:51 -08:00
Maksym Pavlenko
95f0a4903c
devmapper: rollback thin devices on error
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-02-21 17:40:10 -08:00
Maksym Pavlenko
adf5c640f4
devmapper: don't create or reload thin-pool from snapshotter
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-02-21 16:26:46 -08:00
Maksym Pavlenko
7efda48c53
devmapper: more precise way of checking if device is activated
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-02-21 16:26:46 -08:00
Maksym Pavlenko
37cdedc61c
devmapper: add linux tags, fix build
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-02-21 16:26:46 -08:00
Maksym Pavlenko
0c6d194cce
devmapper: add README and minor fixes
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-02-21 16:25:55 -08:00
Maksym Pavlenko
2218275ec9
devmapper: register plugin
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-02-21 16:25:55 -08:00
Maksym Pavlenko
cec72efc2a
devmapper: add snapshotter
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-02-21 16:25:55 -08:00
Maksym Pavlenko
3a75882520
devmapper: add pool device manager
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-02-21 16:25:55 -08:00
Maksym Pavlenko
6e0ae68e17
devmapper: add snapshotter config
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-02-21 16:25:55 -08:00
Maksym Pavlenko
fcd9dc2749
devmapper: add pool metadata
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-02-21 16:25:55 -08:00
Maksym Pavlenko
809e5fd3b8
devmapper: add dmsetup
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-02-21 16:25:55 -08:00
Maksym Pavlenko
fe05e4d1a9
devmapper: add losetup
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-02-21 16:25:55 -08:00
Oliver Stenbom
7f5d7ff6b8 Update snapshots docs with garbage collector label
Signed-off-by: Oliver Stenbom <oliver@stenbom.eu>
2019-01-29 15:37:56 +00:00
Ace-Tang
7faaa64cf9 fix: miss remove temp file in createSnapshot
```
func foo() error {

defer func() {
    if err != nil {
	...
    }
}()
...
}
```
use defer func to do something when err not nil, if foo() not use
named error, `err != nil` can not catch all errors, since when err
re-defined in if condition, it is a new variable.

Signed-off-by: Ace-Tang <aceapril@126.com>
2018-12-24 23:01:56 +08:00
zhangyue
7b1e6f323a fix: use func args instead of build new one
Signed-off-by: zhangyue <zy675793960@yeah.net>
2018-12-16 15:07:12 +08:00
Michael Crosby
16aaf6c065 Change unsupported snapshot warnings to INFO
Since there is no real action the user can do, these can safely be
informative that the underlying filesystem does not support a snapshot
plugin at boot.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2018-10-26 12:44:14 -04:00
Justin Terry (VM)
3f1d9b2c4f Revendor github.com/Microsoft/hcsshim
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2018-10-15 13:38:24 -07:00
Justin Terry (VM)
00242e1668 Dismount sandbox VHD on snapshot remove
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2018-10-10 13:35:06 -07:00
Akihiro Suda
5349fa31df remove pkg/testutil/loopback_linux.go and use continuity/testutil/loopback
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-10-02 13:12:25 +09:00
Justin Terry (VM)
e373126bfb Fix race in lcow snapshot scratch.vhdx creation
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2018-09-25 09:35:46 -07:00
Justin Terry (VM)
7768ab1b5e Update runhcs-shim to use go-bindings
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2018-09-20 10:40:33 -07:00
John Howard
2586f3fbb9 boltdb/bolt --> go.etcd.io/bbolt
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-09-12 15:23:57 -07:00
Xiaodong Zhang
e6d787172c Fix some typo in runtime and snapshots
Signed-off-by: Xiaodong Zhang <a4012017@sina.com>
2018-09-08 08:31:42 +08:00
Michael Wan
92243ff72a bugfix: updatedAt timestamp file may be empty
Signed-off-by: Michael Wan <zirenwan@gmail.com>
2018-08-29 21:49:40 -04:00
Justin Terry (VM)
0110b3c0bc Introduce the Windows lcow diff/snaphotter
Implements the Windows lcow differ/snapshotter responsible for managing
the creation and lifetime of lcow containers on Windows.

Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2018-08-28 13:51:04 -07:00
Wei Fu
67b54c6670 Support >= 128 layers in overlayfs snapshots
Auto-detect longest common dir in lowerdir option and compact it if the
option size is hitting one page size. If does, Use chdir + CLONE to do
mount thing to avoid hitting one page argument buffer in linux kernel
mount.

Signed-off-by: Wei Fu <fhfuwei@163.com>
2018-08-07 10:59:36 +08:00