1
0
mirror of https://github.com/containers/youki synced 2024-11-23 17:32:15 +01:00
Commit Graph

159 Commits

Author SHA1 Message Date
utam0k
82c621e1d5
Merge pull request #528 from Furisto/test-cpu-v2
Implement integration tests for cgroup v2 cpu
2021-12-14 22:30:54 +09:00
Jonathan Hult
02abc5f3ca
Update version for runc compatibility for Moby
Fix for #529

Signed-off-by: Jonathan Hult <jhult@mythics.com>
2021-12-13 22:31:35 -05:00
Furisto
712a07ec11 Review feedback
Logger should not log to file
2021-12-13 23:09:34 +01:00
dependabot[bot]
53dfa8b6de
Bump pkg-config from 0.3.23 to 0.3.24
Bumps [pkg-config](https://github.com/rust-lang/pkg-config-rs) from 0.3.23 to 0.3.24.
- [Release notes](https://github.com/rust-lang/pkg-config-rs/releases)
- [Changelog](https://github.com/rust-lang/pkg-config-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/pkg-config-rs/commits)

---
updated-dependencies:
- dependency-name: pkg-config
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-13 06:33:35 +00:00
dependabot[bot]
109020bcef
Bump libc from 0.2.109 to 0.2.111
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.109 to 0.2.111.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.109...0.2.111)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-13 01:12:08 +00:00
Furisto
d1bdf10859
Fix integration tests 2021-12-12 16:17:59 +01:00
Furisto
d21706ea47 Update with latest 2021-12-12 00:30:34 +01:00
Furisto
763b21dca1 Cleanup 2021-12-11 23:52:04 +01:00
Furisto
effb728fb0 Ensure test directory is cleaned up 2021-12-11 23:30:25 +01:00
Furisto
e7d0e90529 Cleanup logger implementation 2021-12-11 20:38:06 +01:00
Furisto
69b5d76fe4 Cpu period tests 2021-12-11 18:24:06 +01:00
utam0k
243be9ff1c remove unneede impl Default
https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
2021-12-11 21:33:21 +09:00
Furisto
9abeeb2407 Ensure cpu quota is not set if none is specified 2021-12-10 23:32:02 +01:00
Furisto
90ba7e066a Cpu weight & quota tests 2021-12-08 00:21:25 +01:00
Furisto
67bfc4c920 Implement equality macro
Implement an equality macro that returns a result instead of panicking
2021-12-07 23:27:40 +01:00
utam0k
aff2d19092
Merge pull request #516 from tsturzl/cgroups_network_integration_test
Integration test: cgroup v1 network tests, fix to memory tests
2021-12-07 20:50:08 +09:00
dependabot[bot]
974757f32d
Bump pkg-config from 0.3.22 to 0.3.23
Bumps [pkg-config](https://github.com/rust-lang/pkg-config-rs) from 0.3.22 to 0.3.23.
- [Release notes](https://github.com/rust-lang/pkg-config-rs/releases)
- [Changelog](https://github.com/rust-lang/pkg-config-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/pkg-config-rs/compare/0.3.22...0.3.23)

---
updated-dependencies:
- dependency-name: pkg-config
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-07 00:40:34 +00:00
Furisto
3d7247b5ca Ensure cpu weight tests pass
Cpu weight should be set to maximum value if value exceeds the valid range.
2021-12-06 19:18:00 +01:00
dependabot[bot]
3cf41275ed
Bump libc from 0.2.108 to 0.2.109
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.108 to 0.2.109.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.108...0.2.109)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-06 01:38:21 +00:00
dependabot[bot]
86868292f7
Bump libbpf-sys from 0.5.0-2 to 0.6.0-1
Bumps [libbpf-sys](https://github.com/alexforster/libbpf-sys) from 0.5.0-2 to 0.6.0-1.
- [Release notes](https://github.com/alexforster/libbpf-sys/releases)
- [Commits](https://github.com/alexforster/libbpf-sys/compare/0.5.0-2...0.6.0-1)

---
updated-dependencies:
- dependency-name: libbpf-sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-06 01:09:16 +00:00
Furisto
d5818cff01 Add logging & sort cargo.toml entries 2021-12-05 21:58:21 +01:00
Travis Sturzl
923c0c46b2 appease the great clippy 2021-12-05 11:49:30 -07:00
Travis Sturzl
d3133c5da7 check that expected network interfaces exist to determine if test can
run
2021-12-05 11:37:21 -07:00
Furisto
3a60604822 Move tests for cpu variants (v1,v2) to own module 2021-12-05 15:42:24 +01:00
Theo Paris
2eef38dfc7
Add shell completion (#515) 2021-12-05 14:39:08 +01:00
Travis Sturzl
a42af6ed1e network tests passing, fix to memory tests 2021-12-04 21:37:59 -07:00
Travis Sturzl
eb083a162a
Merge pull request #513 from Furisto/systemd-part4
Improvements to cgroup support
2021-12-04 20:15:50 -07:00
Furisto
af4d403fff Cleanup & Clippy 2021-12-04 11:36:13 +01:00
David Gibson
3626f4f4ec Move global command line options to liboci-cli crate
The OCI CLI document doesn't define any required global options, but there
are a number which are commonly accepted by most runtimes.  We define this
subset there, and incorporate it into the top-level Parser in Youki using

fixes #508

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-12-03 12:41:55 +11:00
David Gibson
2b66005d93 Move subcommand enums to liboci-cli crate
Because we want to allow a final user to add extension commands
easily, it doesn't work to entirely move the enum of runtime
subcommands into the liboci-cli crate.  However, using the
incoporate those into the top-level enum defined by youki.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-12-03 12:41:55 +11:00
David Gibson
88ea432b92 Remove version & author from each subcommand
Currently every individual subcommand of youki has clap attributes giving
the youki version and authors.  That seems a bit redundant, since this
information is also on the top level Opts structure.

Having the tags on each does have an effect though: it means that, e.g.
"youki create --help" will give the version and author, as well as plain
"youki --help".  Likewise "youki create --version" will give a result as
well as "youki --version".

Including this is of limited value, though, since it can be easily obtained
from the top level command.  It also provides a barrier to splitting out
the frontend argument parsing from the rest of youki, so remove it.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-12-03 12:41:55 +11:00
David Gibson
09d9fae8cd Move unspecified, but common subcommands to liboci-cli crate
The OCI Runtime Command Line Interface specification[0] specifies only five
subcommands to implement.  However, there are a number of other subcommands
that are commonly implemented by runtimes, and commonly used by their
clients.

Move the parsing of a number of those subcommands into the liboci-cli
crate.  This leaves only one subcommand "info" parsed in the youki crate.
As far as I can tell this is a youki specific extension, since it doesn't
appear in either runc or crun.

[0] https://github.com/opencontainers/runtime-tools/blob/master/docs/command-line-interface.md

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-12-03 12:41:55 +11:00
David Gibson
ea448d05a8 Add some rudimentary documentation to the liboci-cli crate
In particular it has a summary of what subcommands implemented by various
runtimes are included in the frontend crate so far.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-12-03 12:41:50 +11:00
David Gibson
bf5577ccc0 Move argument structures for specified subcommands to a new crate
It would be useful to have an independent crate covering solely the OCI
command line front end of youki, to which other backends can then be
written.

To start on that, we create a new "oci-runtime-clap" crate, and move some
subcommand structure definitions into it.  For now we only move the
subcommands which are actually specified in the OCI runtime command line
interface document (v1.0.1):

https://github.com/opencontainers/runtime-tools/blob/master/docs/command-line-interface.md

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-12-02 17:20:31 +11:00
David Gibson
58cad9a27c Split implementation of OCI commands from the argument structures
Currently youki implements each OCI command as a single "exec()" method on
the structure encoding the arguments for that command.  Tying the
implementation to the argument structure makes it difficult to split the
container backend from the command line front end.

So, rework each command as a standalone function.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-12-02 17:20:31 +11:00
utam0k
bf9a22ca10
Merge pull request #511 from yihuaf/yihuaf/log
Fix log files and remove env_logger
2021-12-02 07:11:50 +09:00
yihuaf
300b396e32 add a test for logfile 2021-12-01 05:39:35 +01:00
yihuaf
16bc2a598f fix logger implementation
remove env_logger and use our own logger
2021-12-01 05:10:40 +01:00
Furisto
2902eaf348 Add feature config 2021-11-30 22:42:12 +01:00
Furisto
b501451a47 Remove dead code attributes 2021-11-30 21:04:22 +01:00
dependabot[bot]
2b73cb97eb
Bump anyhow from 1.0.50 to 1.0.51
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.50 to 1.0.51.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.50...1.0.51)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-30 00:38:07 +00:00
Furisto
d5a36cc067 Enable pause/resume & stats 2021-11-29 23:11:30 +01:00
Furisto
f5cf390458 Ensure controllers are attached 2021-11-29 21:59:18 +01:00
utam0k
34ce2335af
Merge pull request #502 from containers/dependabot/cargo/anyhow-1.0.50
Bump anyhow from 1.0.48 to 1.0.50
2021-11-29 11:11:49 +09:00
dependabot[bot]
8792762cb6
Bump procfs from 0.11.0 to 0.11.1
Bumps [procfs](https://github.com/eminence/procfs) from 0.11.0 to 0.11.1.
- [Release notes](https://github.com/eminence/procfs/releases)
- [Commits](https://github.com/eminence/procfs/compare/v0.11.0...v0.11.1)

---
updated-dependencies:
- dependency-name: procfs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 01:12:26 +00:00
dependabot[bot]
824f1abd13
Bump anyhow from 1.0.48 to 1.0.50
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.48 to 1.0.50.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.48...1.0.50)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 01:11:53 +00:00
utam0k
8310ac4f56
Merge pull request #499 from Furisto/systemd-part3
Support resource restrictions for rootless containers
2021-11-29 07:26:07 +09:00
Furisto
1a14c43c5b
Review feedback
- Add cgroups path to error context
- Correct spelling mistake
- Update sequence diagram
- Implement TryFrom for CgroupsPath
2021-11-28 20:43:16 +01:00
utam0k
54cbd15fa8
make complex loglevel decision easy to understand. (#482)
* make complex loglevel decision easy to understand.

* guard env val for unit tests.

* make some unit tests serial to handle env val.
2021-11-27 20:50:46 -08:00
Furisto
f92b265b80
Ensure rootless containers work on v1 2021-11-25 20:47:40 +01:00