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

-n arg with nerdctl cp doesn't work #1334

Closed
vsaisujeeth opened this issue Aug 22, 2022 · 5 comments
Closed

-n arg with nerdctl cp doesn't work #1334

vsaisujeeth opened this issue Aug 22, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@vsaisujeeth
Copy link

Description

namespace arg doesn't work with nerdctl cp cmd. I had to set CONTAINERD_NAMESPACE env variable to overcome this issue.

Steps to reproduce the issue

No response

Describe the results you received and expected

-n should change namespace

What version of nerdctl are you using?

latest

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

No response

Host information

No response

@vsaisujeeth vsaisujeeth added the kind/unconfirmed-bug-claim Unconfirmed bug claim label Aug 22, 2022
@junnplus junnplus added bug Something isn't working and removed kind/unconfirmed-bug-claim Unconfirmed bug claim labels Aug 26, 2022
@junnplus
Copy link
Member

$ sudo nerdctl -n test cp Makefile nginx:/home
FATA[0000] 1 errors: [no such object: nginx]
FATA[0000] failed to execute [/usr/local/bin/nerdctl container inspect --mode=native --format={{json .Process}} nginx]: exit status 1

@fahedouch fahedouch self-assigned this Aug 30, 2022
@fahedouch
Copy link
Member

fahedouch commented Aug 31, 2022

it is a desired behaviour because -n is nonPersistentAlias (conflicts with nerdctl logs -n) : https://github.com/containerd/nerdctl/blob/master/cmd/nerdctl/main.go#L144 .

plz use : nerdctl --namespace test cp Makefile nginx:/home

@fahedouch fahedouch added kind/question and removed bug Something isn't working labels Aug 31, 2022
@AkihiroSuda
Copy link
Member

it is a desired behaviour because -n is nonPersistentAlias (conflicts with nerdctl logs -n)

Still shouldn't conflict with cp

@AkihiroSuda AkihiroSuda reopened this Aug 31, 2022
@AkihiroSuda AkihiroSuda added bug Something isn't working and removed kind/question labels Aug 31, 2022
@fahedouch
Copy link
Member

fahedouch commented Aug 31, 2022

@AkihiroSuda hmm right it should only conflict with logs . I will fix this

@yardenshoham
Copy link
Contributor

Is this closed since #1375 was merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants