Commit Graph

479 Commits

Author SHA1 Message Date
Maksym Pavlenko 08c563b51a Consolidate windows and linux CIs
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-23 23:03:10 +00:00
Maksym Pavlenko 84cc3d9f7b
[codecov] Suppress PR comments
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-22 12:14:10 -08:00
Maksym Pavlenko cc445f54c0 Use wget to download containerd archive
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-22 17:49:39 +00:00
Maksym Pavlenko af09869cee Patch invalid proto comments
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-22 17:49:39 +00:00
Maksym Pavlenko 1d819cc0c4 Suppress warnings for generated code
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-22 17:49:39 +00:00
Maksym Pavlenko b769e85b33 Update vendor
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-22 17:49:39 +00:00
Maksym Pavlenko 202c785059 Add update vendor script
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-22 17:49:39 +00:00
zhang yu 10307750 3a7b9ce173 feat: set THP_DISABLE=true in shim, and restore it before starting runc
If /sys/kernel/mm/transparent_hugepage/enabled=always, the shim process
will use huge pages, which will consume a lot of memory.

Just like this:
ps -efo pid,rss,comm | grep shim
    PID   RSS COMMAND
   2614  7464 containerd-shim

I don't think shim needs to use huge pages, and if we turn off the huge
pages option, we can save a lot of memory resources.

After we set THP_DISABLE=true:
ps -efo pid,comm,rss
    PID COMMAND           RSS
1629841 containerd-shim  5648

containerd
    |
    |--shim1   --start
        |
        |--shim2    (this shim will on host)
            |
            |--runc create (when containerd send create request by ttrpc)
                |
                |--runc init (this is the pid 1 in container)

    we should set thp_disabled=1 in shim1 --start, because if we set this
    in shim 2, the huge page has been setted while func main() running,
    we set thp_disabled cannot change the setted huge pages.
    So We need to set thp_disabled=1 in shim1 so that shim2 inherits the
    settings of the parent process shim1, and shim2 has closed the
    hugepage when it starts.

    For runc processes, we need to set thp_disabled='before' in shim2 after
    fork() and before execve(). So we use cmd.pre_exec to do this.
