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

Remove unwrap when mirrord agent is created #191

Closed
infiniteregrets opened this issue Jul 8, 2022 · 5 comments
Closed

Remove unwrap when mirrord agent is created #191

infiniteregrets opened this issue Jul 8, 2022 · 5 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@infiniteregrets
Copy link
Contributor

error when there is no kubeconfig

root ➜ /workspaces/mirrord (test) $ target/debug/mirrord exec -c --pod-name ok ls
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Failed to load kube-config

Caused by:
    0: failed to infer config: in-cluster: (failed to read the default namespace: No such file or directory (os error 2)), kubeconfig: (failed to read kubeconfig from '"/root/.kube/config"': No such file or directory (os error 2))
    1: failed to read kubeconfig from '"/root/.kube/config"': No such file or directory (os error 2)
    2: No such file or directory (os error 2)', mirrord-layer/src/lib.rs:76:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Aborted (core dumped)

we need to remove this https://github.com/metalbear-co/mirrord/blob/main/mirrord-layer/src/lib.rs#L75 unwrap in lib.rs and handle the error

@infiniteregrets infiniteregrets added the good first issue Good for newcomers label Jul 8, 2022
@ddjerqq
Copy link
Contributor

ddjerqq commented Jul 11, 2022

sounds doable

@infiniteregrets
Copy link
Contributor Author

@ddjerqq hi! thanks for the interest. should I assign you the issue?

@ddjerqq
Copy link
Contributor

ddjerqq commented Jul 11, 2022

you're welcome and yeah totally

@infiniteregrets
Copy link
Contributor Author

thanks and done! let us know if you need any help here or on discord!

ddjerqq added a commit to ddjerqq/mirrord that referenced this issue Jul 11, 2022
@infiniteregrets
Copy link
Contributor Author

closed through #198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants