Commit Graph

13124 Commits

Author SHA1 Message Date
Jin Dong
2aeac9a8f6 Remove duplicated writeIndex func
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-06-22 22:48:24 +00:00
Phil Estes
2353574aa9
Merge pull request #8708 from marquiz/devel/cri-cleanup
cri: drop unused arg from generateRuntimeOptions
2023-06-22 15:12:48 -04:00
Phil Estes
733070b96a
Merge pull request #8717 from djdongjin/dedup-manifest-platform
Dedup config platform helper
2023-06-22 15:12:22 -04:00
Jin Dong
7601dd9a9e Dedup manifest config platform helper
It also removes a duplicated digest validate call

Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-06-22 01:36:58 +00:00
Alex Couture-Beil
f3df7f7391
log when a lease expires
This makes it easier to debug GC-related issues, where a reference is
unexpectedly released.

Signed-off-by: Alex Couture-Beil <alex@mofo.ca>
2023-06-21 16:00:02 -07:00
Jin Dong
a01118bbed Minor changes to sandbox metadata
1. Reduce one bucket.Bucket call.
2. Use update helper instead of db.Update as in other functions.

Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-06-20 20:41:17 +00:00
Kazuyoshi Kato
ad9d1a82f1
Merge pull request #8701 from djdongjin/gc
Remove unnecessary label bucket loop
2023-06-20 11:20:20 -07:00
Markus Lehtonen
f60a4a2718 cri: drop unused arg from generateRuntimeOptions
Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2023-06-19 16:11:36 +03:00
Jin Dong
1fb835f042 Remove unnecessary label bucket loop
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-06-17 19:26:29 +00:00
Wei Fu
a207b430e3 snapshots/blockfile: fix lint issue
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-06-17 08:42:02 +08:00
Wei Fu
59b0b39af0 vendor: update github.com/containerd/continuity
Pin it with 1e0d26eb2381594984ee80989c9c229dbd930d9f

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-06-17 08:36:45 +08:00
Phil Estes
96de54db43
Merge pull request #8667 from djdongjin/premarshal-empty-resp
Save marshalled empty response in streaming service
2023-06-16 17:05:24 -04:00
Phil Estes
b8bd27a14e
Merge pull request #8697 from upodroid/fix-unbound-variable
Fix unbound variable used by Prow
2023-06-16 10:46:18 -04:00
upodroid
d358f1680f fix unbound variable
Signed-off-by: upodroid <cy@borg.dev>
2023-06-15 21:18:20 +01:00
Kay Yan
f4ad68d5f2 fix-push-image-rate
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2023-06-15 19:08:03 +00:00
Wei Fu
7de95cbc4c snapshots/blockfile: deflaky the testsuite
* Use direct-io mode to reduce IO.

* Add testViewHook helper to recovery the backing file since the ext4
  might need writable permission to handle recovery. If the backing file
  needs recovery and it's for View snapshot, the readonly mount will
  cause error.

* Use 8 MiB as capacity to reduce the IO.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-06-15 23:54:06 +08:00
Wei Fu
6dfb16f99a snapshots|pkg: umount without DETACH and nosync after umount
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-06-15 23:53:47 +08:00
Wei Fu
72b7d16505 mount: support direct-io for loopback device
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-06-15 23:51:46 +08:00
Kazuyoshi Kato
ded713010c
Merge pull request #8617 from corhere/reduce-exec-lock-contention
runtime/v2/runc: handle early exits w/o big locks
2023-06-14 15:55:07 -07:00
Derek McGowan
0ae64ebd4e
Merge pull request #8680 from dcantah/sb-metrics
Sandbox: Add SandboxMetrics rpc
2023-06-14 18:11:18 +00:00
Derek McGowan
70f30b2e09
Merge pull request #8692 from mxpv/merge-queues
Don't run CI on push
2023-06-14 18:11:04 +00:00
Maksym Pavlenko
437f134107 Don't run CI on push
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-06-14 11:04:07 -07:00
Jin Dong
e26c97cb8b Save marshalled empty response in streaming service
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-06-14 18:02:58 +00:00
Maksym Pavlenko
3065aa2aae
Merge pull request #8684 from djdongjin/nsmap-rwmutex
Use RWMutex in NSMap and reduce lock area
2023-06-14 17:52:39 +00:00
Jin Dong
9e09bfb590 Use RWMutex in NSMap and reduce lock area
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-06-14 17:50:54 +00:00
Derek McGowan
78b4af74a4
Merge pull request #8685 from estesp/no-nondistributable-layers
No more nondistributable layers in MS registry
2023-06-14 17:46:21 +00:00
Phil Estes
38b0f970f0
No more nondistributable layers in MS registry
Microsoft announced the removal of nondistributable layers from their
images today. This makes the convert test fail since it assumes the
first layer is nondistributable on Windows during the test.

Signed-off-by: Phil Estes <estesp@amazon.com>
2023-06-13 16:34:44 -04:00
Kazuyoshi Kato
0f6a70d970
Merge pull request #8676 from dmcgowan/overlay-options
[overlay] add configurable mount options to overlay snapshotter
2023-06-13 09:55:24 -07:00
Danny Canter
d278d37caa Sandbox: Add Metrics rpc for controller
As a follow up change to adding a SandboxMetrics rpc to the core
sandbox service, the controller needed a corresponding rpc for CRI
and others to eventually implement.

