diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index e732a2932..fb2f3f628 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -182,3 +182,27 @@ jobs: run: chmod +x ./youki - name: Run tests run: just test-rootless-podman + + docker-in-docker: + runs-on: ${{ matrix.os }} + needs: [youki-build] + timeout-minutes: 5 + strategy: + matrix: + # ubuntu 20.04 has cgroups-v1 + # ubuntu 22.04 has cgroups-v2 + os: [ "ubuntu-22.04", "ubuntu-20.04" ] + steps: + - uses: actions/checkout@v3 + - name: Install just + uses: taiki-e/install-action@just + - name: Download youki binary + uses: actions/download-artifact@v3 + with: + name: youki-x86_64-musl + - name: Add the permission to run + run: chmod +x ./youki + - name: Run tests + run: just test-dind + + diff --git a/Cargo.lock b/Cargo.lock index bfedb0064..4109eaa57 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "addr2line" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" -dependencies = [ - "gimli 0.27.3", -] - [[package]] name = "addr2line" version = "0.21.0" @@ -81,9 +72,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.8" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628a8f9bd1e24b4e0db2b4bc2d000b001e7dd032d54afa60a68836aeec5aa54a" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", @@ -189,12 +180,12 @@ version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "addr2line 0.21.0", + "addr2line", "cc", "cfg-if", "libc", "miniz_oxide", - "object 0.32.2", + "object", "rustc-demangle", ] @@ -317,38 +308,50 @@ dependencies = [ [[package]] name = "cap-fs-ext" -version = "1.0.15" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc48200a1a0fa6fba138b1802ad7def18ec1cdd92f7b2a04e21f1bd887f7b9" +checksum = "88e341d15ac1029aadce600be764a1a1edafe40e03cde23285bc1d261b3a4866" dependencies = [ "cap-primitives", "cap-std", - "io-lifetimes 1.0.11", - "windows-sys 0.48.0", + "io-lifetimes", + "windows-sys 0.52.0", +] + +[[package]] +name = "cap-net-ext" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "434168fe6533055f0f4204039abe3ff6d7db338ef46872a5fa39e9d5ad5ab7a9" +dependencies = [ + "cap-primitives", + "cap-std", + "rustix", + "smallvec", ] [[package]] name = "cap-primitives" -version = "1.0.15" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b6df5b295dca8d56f35560be8c391d59f0420f72e546997154e24e765e6451" +checksum = "fe16767ed8eee6d3f1f00d6a7576b81c226ab917eb54b96e5f77a5216ef67abb" dependencies = [ "ambient-authority", "fs-set-times", "io-extras", - "io-lifetimes 1.0.11", + "io-lifetimes", "ipnet", "maybe-owned", - "rustix 0.37.27", - "windows-sys 0.48.0", - "winx 0.35.1", + "rustix", + "windows-sys 0.52.0", + "winx", ] [[package]] name = "cap-rand" -version = "1.0.15" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d25555efacb0b5244cf1d35833d55d21abc916fff0eaad254b8e2453ea9b8ab" +checksum = "20e5695565f0cd7106bc3c7170323597540e772bb73e0be2cd2c662a0f8fa4ca" dependencies = [ "ambient-authority", "rand", @@ -356,26 +359,28 @@ dependencies = [ [[package]] name = "cap-std" -version = "1.0.15" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3373a62accd150b4fcba056d4c5f3b552127f0ec86d3c8c102d60b978174a012" +checksum = "593db20e4c51f62d3284bae7ee718849c3214f93a3b94ea1899ad85ba119d330" dependencies = [ "cap-primitives", "io-extras", - "io-lifetimes 1.0.11", - "rustix 0.37.27", + "io-lifetimes", + "rustix", ] [[package]] name = "cap-time-ext" -version = "1.0.15" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e95002993b7baee6b66c8950470e59e5226a23b3af39fc59c47fe416dd39821a" +checksum = "03261630f291f425430a36f38c847828265bc928f517cdd2004c56f4b02f002b" dependencies = [ + "ambient-authority", "cap-primitives", + "iana-time-zone", "once_cell", - "rustix 0.37.27", - "winx 0.35.1", + "rustix", + "winx", ] [[package]] @@ -439,9 +444,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.17" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80932e03c33999b9235edb8655bc9df3204adc9887c2f95b50cb1deb9fd54253" +checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" dependencies = [ "clap_builder", "clap_derive", @@ -449,9 +454,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.17" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c0db58c659eef1c73e444d298c27322a1b52f6927d2ad470c0c0f96fa7b8fa" +checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" dependencies = [ "anstream", "anstyle", @@ -461,9 +466,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.4.7" +version = "4.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb0d4825b75ff281318c393e8e1b80c4da9fb75a6b1d98547d389d6fe1f48d2" +checksum = "eaf7dcb7c21d8ca1a2482ee0f1d341f437c9a7af6ca6da359dc5e1b164e98215" dependencies = [ "clap", ] @@ -611,11 +616,11 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aae6f552c4c0ccfb30b9559b77bc985a387d998e1736cbbe6b14c903f3656cf" +checksum = "7c22542c0b95bd3302f7ed6839869c561f2324bac2fd5e7e99f5cfa65fdc8b92" dependencies = [ - "cranelift-entity 0.97.2", + "cranelift-entity 0.103.0", ] [[package]] @@ -641,19 +646,19 @@ dependencies = [ [[package]] name = "cranelift-codegen" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95551de96900cefae691ce895ff2abc691ae3a0b97911a76b45faf99e432937b" +checksum = "6b3db903ef2e9c8a4de2ea6db5db052c7857282952f9df604aa55d169e6000d8" dependencies = [ "bumpalo", - "cranelift-bforest 0.97.2", - "cranelift-codegen-meta 0.97.2", - "cranelift-codegen-shared 0.97.2", + "cranelift-bforest 0.103.0", + "cranelift-codegen-meta 0.103.0", + "cranelift-codegen-shared 0.103.0", "cranelift-control", - "cranelift-entity 0.97.2", - "cranelift-isle 0.97.2", - "gimli 0.27.3", - "hashbrown 0.13.2", + "cranelift-entity 0.103.0", + "cranelift-isle 0.103.0", + "gimli 0.28.1", + "hashbrown 0.14.3", "log", "regalloc2 0.9.3", "smallvec", @@ -671,11 +676,11 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36a3ad7b2bb03de3383f258b00ca29d80234bebd5130cb6ef3bae37ada5baab0" +checksum = "6590feb5a1d6438f974bf6a5ac4dddf69fca14e1f07f3265d880f69e61a94463" dependencies = [ - "cranelift-codegen-shared 0.97.2", + "cranelift-codegen-shared 0.103.0", ] [[package]] @@ -686,15 +691,15 @@ checksum = "278e52e29c53fcf32431ef08406c295699a70306d05a0715c5b1bf50e33a9ab7" [[package]] name = "cranelift-codegen-shared" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915918fee4142c85fb04bafe0bcd697e2fd6c15a260301ea6f8d2ea332a30e86" +checksum = "7239038c56fafe77fddc8788fc8533dd6c474dc5bdc5637216404f41ba807330" [[package]] name = "cranelift-control" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e447d548cd7f4fcb87fbd10edbd66a4f77966d17785ed50a08c8f3835483c8" +checksum = "f7dc9c595341404d381d27a3d950160856b35b402275f0c3990cd1ad683c8053" dependencies = [ "arbitrary", ] @@ -721,11 +726,12 @@ checksum = "9a59bcbca89c3f1b70b93ab3cbba5e5e0cbf3e63dadb23c7525cb142e21a9d4c" [[package]] name = "cranelift-entity" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d8ab3352a1e5966968d7ab424bd3de8e6b58314760745c3817c2eec3fa2f918" +checksum = "44e3ee532fc4776c69bcedf7e62f9632cbb3f35776fa9a525cdade3195baa3f7" dependencies = [ "serde", + "serde_derive", ] [[package]] @@ -742,11 +748,11 @@ dependencies = [ [[package]] name = "cranelift-frontend" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bffa38431f7554aa1594f122263b87c9e04abc55c9f42b81d37342ac44f79f0" +checksum = "a612c94d09e653662ec37681dc2d6fd2b9856e6df7147be0afc9aabb0abf19df" dependencies = [ - "cranelift-codegen 0.97.2", + "cranelift-codegen 0.103.0", "log", "smallvec", "target-lexicon", @@ -760,34 +766,34 @@ checksum = "393bc73c451830ff8dbb3a07f61843d6cb41a084f9996319917c0b291ed785bb" [[package]] name = "cranelift-isle" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84cef66a71c77938148b72bf006892c89d6be9274a08f7e669ff15a56145d701" +checksum = "85db9830abeb1170b7d29b536ffd55af1d4d26ac8a77570b5d1aca003bf225cc" [[package]] name = "cranelift-native" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f33c7e5eb446e162d2d10b17fe68e1f091020cc2e4e38b5501c21099600b0a1b" +checksum = "301ef0edafeaeda5771a5d2db64ac53e1818ae3111220a185677025fe91db4a1" dependencies = [ - "cranelift-codegen 0.97.2", + "cranelift-codegen 0.103.0", "libc", "target-lexicon", ] [[package]] name = "cranelift-wasm" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f7b64fa6a8c5b980eb6a17ef22089e15cb9f779f1ed3bd3072beab0686c09" +checksum = "380f0abe8264e4570ac615fc31cef32a3b90a77f7eb97b08331f9dd357b1f500" dependencies = [ - "cranelift-codegen 0.97.2", - "cranelift-entity 0.97.2", - "cranelift-frontend 0.97.2", + "cranelift-codegen 0.103.0", + "cranelift-entity 0.103.0", + "cranelift-frontend 0.103.0", "itertools", "log", "smallvec", - "wasmparser 0.107.0", + "wasmparser 0.118.1", "wasmtime-types", ] @@ -1145,9 +1151,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -1178,6 +1184,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + [[package]] name = "fastrand" version = "2.0.1" @@ -1191,20 +1203,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e5768da2206272c81ef0b5e951a41862938a6070da63bcea197899942d3b947" dependencies = [ "cfg-if", - "rustix 0.38.30", + "rustix", "windows-sys 0.52.0", ] -[[package]] -name = "file-per-thread-logger" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a3cc21c33af89af0930c8cae4ade5e6fdc17b5d2c97b3d2e2edb67a1cf683f3" -dependencies = [ - "env_logger 0.10.1", - "log", -] - [[package]] name = "filetime" version = "0.2.23" @@ -1271,13 +1273,13 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "fs-set-times" -version = "0.19.2" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d167b646a876ba8fda6b50ac645cfd96242553cbaf0ca4fccaa39afcbf0801f" +checksum = "033b337d725b97690d86893f9de22b67b80dcc4e9ad815f348254c38119db8fb" dependencies = [ - "io-lifetimes 1.0.11", - "rustix 0.38.30", - "windows-sys 0.48.0", + "io-lifetimes", + "rustix", + "windows-sys 0.52.0", ] [[package]] @@ -1445,28 +1447,22 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ - "fallible-iterator", + "fallible-iterator 0.2.0", "indexmap 1.9.3", "stable_deref_trait", ] [[package]] name = "gimli" -version = "0.27.3" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" dependencies = [ - "fallible-iterator", - "indexmap 1.9.3", + "fallible-iterator 0.3.0", + "indexmap 2.1.0", "stable_deref_trait", ] -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - [[package]] name = "glob" version = "0.3.1" @@ -1475,9 +1471,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b553656127a00601c8ae5590fcfdc118e4083a7924b6cf4ffc1ea4b99dc429d7" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -1530,6 +1526,9 @@ name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash 0.8.7", +] [[package]] name = "heapless" @@ -1561,9 +1560,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" [[package]] name = "hex" @@ -1740,23 +1739,12 @@ dependencies = [ [[package]] name = "io-extras" -version = "0.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fde93d48f0d9277f977a333eca8313695ddd5301dc96f7e02aeddcb0dd99096f" -dependencies = [ - "io-lifetimes 1.0.11", - "windows-sys 0.48.0", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +checksum = "c301e73fb90e8a29e600a9f402d095765f74310d582916a952f618836a1bd1ed" dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.48.0", + "io-lifetimes", + "windows-sys 0.52.0", ] [[package]] @@ -1787,7 +1775,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" dependencies = [ "hermit-abi", - "rustix 0.38.30", + "rustix", "windows-sys 0.52.0", ] @@ -1808,9 +1796,9 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "ittapi" -version = "0.3.5" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a5c0b993601cad796222ea076565c5d9f337d35592f8622c753724f06d7271" +checksum = "6b996fe614c41395cdaedf3cf408a9534851090959d90d54a535f675550b64b1" dependencies = [ "anyhow", "ittapi-sys", @@ -1819,9 +1807,9 @@ dependencies = [ [[package]] name = "ittapi-sys" -version = "0.3.5" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7b5e473765060536a660eed127f758cf1a810c73e49063264959c60d1727d9" +checksum = "52f5385394064fa2c886205dba02598013ce83d3e92d33dbdc0c52fe0e7bf4fc" dependencies = [ "cc", ] @@ -1895,7 +1883,7 @@ version = "0.3.1" dependencies = [ "anyhow", "clap", - "env_logger 0.10.1", + "env_logger 0.10.2", "errno", "fixedbitset", "libbpf-sys", @@ -1927,6 +1915,7 @@ dependencies = [ "libc", "libcgroups", "libseccomp", + "nc", "nix 0.27.1", "oci-spec", "once_cell", @@ -2009,15 +1998,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" @@ -2071,7 +2054,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.30", + "rustix", ] [[package]] @@ -2202,6 +2185,15 @@ dependencies = [ "tempfile", ] +[[package]] +name = "nc" +version = "0.8.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83c88ca23498aaa86177921d95ade67290248f9ef71f7416dc47d07cdc3c72a1" +dependencies = [ + "cc", +] + [[package]] name = "nix" version = "0.26.4" @@ -2313,24 +2305,15 @@ dependencies = [ "libc", ] -[[package]] -name = "object" -version = "0.30.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" -dependencies = [ - "crc32fast", - "hashbrown 0.13.2", - "indexmap 1.9.3", - "memchr", -] - [[package]] name = "object" version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ + "crc32fast", + "hashbrown 0.14.3", + "indexmap 2.1.0", "memchr", ] @@ -2356,9 +2339,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" -version = "0.10.62" +version = "0.10.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cde4d2d9200ad5909f8dac647e29482e07c3a35de8a13fce7c9c7747ad9f671" +checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" dependencies = [ "bitflags 2.4.2", "cfg-if", @@ -2388,9 +2371,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.98" +version = "0.9.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1665caf8ab2dc9aef43d1c0023bd904633a6a05cb30b0ad59bec2ae986e57a7" +checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" dependencies = [ "cc", "libc", @@ -2547,9 +2530,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] name = "pnet_base" @@ -2673,9 +2656,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.76" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -2692,7 +2675,7 @@ dependencies = [ "hex", "lazy_static", "procfs-core", - "rustix 0.38.30", + "rustix", ] [[package]] @@ -2855,9 +2838,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" dependencies = [ "either", "rayon-core", @@ -2865,9 +2848,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -3094,6 +3077,7 @@ version = "0.0.1" dependencies = [ "anyhow", "libc", + "nc", "nix 0.27.1", "oci-spec", ] @@ -3140,22 +3124,6 @@ dependencies = [ "semver 1.0.21", ] -[[package]] -name = "rustix" -version = "0.37.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes 1.0.11", - "itoa", - "libc", - "linux-raw-sys 0.3.8", - "once_cell", - "windows-sys 0.48.0", -] - [[package]] name = "rustix" version = "0.38.30" @@ -3164,8 +3132,10 @@ checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" dependencies = [ "bitflags 2.4.2", "errno", + "itoa", "libc", - "linux-raw-sys 0.4.12", + "linux-raw-sys", + "once_cell", "windows-sys 0.52.0", ] @@ -3557,9 +3527,9 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "smallvec" -version = "1.12.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "socket2" @@ -3701,18 +3671,18 @@ dependencies = [ [[package]] name = "system-interface" -version = "0.25.9" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10081a99cbecbc363d381b9503563785f0b02735fccbb0d4c1a2cb3d39f7e7fe" +checksum = "0682e006dd35771e392a6623ac180999a9a854b1d4a6c12fb2e804941c2b1f58" dependencies = [ "bitflags 2.4.2", "cap-fs-ext", "cap-std", "fd-lock", - "io-lifetimes 2.0.3", - "rustix 0.38.30", - "windows-sys 0.48.0", - "winx 0.36.3", + "io-lifetimes", + "rustix", + "windows-sys 0.52.0", + "winx", ] [[package]] @@ -3756,7 +3726,7 @@ dependencies = [ "cfg-if", "fastrand", "redox_syscall", - "rustix 0.38.30", + "rustix", "windows-sys 0.52.0", ] @@ -4162,9 +4132,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -4237,9 +4207,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" [[package]] name = "valuable" @@ -4255,9 +4225,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vergen" -version = "8.3.0" +version = "8.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0d895592fa7710eba03fe072e614e3dc6a61ab76ae7ae10d2eb4a7ed5b00ca" +checksum = "e27d6bdd219887a9eadd19e1c34f32e47fa332301184935c6d9bca26f3cca525" dependencies = [ "anyhow", "cfg-if", @@ -4448,9 +4418,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi-cap-std-sync" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2fe3aaf51c1e1a04a490e89f0a9cab789d21a496c0ce398d49a24f8df883a58" +checksum = "154528979a211aa28d969846e883df75705809ed9bcc70aba61460683ea7355b" dependencies = [ "anyhow", "async-trait", @@ -4460,10 +4430,9 @@ dependencies = [ "cap-time-ext", "fs-set-times", "io-extras", - "io-lifetimes 1.0.11", - "is-terminal", + "io-lifetimes", "once_cell", - "rustix 0.37.27", + "rustix", "system-interface", "tracing", "wasi-common", @@ -4472,17 +4441,17 @@ dependencies = [ [[package]] name = "wasi-common" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e74e9a2c8bfda59870a8bff38a31b9ba80b6fdb7abdfd2487177b85537d2e8a8" +checksum = "3d888b611fee7d273dd057dc009d2dd3132736f36710ffd65657ac83628d1e3b" dependencies = [ "anyhow", - "bitflags 1.3.2", + "bitflags 2.4.2", "cap-rand", "cap-std", "io-extras", "log", - "rustix 0.37.27", + "rustix", "thiserror", "tracing", "wasmtime", @@ -4581,9 +4550,9 @@ checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" [[package]] name = "wasm-encoder" -version = "0.29.0" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18c41dbd92eaebf3612a39be316540b8377c871cb9bde6b064af962984912881" +checksum = "0ad2b51884de9c7f4fe2fd1043fccb8dcad4b1e29558146ee57a144d15779f3f" dependencies = [ "leb128", ] @@ -4900,11 +4869,11 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.107.0" +version = "0.118.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29e3ac9b780c7dda0cac7a52a5d6d2d6707cc6e3451c9db209b6c758f40d7acb" +checksum = "95ee9723b928e735d53000dec9eae7b07a60e490c85ab54abb66659fc61bfcd9" dependencies = [ - "indexmap 1.9.3", + "indexmap 2.1.0", "semver 1.0.21", ] @@ -4931,9 +4900,9 @@ dependencies = [ [[package]] name = "wasmtime" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc104ced94ff0a6981bde77a0bc29aab4af279914a4143b8d1af9fd4b2c9d41" +checksum = "a8e539fded2495422ea3c4dfa7beeddba45904eece182cf315294009e1a323bf" dependencies = [ "anyhow", "async-trait", @@ -4942,18 +4911,19 @@ dependencies = [ "cfg-if", "encoding_rs", "fxprof-processed-profile", - "indexmap 1.9.3", + "indexmap 2.1.0", "libc", "log", - "object 0.30.4", + "object", "once_cell", "paste", - "psm", "rayon", "serde", + "serde_derive", "serde_json", "target-lexicon", - "wasmparser 0.107.0", + "wasm-encoder 0.38.1", + "wasmparser 0.118.1", "wasmtime-cache", "wasmtime-component-macro", "wasmtime-component-util", @@ -4969,27 +4939,27 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b28e5661a9b5f7610a62ab3c69222fa161f7bd31d04529e856461d8c3e706b" +checksum = "660ba9143e15a2acd921820df221b73aee256bd3ca2d208d73d8adc9587ccbb9" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f58ddfe801df3886feaf466d883ea37e941bcc6d841b9f644a08c7acabfe7f8" +checksum = "a3ce373743892002f9391c6741ef0cb0335b55ec899d874f311222b7e36f4594" dependencies = [ "anyhow", "base64", "bincode", "directories-next", - "file-per-thread-logger", "log", - "rustix 0.37.27", + "rustix", "serde", + "serde_derive", "sha2", "toml 0.5.11", "windows-sys 0.48.0", @@ -4998,14 +4968,14 @@ dependencies = [ [[package]] name = "wasmtime-component-macro" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39725d9633fb064bd3a6d83c5ea5077289256de0862d3d96295822edb13419c0" +checksum = "12ef32643324e564e1c359e9044daa06cbf90d7e2d6c99a738d17a12959f01a5" dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", "wasmtime-component-util", "wasmtime-wit-bindgen", "wit-parser", @@ -5013,66 +4983,69 @@ dependencies = [ [[package]] name = "wasmtime-component-util" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1153feafc824f95dc69472cb89a3396b3b05381f781a7508b01840f9df7b1a51" +checksum = "8c87d06c18d21a4818f354c00a85f4ebc62b2270961cd022968452b0e4dbed9d" [[package]] name = "wasmtime-cranelift" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fc1e39ce9aa0fa0b319541ed423960b06cfa7343eca1574f811ea34275739c2" +checksum = "2d648c8b4064a7911093b02237cd5569f71ca171d3a0a486bf80600b19e1cba2" dependencies = [ "anyhow", - "cranelift-codegen 0.97.2", + "cfg-if", + "cranelift-codegen 0.103.0", "cranelift-control", - "cranelift-entity 0.97.2", - "cranelift-frontend 0.97.2", + "cranelift-entity 0.103.0", + "cranelift-frontend 0.103.0", "cranelift-native", "cranelift-wasm", - "gimli 0.27.3", + "gimli 0.28.1", "log", - "object 0.30.4", + "object", "target-lexicon", "thiserror", - "wasmparser 0.107.0", + "wasmparser 0.118.1", "wasmtime-cranelift-shared", "wasmtime-environ", + "wasmtime-versioned-export-macros", ] [[package]] name = "wasmtime-cranelift-shared" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dd32739326690e51c76551d7cbf29d371e7de4dc7b37d2d503be314ab5b7d04" +checksum = "290a89027688782da8ff60b12bb95695494b1874e0d0ba2ba387d23dace6d70c" dependencies = [ "anyhow", - "cranelift-codegen 0.97.2", + "cranelift-codegen 0.103.0", "cranelift-control", "cranelift-native", - "gimli 0.27.3", - "object 0.30.4", + "gimli 0.28.1", + "object", "target-lexicon", "wasmtime-environ", ] [[package]] name = "wasmtime-environ" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b60e4ae5c9ae81750d8bc59110bf25444aa1d9266c19999c3b64b801db3c73" +checksum = "61eb64fb3e0da883e2df4a13a81d6282e072336e6cb6295021d0f7ab2e352754" dependencies = [ "anyhow", - "cranelift-entity 0.97.2", - "gimli 0.27.3", - "indexmap 1.9.3", + "cranelift-entity 0.103.0", + "gimli 0.28.1", + "indexmap 2.1.0", "log", - "object 0.30.4", + "object", "serde", + "serde_derive", "target-lexicon", "thiserror", - "wasm-encoder 0.29.0", - "wasmparser 0.107.0", + "wasm-encoder 0.38.1", + "wasmparser 0.118.1", "wasmprinter", "wasmtime-component-util", "wasmtime-types", @@ -5080,35 +5053,38 @@ dependencies = [ [[package]] name = "wasmtime-fiber" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd40c8d869916ee6b1f3fcf1858c52041445475ca8550aee81c684c0eb530ca" +checksum = "40ecf1d3a838b0956b71ad3f8cb80069a228339775bf02dd35d86a5a68bbe443" dependencies = [ + "anyhow", "cc", "cfg-if", - "rustix 0.37.27", + "rustix", "wasmtime-asm-macros", + "wasmtime-versioned-export-macros", "windows-sys 0.48.0", ] [[package]] name = "wasmtime-jit" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655b23a10eddfe7814feb548a466f3f25aa4bb4f43098a147305c544a2de28e1" +checksum = "f485336add49267d8859e8f8084d2d4b9a4b1564496b6f30ba5b168d50c10ceb" dependencies = [ - "addr2line 0.19.0", + "addr2line", "anyhow", "bincode", "cfg-if", "cpp_demangle", - "gimli 0.27.3", + "gimli 0.28.1", "ittapi", "log", - "object 0.30.4", + "object", "rustc-demangle", - "rustix 0.37.27", + "rustix", "serde", + "serde_derive", "target-lexicon", "wasmtime-environ", "wasmtime-jit-debug", @@ -5119,20 +5095,21 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e46b7e98979a69d3df093076bde8431204e3c96a770e8d216fea365c627d88a4" +checksum = "65e119affec40edb2fab9044f188759a00c2df9c3017278d047012a2de1efb4f" dependencies = [ - "object 0.30.4", + "object", "once_cell", - "rustix 0.37.27", + "rustix", + "wasmtime-versioned-export-macros", ] [[package]] name = "wasmtime-jit-icache-coherence" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb1e7c68ede63dc7a98c3e473162954e224951854e229c8b4e74697fe17dbdd" +checksum = "6b6d197fcc34ad32ed440e1f9552fd57d1f377d9699d31dee1b5b457322c1f8a" dependencies = [ "cfg-if", "libc", @@ -5141,63 +5118,86 @@ dependencies = [ [[package]] name = "wasmtime-runtime" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843e33bf9e0f0c57902c87a1dea1389cc23865c65f007214318dbdfcb3fd4ae5" +checksum = "794b2bb19b99ef8322ff0dd9fe1ba7e19c41036dfb260b3f99ecce128c42ff92" dependencies = [ "anyhow", "cc", "cfg-if", "encoding_rs", - "indexmap 1.9.3", + "indexmap 2.1.0", "libc", "log", "mach", "memfd", - "memoffset 0.8.0", + "memoffset 0.9.0", "paste", - "rand", - "rustix 0.37.27", + "psm", + "rustix", "sptr", + "wasm-encoder 0.38.1", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-fiber", "wasmtime-jit-debug", + "wasmtime-versioned-export-macros", + "wasmtime-wmemcheck", "windows-sys 0.48.0", ] [[package]] name = "wasmtime-types" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7473a07bebd85671bada453123e3d465c8e0a59668ff79f5004076e6a2235ef5" +checksum = "d995db8bb56f2cd8d2dc0ed5ffab94ffb435283b0fe6747f80f7aab40b2d06a1" dependencies = [ - "cranelift-entity 0.97.2", + "cranelift-entity 0.103.0", "serde", + "serde_derive", "thiserror", - "wasmparser 0.107.0", + "wasmparser 0.118.1", +] + +[[package]] +name = "wasmtime-versioned-export-macros" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55c5565959287c21dd0f4277ae3518dd2ae62679f655ee2dbc4396e19d210db" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", ] [[package]] name = "wasmtime-wasi" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aff7b3b3272ad5b4ba63c9aac6248da6f06a8227d0c0d6017d89225d794e966c" +checksum = "ccd8370078149d49a3a47e93741553fd79b700421464b6a27ca32718192ab130" dependencies = [ "anyhow", "async-trait", - "bitflags 1.3.2", + "bitflags 2.4.2", + "bytes", "cap-fs-ext", + "cap-net-ext", "cap-rand", "cap-std", "cap-time-ext", "fs-set-times", + "futures", "io-extras", + "io-lifetimes", "libc", - "rustix 0.37.27", + "log", + "once_cell", + "rustix", "system-interface", "thiserror", + "tokio", "tracing", + "url", "wasi-cap-std-sync", "wasi-common", "wasmtime", @@ -5207,16 +5207,16 @@ dependencies = [ [[package]] name = "wasmtime-winch" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "351c9d4e60658dd0cf616c12c5508f86cc2cefcc0cff307eed0a31b23d3c0b70" +checksum = "2c6f945ff9bad96e0a69973d74f193c19f627c8adbf250e7cb73ae7564b6cc8a" dependencies = [ "anyhow", - "cranelift-codegen 0.97.2", - "gimli 0.27.3", - "object 0.30.4", + "cranelift-codegen 0.103.0", + "gimli 0.28.1", + "object", "target-lexicon", - "wasmparser 0.107.0", + "wasmparser 0.118.1", "wasmtime-cranelift-shared", "wasmtime-environ", "winch-codegen", @@ -5224,15 +5224,22 @@ dependencies = [ [[package]] name = "wasmtime-wit-bindgen" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f114407efbd09e4ef67053b6ae54c16455a821ef2f6096597fcba83b7625e59c" +checksum = "f328b2d4a690270324756e886ed5be3a4da4c00be0eea48253f4595ad068062b" dependencies = [ "anyhow", "heck 0.4.1", + "indexmap 2.1.0", "wit-parser", ] +[[package]] +name = "wasmtime-wmemcheck" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67761d8f8c0b3c13a5d34356274b10a40baba67fe9cfabbfc379a8b414e45de2" + [[package]] name = "wast" version = "35.0.2" @@ -5326,7 +5333,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.30", + "rustix", ] [[package]] @@ -5338,19 +5345,19 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.30", + "rustix", "windows-sys 0.48.0", ] [[package]] name = "wiggle" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e63f150c6e39ef29a58139564c5ed7a0ef34d6df8a8eecd4233af85a576968d9" +checksum = "0afb26cd3269289bb314a361ff0a6685e5ce793b62181a9fe3f81ace15051697" dependencies = [ "anyhow", "async-trait", - "bitflags 1.3.2", + "bitflags 2.4.2", "thiserror", "tracing", "wasmtime", @@ -5359,28 +5366,28 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f31e961fb0a5ad3ff10689c85f327f4abf10b4cac033b9d7372ccbb106aea24" +checksum = "cef2868fed7584d2b552fa317104858ded80021d23b073b2d682d3c932a027bd" dependencies = [ "anyhow", "heck 0.4.1", "proc-macro2", "quote", "shellexpand", - "syn 1.0.109", + "syn 2.0.48", "witx", ] [[package]] name = "wiggle-macro" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a28ae3d6b90f212beca7fab5910d0a3b1a171290c06eaa81bb39f41e6f74589" +checksum = "31ae1ec11a17ea481539ee9a5719a278c9790d974060fbf71db4b2c05378780b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", "wiggle-generate", ] @@ -5417,17 +5424,17 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "0.8.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1bf2ac354be169bb201de7867b84f45d91d0ef812f67f11c33f74a7f5a24e56" +checksum = "58e58c236a6abdd9ab454552b4f29e16cfa837a86897c1503313b2e62e7609ec" dependencies = [ "anyhow", - "cranelift-codegen 0.97.2", - "gimli 0.27.3", + "cranelift-codegen 0.103.0", + "gimli 0.28.1", "regalloc2 0.9.3", "smallvec", "target-lexicon", - "wasmparser 0.107.0", + "wasmparser 0.118.1", "wasmtime-environ", ] @@ -5634,17 +5641,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "winx" -version = "0.35.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c52a121f0fbf9320d5f2a9a5d82f6cb7557eda5e8b47fc3e7f359ec866ae960" -dependencies = [ - "bitflags 1.3.2", - "io-lifetimes 1.0.11", - "windows-sys 0.48.0", -] - [[package]] name = "winx" version = "0.36.3" @@ -5657,18 +5653,19 @@ dependencies = [ [[package]] name = "wit-parser" -version = "0.8.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6daec9f093dbaea0e94043eeb92ece327bbbe70c86b1f41aca9bbfefd7f050f0" +checksum = "df4913a2219096373fd6512adead1fb77ecdaa59d7fc517972a7d30b12f625be" dependencies = [ "anyhow", "id-arena", - "indexmap 1.9.3", + "indexmap 2.1.0", "log", - "pulldown-cmark", "semver 1.0.21", + "serde", + "serde_derive", + "serde_json", "unicode-xid", - "url", ] [[package]] @@ -5699,8 +5696,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", - "linux-raw-sys 0.4.12", - "rustix 0.38.30", + "linux-raw-sys", + "rustix", ] [[package]] diff --git a/crates/libcontainer/Cargo.toml b/crates/libcontainer/Cargo.toml index 2764bfe3f..3653871a7 100644 --- a/crates/libcontainer/Cargo.toml +++ b/crates/libcontainer/Cargo.toml @@ -53,6 +53,7 @@ regex = "1.10.2" thiserror = "1.0.56" tracing = { version = "0.1.40", features = ["attributes"] } safe-path = "0.1.0" +nc = "0.8.18" [dev-dependencies] oci-spec = { version = "~0.6.4", features = ["proptests", "runtime"] } diff --git a/crates/libcontainer/src/container/tenant_builder.rs b/crates/libcontainer/src/container/tenant_builder.rs index 4adcc0e76..a503cc6ff 100644 --- a/crates/libcontainer/src/container/tenant_builder.rs +++ b/crates/libcontainer/src/container/tenant_builder.rs @@ -4,7 +4,7 @@ use nix::unistd::{self, close, pipe2, read, Pid}; use oci_spec::runtime::{ Capabilities as SpecCapabilities, Capability as SpecCapability, LinuxBuilder, LinuxCapabilities, LinuxCapabilitiesBuilder, LinuxNamespace, LinuxNamespaceBuilder, - LinuxNamespaceType, Process, ProcessBuilder, Spec, + LinuxNamespaceType, LinuxSchedulerPolicy, Process, ProcessBuilder, Spec, }; use procfs::process::Namespace; @@ -222,6 +222,62 @@ impl TenantContainerBuilder { } } } + + if let Some(sc) = process.scheduler() { + let policy = sc.policy(); + if let Some(nice) = sc.nice() { + // https://man7.org/linux/man-pages/man2/sched_setattr.2.html#top_of_page + if (*policy == LinuxSchedulerPolicy::SchedBatch + || *policy == LinuxSchedulerPolicy::SchedOther) + && (*nice < -20 || *nice > 19) + { + tracing::error!( + ?nice, + "invalid scheduler.nice: '{}', must be within -20 to 19", + nice + ); + Err(ErrInvalidSpec::Scheduler)?; + } + } + if let Some(priority) = sc.priority() { + if *priority != 0 + && (*policy != LinuxSchedulerPolicy::SchedFifo + && *policy != LinuxSchedulerPolicy::SchedRr) + { + tracing::error!(?policy,"scheduler.priority can only be specified for SchedFIFO or SchedRR policy"); + Err(ErrInvalidSpec::Scheduler)?; + } + } + if *policy != LinuxSchedulerPolicy::SchedDeadline { + if let Some(runtime) = sc.runtime() { + if *runtime != 0 { + tracing::error!( + ?runtime, + "scheduler runtime can only be specified for SchedDeadline policy" + ); + Err(ErrInvalidSpec::Scheduler)?; + } + } + if let Some(deadline) = sc.deadline() { + if *deadline != 0 { + tracing::error!( + ?deadline, + "scheduler deadline can only be specified for SchedDeadline policy" + ); + Err(ErrInvalidSpec::Scheduler)?; + } + } + if let Some(period) = sc.period() { + if *period != 0 { + tracing::error!( + ?period, + "scheduler period can only be specified for SchedDeadline policy" + ); + Err(ErrInvalidSpec::Scheduler)?; + } + } + } + } } utils::validate_spec_for_new_user_ns(spec)?; diff --git a/crates/libcontainer/src/error.rs b/crates/libcontainer/src/error.rs index cda150add..f0555c962 100644 --- a/crates/libcontainer/src/error.rs +++ b/crates/libcontainer/src/error.rs @@ -92,4 +92,6 @@ pub enum ErrInvalidSpec { AppArmorNotEnabled, #[error("invalid io priority or class.")] IoPriority, + #[error("invalid scheduler config for process")] + Scheduler, } diff --git a/crates/libcontainer/src/process/container_init_process.rs b/crates/libcontainer/src/process/container_init_process.rs index f55c04ec8..eb2e5f2eb 100644 --- a/crates/libcontainer/src/process/container_init_process.rs +++ b/crates/libcontainer/src/process/container_init_process.rs @@ -7,13 +7,18 @@ use crate::{ capabilities, hooks, namespaces::Namespaces, process::channel, rootfs::RootFS, tty, user_ns::UserNamespaceConfig, utils, }; +use nc; use nix::mount::MsFlags; use nix::sched::CloneFlags; use nix::sys::stat::Mode; use nix::unistd::setsid; use nix::unistd::{self, Gid, Uid}; -use oci_spec::runtime::{IOPriorityClass, LinuxIOPriority, LinuxNamespaceType, Spec, User}; +use oci_spec::runtime::{ + IOPriorityClass, LinuxIOPriority, LinuxNamespaceType, LinuxSchedulerFlag, LinuxSchedulerPolicy, + Scheduler, Spec, User, +}; use std::collections::HashMap; +use std::mem; use std::os::unix::io::AsRawFd; use std::{ env, fs, @@ -74,6 +79,8 @@ pub enum InitProcessError { WorkloadValidation(#[from] workload::ExecutorValidationError), #[error("invalid io priority class: {0}")] IoPriorityClass(String), + #[error("call exec sched_setattr error: {0}")] + SchedSetattr(String), } type Result = std::result::Result; @@ -288,6 +295,8 @@ pub fn container_init_process( set_io_priority(syscall.as_ref(), proc.io_priority())?; + setup_scheduler(proc.scheduler())?; + // set up tty if specified if let Some(csocketfd) = args.console_socket { tty::setup_console(&csocketfd).map_err(|err| { @@ -741,6 +750,59 @@ fn set_io_priority(syscall: &dyn Syscall, io_priority_op: &Option) -> Result<()> { + if let Some(sc) = sc_op { + let policy: u32 = match *sc.policy() { + LinuxSchedulerPolicy::SchedOther => 0, + LinuxSchedulerPolicy::SchedFifo => 1, + LinuxSchedulerPolicy::SchedRr => 2, + LinuxSchedulerPolicy::SchedBatch => 3, + LinuxSchedulerPolicy::SchedIso => 4, + LinuxSchedulerPolicy::SchedIdle => 5, + LinuxSchedulerPolicy::SchedDeadline => 6, + }; + let mut flags_value: u64 = 0; + if let Some(flags) = sc.flags() { + for flag in flags { + match *flag { + LinuxSchedulerFlag::SchedResetOnFork => flags_value |= 0x01, + LinuxSchedulerFlag::SchedFlagReclaim => flags_value |= 0x02, + LinuxSchedulerFlag::SchedFlagDLOverrun => flags_value |= 0x04, + LinuxSchedulerFlag::SchedFlagKeepPolicy => flags_value |= 0x08, + LinuxSchedulerFlag::SchedFlagKeepParams => flags_value |= 0x10, + LinuxSchedulerFlag::SchedFlagUtilClampMin => flags_value |= 0x20, + LinuxSchedulerFlag::SchedFlagUtilClampMax => flags_value |= 0x40, + } + } + } + let mut a = nc::sched_attr_t { + size: mem::size_of::().try_into().unwrap(), + sched_policy: policy, + sched_flags: flags_value, + sched_nice: sc.nice().unwrap_or(0), + sched_priority: sc.priority().unwrap_or(0) as u32, + sched_runtime: sc.runtime().unwrap_or(0), + sched_deadline: sc.deadline().unwrap_or(0), + sched_period: sc.period().unwrap_or(0), + sched_util_min: 0, + sched_util_max: 0, + }; + // TODO when nix or libc support this function, replace nx crates. + unsafe { + let result = nc::sched_setattr(0, &mut a, 0); + match result { + Ok(_) => {} + Err(err) => { + tracing::error!(?err, "error setting scheduler"); + Err(InitProcessError::SchedSetattr(err.to_string()))?; + } + } + }; + } + Ok(()) +} + #[cfg(feature = "libseccomp")] fn sync_seccomp( fd: Option, diff --git a/crates/youki/Cargo.toml b/crates/youki/Cargo.toml index 755d21673..21a3fd710 100644 --- a/crates/youki/Cargo.toml +++ b/crates/youki/Cargo.toml @@ -44,8 +44,8 @@ caps = "0.5.5" wasmer = { version = "4.0.0", optional = true } wasmer-wasix = { version = "0.9.0", optional = true } wasmedge-sdk = { version = "0.13.2", optional = true } -wasmtime = { version = "10.0.2", optional = true } -wasmtime-wasi = { version = "10.0.2", optional = true } +wasmtime = { version = "16.0.0", optional = true } +wasmtime-wasi = { version = "16.0.0", optional = true } tracing = { version = "0.1.40", features = ["attributes"] } tracing-subscriber = { version = "0.3.18", features = ["json", "env-filter"] } tracing-journald = "0.3.0" diff --git a/justfile b/justfile index 59ebf1b90..853a0cf1b 100644 --- a/justfile +++ b/justfile @@ -65,6 +65,9 @@ validate-contest-runc: contest test-rootless-podman: {{ cwd }}/tests/rootless-tests/run.sh {{ cwd }}/youki +# test docker-in-docker works with youki +test-dind: + {{ cwd }}/tests/dind/run.sh # run containerd integration tests containerd-test: youki-dev diff --git a/tests/contest/contest/src/main.rs b/tests/contest/contest/src/main.rs index edda61394..a24e1740f 100644 --- a/tests/contest/contest/src/main.rs +++ b/tests/contest/contest/src/main.rs @@ -11,6 +11,7 @@ use crate::tests::linux_ns_itype::get_ns_itype_tests; use crate::tests::mounts_recursive::get_mounts_recursive_test; use crate::tests::pidfile::get_pidfile_test; use crate::tests::readonly_paths::get_ro_paths_test; +use crate::tests::scheduler::get_scheduler_test; use crate::tests::seccomp::get_seccomp_test; use crate::tests::seccomp_notify::get_seccomp_notify_test; use crate::tests::sysctl::get_sysctl_test; @@ -106,6 +107,8 @@ fn main() -> Result<()> { let domainname = get_domainname_tests(); let intel_rdt = get_intel_rdt_test(); let sysctl = get_sysctl_test(); + #[allow(unused_variables)] + let scheduler = get_scheduler_test(); tm.add_test_group(Box::new(cl)); tm.add_test_group(Box::new(cc)); @@ -127,6 +130,7 @@ fn main() -> Result<()> { // tm.add_test_group(Box::new(domainname)); // TODO (YJDoc2) fix in #2616 tm.add_test_group(Box::new(intel_rdt)); tm.add_test_group(Box::new(sysctl)); + // tm.add_test_group(Box::new(scheduler)); tm.add_cleanup(Box::new(cgroups::cleanup_v1)); tm.add_cleanup(Box::new(cgroups::cleanup_v2)); diff --git a/tests/contest/contest/src/tests/mod.rs b/tests/contest/contest/src/tests/mod.rs index 811fb294a..927fe07c1 100644 --- a/tests/contest/contest/src/tests/mod.rs +++ b/tests/contest/contest/src/tests/mod.rs @@ -9,6 +9,7 @@ pub mod linux_ns_itype; pub mod mounts_recursive; pub mod pidfile; pub mod readonly_paths; +pub mod scheduler; pub mod seccomp; pub mod seccomp_notify; pub mod sysctl; diff --git a/tests/contest/contest/src/tests/scheduler/mod.rs b/tests/contest/contest/src/tests/scheduler/mod.rs new file mode 100644 index 000000000..b3ad07cab --- /dev/null +++ b/tests/contest/contest/src/tests/scheduler/mod.rs @@ -0,0 +1,3 @@ +mod scheduler_policy; + +pub use scheduler_policy::get_scheduler_test; diff --git a/tests/contest/contest/src/tests/scheduler/scheduler_policy.rs b/tests/contest/contest/src/tests/scheduler/scheduler_policy.rs new file mode 100644 index 000000000..fbfed9c89 --- /dev/null +++ b/tests/contest/contest/src/tests/scheduler/scheduler_policy.rs @@ -0,0 +1,56 @@ +use anyhow::{Context, Result}; +use oci_spec::runtime::{ + LinuxSchedulerPolicy, ProcessBuilder, SchedulerBuilder, Spec, SpecBuilder, +}; +use test_framework::{test_result, Test, TestGroup, TestResult}; + +use crate::utils::test_inside_container; + +fn create_spec(policy: LinuxSchedulerPolicy, execute_test: &str) -> Result { + let sc = SchedulerBuilder::default() + .policy(policy) + .nice(1i32) + .build() + .unwrap(); + SpecBuilder::default() + .process( + ProcessBuilder::default() + .args( + ["runtimetest", execute_test] + .iter() + .map(|s| s.to_string()) + .collect::>(), + ) + .scheduler(sc) + .build()?, + ) + .build() + .context("failed to create spec") +} + +fn scheduler_policy_other_test() -> TestResult { + let spec = test_result!(create_spec( + LinuxSchedulerPolicy::SchedOther, + "scheduler_policy_other" + )); + test_inside_container(spec, &|_| Ok(())) +} + +fn scheduler_policy_batch_test() -> TestResult { + let spec = test_result!(create_spec( + LinuxSchedulerPolicy::SchedBatch, + "scheduler_policy_batch" + )); + test_inside_container(spec, &|_| Ok(())) +} + +pub fn get_scheduler_test() -> TestGroup { + let mut scheduler_policy_group = TestGroup::new("set_scheduler_policy"); + let policy_fifo_test = Test::new("policy_other", Box::new(scheduler_policy_other_test)); + let policy_rr_test = Test::new("policy_batch", Box::new(scheduler_policy_batch_test)); + + scheduler_policy_group.add(vec![Box::new(policy_fifo_test)]); + scheduler_policy_group.add(vec![Box::new(policy_rr_test)]); + + scheduler_policy_group +} diff --git a/tests/contest/runtimetest/Cargo.toml b/tests/contest/runtimetest/Cargo.toml index a7dba841b..79e16fd38 100644 --- a/tests/contest/runtimetest/Cargo.toml +++ b/tests/contest/runtimetest/Cargo.toml @@ -8,4 +8,5 @@ oci-spec = { version = "0.6.4", features = ["runtime"] } nix = "0.27.1" anyhow = "1.0" libc = "0.2.139" # TODO (YJDoc2) upgrade to latest +nc = "0.8.18" diff --git a/tests/contest/runtimetest/src/main.rs b/tests/contest/runtimetest/src/main.rs index 67dfd149d..ff685141f 100644 --- a/tests/contest/runtimetest/src/main.rs +++ b/tests/contest/runtimetest/src/main.rs @@ -36,6 +36,8 @@ fn main() { "domainname_test" => tests::validate_domainname(&spec), "seccomp" => tests::validate_seccomp(&spec), "sysctl" => tests::validate_sysctl(&spec), + "scheduler_policy_other" => tests::validate_scheduler_policy(&spec), + "scheduler_policy_batch" => tests::validate_scheduler_policy(&spec), _ => eprintln!("error due to unexpected execute test name: {execute_test}"), } } diff --git a/tests/contest/runtimetest/src/tests.rs b/tests/contest/runtimetest/src/tests.rs index 2623ced01..ceda0ad82 100644 --- a/tests/contest/runtimetest/src/tests.rs +++ b/tests/contest/runtimetest/src/tests.rs @@ -3,9 +3,10 @@ use anyhow::{bail, Result}; use libc::getdomainname; use nix::errno::Errno; use nix::unistd::getcwd; -use oci_spec::runtime::Spec; +use oci_spec::runtime::{LinuxSchedulerPolicy, Spec}; use std::ffi::CStr; use std::fs::{self, read_dir}; +use std::mem; use std::path::Path; ////////// ANCHOR: example_hello_world @@ -326,7 +327,9 @@ pub fn validate_sysctl(spec: &Spec) { .trim() .to_string(), Err(e) => { - return eprintln!("error due to fail to read the file {key_path:?}, error: {e}") + return eprintln!( + "error due to fail to read the file {key_path:?}, error: {e}" + ); } }; if &actual_value != expected_value { @@ -337,3 +340,52 @@ pub fn validate_sysctl(spec: &Spec) { } } } + +pub fn validate_scheduler_policy(spec: &Spec) { + let proc = spec.process().as_ref().unwrap(); + let sc = proc.scheduler().as_ref().unwrap(); + println!("schedul is {:?}", spec); + let size = mem::size_of::().try_into().unwrap(); + let mut get_sched_attr = nc::sched_attr_t { + size: 0, + sched_policy: 0, + sched_flags: 0, + sched_nice: 0, + sched_priority: 0, + sched_runtime: 0, + sched_deadline: 0, + sched_period: 0, + sched_util_min: 0, + sched_util_max: 0, + }; + unsafe { + match nc::sched_getattr(0, &mut get_sched_attr, size, 0) { + Ok(_) => { + println!("sched_getattr get success"); + } + Err(e) => { + return eprintln!("error due to fail to get sched attr error: {e}"); + } + }; + } + println!("get_sched_attr is {:?}", get_sched_attr); + let sp = get_sched_attr.sched_policy; + let want_sp: u32 = match *sc.policy() { + LinuxSchedulerPolicy::SchedOther => 0, + LinuxSchedulerPolicy::SchedFifo => 1, + LinuxSchedulerPolicy::SchedRr => 2, + LinuxSchedulerPolicy::SchedBatch => 3, + LinuxSchedulerPolicy::SchedIso => 4, + LinuxSchedulerPolicy::SchedIdle => 5, + LinuxSchedulerPolicy::SchedDeadline => 6, + }; + println!("want_sp {:?}", want_sp); + if sp != want_sp { + return eprintln!("error due to sched_policy want {want_sp}, got {sp}"); + } + let sn = get_sched_attr.sched_nice; + let want_sn = sc.nice().unwrap(); + if sn != want_sn { + eprintln!("error due to sched_nice want {want_sn}, got {sn}") + } +} diff --git a/tests/dind/daemon.json b/tests/dind/daemon.json new file mode 100644 index 000000000..a1cdbedd1 --- /dev/null +++ b/tests/dind/daemon.json @@ -0,0 +1,7 @@ +{ + "runtimes": { + "youki": { + "path": "/usr/bin/youki" + } + } +} \ No newline at end of file diff --git a/tests/dind/run.sh b/tests/dind/run.sh new file mode 100755 index 000000000..0aced7203 --- /dev/null +++ b/tests/dind/run.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -e + +ROOT=$(git rev-parse --show-toplevel) + +docker run --privileged -dq \ + --name youki-test-dind \ + -v $ROOT/youki:/usr/bin/youki \ + -v $ROOT/tests/dind/daemon.json:/etc/docker/daemon.json \ + docker:dind > /dev/null + +trap "docker rm -f youki-test-dind > /dev/null" EXIT + +# wait for docker to start +timeout 30s \ + grep -q -m1 "/var/run/docker.sock" \ + <(docker logs -f youki-test-dind 2>&1) + +docker exec -i youki-test-dind \ + docker run -q --runtime=youki hello-world