2024-02-20 02:43:24 +00:00
dependabot[bot] 1b2a74aa8a build(deps): update tonic requirement from 0.10 to 0.11
Updates the requirements on [tonic](https://github.com/hyperium/tonic) to permit the latest version.
- [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/tonic/compare/v0.10.0...v0.10.2)

---
updated-dependencies:
- dependency-name: tonic
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-15 21:02:42 +00:00
Maksym Pavlenko 9734a00462 Add job to finalize statuses
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-15 20:33:35 +00:00
Maksym Pavlenko 2d18a663a4 Add 2.0 beta 2 to CI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-15 20:33:35 +00:00
Maksym Pavlenko 2e58639737 Update containerd versions on CI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-15 20:33:35 +00:00
Maksym Pavlenko 49a4a832c6
Add coverage badge
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-15 12:39:37 -08:00
Maksym Pavlenko cffe94bf0b
Fix coverage CI job
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-15 10:09:07 -08:00
dependabot[bot] 2f0ffb98b5 build(deps): update tonic-build requirement from 0.10 to 0.11
Updates the requirements on [tonic-build](https://github.com/hyperium/tonic) to permit the latest version.
- [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/tonic/compare/v0.10.0...v0.10.2)

---
updated-dependencies:
- dependency-name: tonic-build
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 17:27:15 +00:00
BaiQiuLi 3d4de340d8 Fix the issue of process freezing when there is a large amount of sigpipe signals occurring during containerd process restart.
Signed-off-by: BaiQiuLi <bo.qiuli@zte.com.cn>
2024-02-02 16:31:59 +00:00
dependabot[bot] bca3554a52 build(deps): bump codecov/codecov-action from 3 to 4
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 23:45:23 +00:00
Maksym Pavlenko 566ccd336c Run coverage against main branch only
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-01-30 20:32:39 +00:00
Maksym Pavlenko dd07aefac5 Use codecov for tests coverage info
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-01-30 20:32:39 +00:00
Maksym Pavlenko 90e58b7b9f Fix labeler config
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-01-08 22:47:51 +00:00
jokemanfire 2236ba39d9 fmt modify 2024-01-03 19:59:52 +00:00
jokemanfire a9f1dcf777 fmt modify 2024-01-03 19:59:52 +00:00
jokemanfire 9675c9a4ab "Subsystem::Mem" add judge for the limit and swap
this error wiil ocurr
in  containerd's TestUpdateContainerResources_MemoryLimit
2024-01-03 19:59:52 +00:00
Andrew Baxter 9ac1f26516 `Runc::state()` returns wrong type with async feature
It's a very small change so I figured it's simpler to open a PR than an issue first.

The sync `state` method returns `Container` but for async returns `Vec<usize>`, and I couldn't locate an explanation for why these might be different so I assume it's a mistake.  From a user perspective too I want Container rather than a usize vec.

Signed-off-by: Andrew Baxter <i@isandrew.com>
2023-12-25 17:56:09 +00:00
dependabot[bot] 0b6ffc3b35 build(deps): bump actions/labeler from 4 to 5
Bumps [actions/labeler](https://github.com/actions/labeler) from 4 to 5.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-16 09:18:55 +00:00
dependabot[bot] d29d91b888 build(deps): bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-16 09:18:34 +00:00
dependabot[bot] 26e4cd56de build(deps): bump actions/github-script from 6 to 7
Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-15 22:02:51 +00:00
dependabot[bot] c43b1e4a41 build(deps): update windows-sys requirement from 0.48.0 to 0.52.0
Updates the requirements on [windows-sys](https://github.com/microsoft/windows-rs) to permit the latest version.
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/compare/0.48.0...0.52.0)

---
updated-dependencies:
- dependency-name: windows-sys
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-15 22:02:09 +00:00
dependabot[bot] db720f3608 build(deps): bump actions/setup-go from 4 to 5
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-15 22:01:32 +00:00
James Sturtevant 9e1c40d634 Bump to recent go version
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-12-15 09:50:10 +00:00
Maksym Pavlenko a003dac568 Fix publisher
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-30 13:32:54 -07:00
James Sturtevant fca511e235 Create v0.6.0 release of containerd-shim and shim-protos
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-10-30 18:05:57 +00:00
James Sturtevant 74a67025ad use process thread group id for the process
in cgroupv2 we should use the cgroups.proc file when adding a process (https://www.man7.org/linux/man-pages/man7/cgroups.7.html).  The add_tasks function was writing to the cgroup.threads file which is only avaliable when in threaded mode.  In either case our intent is to add the process not the individual threads to we should use add_task_by_tgid. See https://github.com/kata-containers/cgroups-rs/pull/104 for when this was added

Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-10-25 02:13:26 +00:00
James Sturtevant 11a6559c39 Updates cgroup rs to latest version
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-10-25 02:13:26 +00:00
Maksym Pavlenko b9a1e14721
Merge pull request #213 from mxpv/ttrpc
Update TTRPC
2023-10-23 09:30:05 -07:00
Maksym Pavlenko 0701d3602a
Update TTRPC
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-19 12:44:58 -07:00
James Sturtevant e31b3c634f fix up windows
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-10-11 20:13:32 +00:00
James Sturtevant f446bdb64d Add support for structured logging
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-10-11 20:13:32 +00:00
Maksym Pavlenko 7e7a969e45
Merge pull request #211 from mxpv/nix
Update nix crate to 0.27
2023-10-06 15:57:23 -07:00
Maksym Pavlenko e8ad07d5fd
Update nix crate
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-05 11:37:27 -07:00
Maksym Pavlenko a0e042a46e
Merge pull request #208 from mxpv/docs
Simplify doc management and update READMEs
2023-10-04 11:24:21 -07:00
Maksym Pavlenko 7b69bd68c2
Enable docs feature on CI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-04 10:11:42 -07:00
Maksym Pavlenko 85557745e0 Make examples compilable
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-03 20:41:38 -07:00
Maksym Pavlenko e9910f30b8 Simplify doc management
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-03 20:41:38 -07:00
James Sturtevant fd734b4e7a Use format similiar to containerd
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-10-04 03:40:46 +00:00
James Sturtevant 75d6deeac3 Retry when pipe is busy
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-10-04 03:36:08 +00:00
Maksym Pavlenko b86034092c
Merge pull request #209 from mxpv/ci
Temporarily disable a few more CI tests
2023-10-03 14:51:08 -07:00
Maksym Pavlenko 61f0db613e
Temporarily disable CI tests
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-03 09:56:34 -07:00
Maksym Pavlenko 1a181967b6
Merge pull request #181 from jsturtevant/remove-temp-ci-fix
Remove temporary work around and bump containerd versions
2023-09-27 12:21:34 -07:00
James Sturtevant ed4e5e1499 Remove temporary work around and bump containerd versions
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-09-26 22:08:06 +00:00