Christophe de Dinechin ee739c5d59 rust-agent: Report errors to caller if possible
Various recently added error-causing calls

This addresses the following warning:

    warning: unused `std::result::Result` that must be used
      --> rustjail/src/cgroups/fs/mod.rs:93:9
       |
    93 |         cg.add_task(CgroupPid::from(pid as u64));
       |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = note: `#[warn(unused_must_use)]` on by default
       = note: this `Result` may be an `Err` variant, which should be handled

    warning: unused `std::result::Result` that must be used
       --> rustjail/src/cgroups/fs/mod.rs:196:17
        |
    196 |                 freezer_controller.thaw();
        |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: this `Result` may be an `Err` variant, which should be handled

    warning: unused `std::result::Result` that must be used
       --> rustjail/src/cgroups/fs/mod.rs:199:17
        |
    199 |                 freezer_controller.freeze();
        |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: this `Result` may be an `Err` variant, which should be handled

    warning: unused `std::result::Result` that must be used
       --> rustjail/src/cgroups/fs/mod.rs:365:9
        |
    365 |         cpuset_controller.set_cpus(&cpu.cpus);
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: this `Result` may be an `Err` variant, which should be handled

    warning: unused `std::result::Result` that must be used
       --> rustjail/src/cgroups/fs/mod.rs:369:9
        |
    369 |         cpuset_controller.set_mems(&cpu.mems);
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: this `Result` may be an `Err` variant, which should be handled

    warning: unused `std::result::Result` that must be used
       --> rustjail/src/cgroups/fs/mod.rs:381:13
        |
    381 |             cpu_controller.set_shares(shares);
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: this `Result` may be an `Err` variant, which should be handled

    warning: unused `std::result::Result` that must be used
       --> rustjail/src/cgroups/fs/mod.rs:385:5
        |
    385 |     cpu_controller.set_cfs_quota_and_period(cpu.quota, cpu.period);
        |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: this `Result` may be an `Err` variant, which should be handled

    warning: unused `std::result::Result` that must be used
        --> rustjail/src/cgroups/fs/mod.rs:1061:13
         |
    1061 |             cpuset_controller.set_cpus(cpuset_cpus);
         |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
         = note: this `Result` may be an `Err` variant, which should be handled

The specific case of cpu_controller.set_cfs_quota_and_period is
addressed in a way that changes the logic following a suggestion by
Liu Bin, who had just added the code.

Fixes: #750

Suggested-by: Liu Bin <bin@hyper.sh>
Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
2020-10-07 17:29:46 +02:00
2020-09-29 08:56:11 -04:00
2020-10-04 16:55:50 -07:00
2020-09-28 11:01:03 +08:00
2020-09-28 11:01:03 +08:00
2017-12-06 23:01:13 -06:00
2020-06-27 20:16:53 -07:00
2020-06-25 11:19:12 +01:00
2020-09-18 17:28:19 +08:00

Kata Containers


Welcome to Kata Containers!

The purpose of this repository is to act as a "top level" site for the project. Specifically it is used:

Raising issues

This repository is used for raising issues:

  • That might affect multiple code repositories.

  • Where the raiser is unsure which repositories are affected.

Note:

  • If an issue affects only a single component, it should be raised in that components repository.

Kata Containers repositories

CI

The CI repository stores the Continuous Integration (CI) system configuration information.

Community

The Community repository is the first place to go if you want to use or contribute to the project.

Code Repositories

Kata Containers-developed components

Agent

The kata-agent runs inside the virtual machine and sets up the container environment.

KSM throttler

The kata-ksm-throttler is an optional utility that monitors containers and deduplicates memory to maximize container density on a host.

Runtime

The kata-runtime is usually invoked by a container manager and provides high-level verbs to manage containers.

Trace forwarder

The kata-trace-forwarder is a component only used when tracing the agent process.

Additional

Hypervisor

The qemu hypervisor is used to create virtual machines for hosting the containers.

Kernel

The hypervisor uses a Linux* kernel to boot the guest image.

Documentation

The docs directory holds documentation common to all code components.

Packaging

We use the packaging to create packages for the system components including rootfs and kernel images.

Test code

The tests repository hosts all test code except the unit testing code (which is kept in the same repository as the component it tests).

Utilities

OS builder

The osbuilder tool can create a rootfs and a "mini O/S" image. This image is used by the hypervisor to setup the environment before switching to the workload.

kata-agent-ctl

kata-agent-ctl is a low-level test tool for interacting with the agent.

Web content

The www.katacontainers.io repository contains all sources for the https://www.katacontainers.io site.

Credits

Kata Containers uses packagecloud for package hosting.

Description
No description provided
Readme Apache-2.0 71 MiB
Languages
Rust 57%
Go 27%
Shell 8%
RPC 5.9%
Makefile 1%
Other 1.1%