Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump procfs from 0.15.1 to 0.16.0 #2490

Merged
merged 2 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 22 additions & 97 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/libcgroups/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cgroupsv2_devices = ["rbpf", "libbpf-sys", "errno", "libc", "nix/dir"]

[dependencies]
nix = { version = "0.27.1", features = ["signal", "user", "fs"] }
procfs = "0.15.1"
procfs = "0.16.0"
oci-spec = { version = "~0.6.4", features = ["runtime"] }
fixedbitset = "0.4.2"
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/libcontainer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ nix = { version = "0.27.1", features = [
] }
oci-spec = { version = "~0.6.4", features = ["runtime"] }
once_cell = "1.18.0"
procfs = "0.15.1"
procfs = "0.16.0"
prctl = "1.0.0"
libcgroups = { version = "0.3.0", path = "../libcgroups", default-features = false }
libseccomp = { version = "0.3.0", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/libcontainer/src/container/tenant_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ impl TenantContainerBuilder {
}

let init_process = procfs::process::Process::new(container.pid().unwrap().as_raw())?;
let ns = self.get_namespaces(init_process.namespaces()?)?;
let ns = self.get_namespaces(init_process.namespaces()?.0)?;
let linux = LinuxBuilder::default().namespaces(ns).build()?;

spec.set_process(Some(process)).set_linux(Some(linux));
Expand Down
2 changes: 1 addition & 1 deletion crates/libcontainer/src/process/intel_rdt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub fn find_resctrl_mount_point() -> Result<PathBuf> {
let process = Process::myself()?;
let mount_infos = process.mountinfo()?;

for mount_info in mount_infos.iter() {
for mount_info in mount_infos.0.iter() {
// "resctrl" type fs can be mounted only once.
if mount_info.fs_type == "resctrl" {
let path = mount_info.mount_point.clone().canonicalize().map_err(|err| {
Expand Down
2 changes: 1 addition & 1 deletion crates/libcontainer/src/rootfs/mount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ impl Mount {
tracing::error!("failed to get mount info: {}", err);
MountError::Other(err.into())
})?;
let parent_mount = find_parent_mount(rootfs, mount_infos)?;
let parent_mount = find_parent_mount(rootfs, mount_infos.0)?;

// check parent mount has 'shared' propagation type
if parent_mount
Expand Down
2 changes: 1 addition & 1 deletion crates/youki/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ liboci-cli = { version = "0.3.0", path = "../liboci-cli" }
nix = "0.27.1"
once_cell = "1.18.0"
pentacle = "1.0.0"
procfs = "0.15.1"
procfs = "0.16.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tabwriter = "1"
Expand Down
6 changes: 3 additions & 3 deletions crates/youki/src/commands/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::{fs, path::Path};
use anyhow::Result;
use clap::Parser;
use libcontainer::user_ns;
use procfs::{CpuInfo, Meminfo};
use procfs::{CpuInfo, Current, Meminfo};

#[cfg(feature = "v2")]
use libcgroups::{common::CgroupSetup, v2::controller_type::ControllerType};
Expand Down Expand Up @@ -101,11 +101,11 @@ fn find_parameter<'a>(content: &'a str, param_name: &str) -> Option<&'a str> {

/// Print Hardware information of system
pub fn print_hardware() {
if let Ok(cpu_info) = CpuInfo::new() {
if let Ok(cpu_info) = CpuInfo::current() {
println!("{:<18}{}", "Cores", cpu_info.num_cores());
}

if let Ok(mem_info) = Meminfo::new() {
if let Ok(mem_info) = Meminfo::current() {
println!(
"{:<18}{}",
"Total Memory",
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ num_cpus = "1.16"
oci-spec = { version = "0.6.4", features = ["runtime"] }
once_cell = "1.18.0"
pnet_datalink = "0.34.0"
procfs = "0.15.1"
procfs = "0.16.0"
rand = "0.8.5"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down