This leaves the CRI (non-shim mode) controller unimplemented just to
have a change with the API addition to start.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-06-13 00:24:09 -07:00
Derek McGowan
d115129d1e
Add configurable mount options to overlay
Allows default mount options to be provided through configuration.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-06-12 09:17:07 -07:00
Danny Canter
d56722ef2a Sandbox: Add SandboxMetrics rpc
To gather metrics/stats about a specific sandbox instance, it'd be nice to
have a dedicated rpc for this. Due to the same "what kind of stats are going
to be returned" dilemma exists for sandboxes as well, I've re-used the metrics
type we have as the data field is just an `any`, leaving the metrics returned
entirely up to the shim author. For CRI usecases this will just be cgroup and
windows stats as that's all that's supported right now.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-06-12 03:30:48 -07:00
Derek McGowan
dd5e9f6538
Merge pull request #7944 from adisky/new-pinned-image
CRI Pinned image support
2023-06-10 22:29:34 -07:00
Derek McGowan
98b7dfb870
Merge pull request #8673 from thaJeztah/no_any
avoid "any" as variable name
2023-06-10 20:44:30 -07:00
Kazuyoshi Kato
cf52175301
Merge pull request #8672 from thaJeztah/save_some_trees
replace some basic uses of fmt.Sprintf()
2023-06-10 17:46:03 -07:00
Sebastiaan van Stijn
4bb709c018
avoid "any" as variable name
Avoid shadowing / confusion with Go's "any" built-in type.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-10 13:49:06 +02:00
Sebastiaan van Stijn
577696f608
replace some basic uses of fmt.Sprintf()
Really tiny gains here, and doesn't significantly impact readability:

    BenchmarkSprintf
    BenchmarkSprintf-10    11528700     91.59 ns/op   32 B/op  1 allocs/op
    BenchmarkConcat
    BenchmarkConcat-10    100000000     11.76 ns/op    0 B/op  0 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-10 13:24:43 +02:00
Cory Snider
5cd6210ad0 runtime/v2/runc: handle early exits w/o big locks
eventSendMu is causing severe lock contention when multiple processes
start and exit concurrently. Replace it with a different scheme for
maintaining causality w.r.t. start and exit events for a process which
does not rely on big locks for synchronization.

Keep track of all processes for which a Task(Exec)Start event has been
published and have not yet exited in a map, keyed by their PID.
Processing exits then is as simple as looking up which process
corresponds to the PID. If there are no started processes known with
that PID, the PID must either belong to a process which was started by
s.Start() and before the s.Start() call has added the process to the map
of running processes, or a reparented process which we don't care about.
Handle the former case by having each s.Start() call subscribe to exit
events before starting the process. It checks if the PID has exited in
the time between it starting the process and publishing the TaskStart
event, handling the exit if it has. Exit events for reparented processes
received when no s.Start() calls are in flight are immediately
discarded, and events received during an s.Start() call are discarded
when the s.Start() call returns.

Co-authored-by: Laura Brehm <laurabrehm@hey.com>
Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-06-09 16:53:43 -04:00
Derek McGowan
ee2c8b79bf
Merge pull request #8664 from laurazard/timeout-integration-test-shim-oomscore
integration/client: add timeout to `TestShimOOMScore`
2023-06-09 11:49:48 -07:00
Laura Brehm
df280942a7
integration/client: add timeout to TestShimOOMScore
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-06-09 10:10:42 +01:00
Kazuyoshi Kato
326cd0623e
Merge pull request #8362 from gabriel-samfira/fix-non-c-volume
Fix non C volumes on Windows
2023-06-08 21:07:23 -07:00
Gabriel Adrian Samfira
6dd529e400
Pass in imagespec.Platform to WithVolumes()
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-08 12:31:04 +03:00
Derek McGowan
67349c1141
Merge pull request #8643 from laurazard/io-close-before-cancel
task: don't `close()` io before `cancel()`
2023-06-07 12:29:36 -07:00
Derek McGowan
b03103152a
Merge pull request #8652 from hangscer8/release_ticker_correctly
fix release `ticker` correctly in `HandleProgress`
2023-06-07 10:47:00 -07:00
Phil Estes
0a821b968c
Merge pull request #8633 from jsturtevant/fix-for-init-containers-windows-pod-stats
[CRI] Windows Pod Stats: Add a check to skip stats for containers that are not running.
2023-06-07 13:29:27 -04:00
Samuel Karp
d9ff3236bd
Merge pull request #8645 from cpuguy83/otlp_from_env 2023-06-07 02:05:23 -07:00
hang.jiang
d18026592f release ticker correctly
Signed-off-by: hang.jiang <hang.jiang@daocloud.io>
2023-06-07 11:45:38 +08:00
James Sturtevant
28a5199ff6
Add a check to skip stats for containers that are not running
When a container is just created, exited state the container will not have stats. A common case for this in k8s is the init containers for a pod. The will be present in the listed containers but will not have a running task and there for no stats.

Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-06-06 12:59:56 -07:00
Derek McGowan
87dbdd2ca1
Merge pull request #8572 from Jenkins-J/proto-docs
Document Protocol Buffer Setup
2023-06-06 10:36:34 -07:00
Laura Brehm
34a93a0c2c task: don't close() io before cancel()
The contract for `cio/io.go/IO` states that a call to `Close()`
will always be preceded by a call to `Cancel()` -
f3a07934b4/cio/io.go (L59)
which isn't being held up here.

Furthermore, the call to `Close()` here makes the subsequent `Wait()`
moot, and causes issues to consumers (see: https://github.com/moby/moby/issues/45689)

It seems from
f3a07934b4/task.go (L338)
that the `Close()` should be called there, the call removed in this
commit is unnecessary/erroneous.

We leave the `Close()` call on Windows only since this was introduced
in https://github.com/containerd/containerd/pull/5974 to address
https://github.com/containerd/containerd/issues/5621.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-06-06 11:03:35 +01:00
Akihiro Suda
1f54e8fb21
Merge pull request #8637 from AkihiroSuda/followup-8606
RELEASES.md: de-deprecation of CNI conf_template will be v1.7.3
2023-06-06 17:19:41 +09:00