Compare commits

...

3 Commits

Author SHA1 Message Date
Fupan Li
5e3917fdb2 dragonball: temp debug
temp debug for dragonball

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2026-03-22 21:25:43 +08:00
Fupan Li
c6e622f5fa CI: temp debug
a temp debug

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2026-03-17 21:26:04 +08:00
Alex Lyn
cf0c064a0a CI: Try to get kata log
DO-NOT-MERGE:Just for debugging

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
2026-03-17 16:39:20 +08:00
6 changed files with 33 additions and 1 deletions

2
Cargo.lock generated
View File

@@ -1305,6 +1305,7 @@ dependencies = [
"epoll",
"fuse-backend-rs",
"io-uring",
"kata-sys-util",
"kvm-bindings",
"kvm-ioctls",
"libc",
@@ -1477,6 +1478,7 @@ dependencies = [
"dbs-utils",
"dbs-virtio-devices",
"derivative",
"kata-sys-util",
"kvm-bindings",
"kvm-ioctls",
"lazy_static",

View File

@@ -50,6 +50,7 @@ vm-memory = { workspace = true, features = ["backend-mmap"] }
crossbeam-channel = "0.5.6"
vfio-bindings = { workspace = true, optional = true }
vfio-ioctls = { workspace = true, optional = true }
kata-sys-util = { path = "../libs/kata-sys-util" }
[dev-dependencies]
slog-async = "2.7.0"

View File

@@ -44,6 +44,7 @@ vm-memory = { workspace = true, features = ["backend-mmap"] }
sendfd = "0.4.3"
vhost-rs = { version = "0.15.0", package = "vhost", optional = true }
timerfd = "1.0"
kata-sys-util = { workspace = true}
[dev-dependencies]
vm-memory = { workspace = true, features = ["backend-mmap", "backend-atomic"] }

View File

@@ -2,9 +2,11 @@
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
use kata_sys_util::netns::NetnsGuard;
use std::any::Any;
use std::collections::HashMap;
use std::ffi::CString;
use std::fs;
use std::fs::File;
use std::io::{BufRead, BufReader, Read};
use std::marker::PhantomData;
@@ -454,6 +456,19 @@ impl<AS: GuestAddressSpace> VirtioFs<AS> {
prefetch_list_path: Option<String>,
) -> FsResult<()> {
debug!("http_server rafs");
let currentnetns = fs::read_link("/proc/self/ns/net").unwrap_or_default();
info!("========fupan====1==netns={:?}", currentnetns);
let tid = unsafe { libc::syscall(libc::SYS_gettid) as i32 };
let _netns_guard =
NetnsGuard::new("/proc/self/ns/net").map_err(|e| FsError::BackendFs(e.to_string()))?;
let netnspath = format!("/proc/{}/ns/net", tid);
let netns = fs::read_link(netnspath.as_str()).unwrap_or_default();
info!("========fupan====2==netns={:?}", netns);
info!("========fupan====3==config={:?}", config);
let file = Path::new(&source);
let (mut rafs, rafs_cfg) = match config.as_ref() {
Some(cfg) => {

View File

@@ -34,6 +34,17 @@ setup() {
[ "$pod_name" == "$result" ]
}
#@test "test network performance with nydus" {
# curl_cmd='curl -I -s -o /dev/null \
#-w "code=%{http_code} ip=%{remote_ip} dns=%{time_namelookup}s connect=%{time_connect}s tls=%{time_appconnect}s starttransfer=%{time_starttransfer}s total=%{time_total}s\n" \
#https://ghcr.io/v2/dragonflyoss/image-service/alpine/blobs/sha256:12dba7d4fae4c70e1421021dd1ef3e8a1a4f1a9369074fc912a636dd2afdd640'
#
# kubectl apply -f "${yaml_file}"
# kubectl wait --for jsonpath=status.phase=Succeeded --timeout=$timeout pod "$pod_name"
# result=$(kubectl exec "$pod_name" -- sh -c "$curl_cmd")
# echo "$result"
#}
teardown() {
# Debugging information
kubectl describe "pod/$pod_name"

View File

@@ -183,7 +183,8 @@ function run_test() {
pod=$(sudo -E crictl --timeout=20s runp -r kata-${KATA_HYPERVISOR} $dir_path/nydus-sandbox.yaml)
echo "Pod $pod created"
cnt=$(sudo -E crictl --timeout=20s create $pod $dir_path/nydus-container.yaml $dir_path/nydus-sandbox.yaml)
echo "Container $cnt created"
echo "XXXXXContainer $cnt created"
sudo -E crictl --timeout=20s start $cnt
echo "Container $cnt started"
@@ -203,6 +204,7 @@ function teardown() {
echo "Running teardown"
local rc=0
journalctl -x -t kata --since "10 minutes ago" || true
local pid
for bin in containerd-nydus-grpc nydusd; do
pid=$(pidof $bin)