-
Hello, I'm trying to use the grpc bindings from And when I try to list containers in the namespace Here is a sample of my code: #[tokio::main]
async fn main() -> anyhow::Result<()> {
tracing_subscriber::fmt().with_max_level(Level::INFO).init();
let channel = containerd_client::connect("/run/containerd/containerd.sock").await?;
let mut client = ContainersClient::new(channel.clone());
let req = ListContainersRequest::default();
let req = with_namespace!(req, "moby");
info!("{:?}", req);
let container_list = client.list(req.into_inner()).await?;
info!("{:?}", container_list.into_inner());
Ok(())
} Here is the tonic Request sended to containerd: Request { metadata: MetadataMap { headers: {"containerd-namespace": "moby"} }, message: ListContainersRequest { filters: [] }, extensions: Extensions } I have this error: Error: status: FailedPrecondition, message: "namespace is required: failed precondition", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc"} } VersionsHere is my version of containerd (at least I can get this information from containerd): And here is my dependencies from
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hi. I was able to reproduce your example above. Try this instead:
|
Beta Was this translation helpful? Give feedback.
-
@mxpv |
Beta Was this translation helpful? Give feedback.
@mxpv
You updated the tonic dependencies since
0.3.0
on git and the crates.io version is not up to date anymore, maybe a0.3.1
should be uploaded?