davidB / kubectl-view-allocations

kubectl plugin to list allocations (cpu, memory, gpu,... X utilization, requested, limit, allocatable,...)

Home Page:https://crates.io/crates/kubectl-view-allocations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error: scale not found

fungusakafungus opened this issue · comments

versions 0.6.1 and 0.6.2 always just output this for me:

$ kubectl-view-allocations
[2020-01-09T12:51:59Z ERROR kubectl_view_allocations] failed
    cli: CliOpts { namespace: None, show_zero: false, resource_name: [], group_by: [resource, node, pod] }
    error: scale not found

🤔 I need to add log into the code to have more information.
Can I send you a debug binary version (What is your OS) ?

Thanks for reporting the issue

Can I send you a debug binary version (What is your OS) ?

sure, it's apple-darwin

I compiled it with panic! instead of anyhow!
and got this:

$ RUST_BACKTRACE=1 ./target/debug/kubectl-view-allocations
thread 'main' panicked at 'scale not found', src/qty.rs:39:28
stack backtrace:
   0: std::io::Read::read_exact
   1: core::fmt::ArgumentV1::show_usize
   2: std::io::Write::write_fmt
   3: std::panicking::default_hook::{{closure}}
   4: std::panicking::default_hook
   5: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get
   6: std::panicking::begin_panic
             at /private/tmp/rust-20191221-31429-1cj4fnn/rustc-1.40.0-src/src/libstd/panicking.rs:400
   7: <kubectl_view_allocations::qty::Scale as core::str::FromStr>::from_str::{{closure}}
             at src/qty.rs:39
   8: core::option::Option<T>::ok_or_else
             at /private/tmp/rust-20191221-31429-1cj4fnn/rustc-1.40.0-src/src/libcore/option.rs:551
   9: <kubectl_view_allocations::qty::Scale as core::str::FromStr>::from_str
             at src/qty.rs:35
  10: <kubectl_view_allocations::qty::Qty as core::str::FromStr>::from_str
             at src/qty.rs:128
  11: kubectl_view_allocations::collect_from_pods::{{closure}}
             at src/main.rs:221
  12: <std::future::GenFuture<T> as core::future::future::Future>::poll::{{closure}}
             at /private/tmp/rust-20191221-31429-1cj4fnn/rustc-1.40.0-src/src/libstd/future.rs:43
  13: std::future::set_task_context
             at /private/tmp/rust-20191221-31429-1cj4fnn/rustc-1.40.0-src/src/libstd/future.rs:79
  14: <std::future::GenFuture<T> as core::future::future::Future>::poll
             at /private/tmp/rust-20191221-31429-1cj4fnn/rustc-1.40.0-src/src/libstd/future.rs:43
  15: std::future::poll_with_tls_context::{{closure}}
             at /private/tmp/rust-20191221-31429-1cj4fnn/rustc-1.40.0-src/src/libstd/future.rs:121
  16: std::future::get_task_context
             at /private/tmp/rust-20191221-31429-1cj4fnn/rustc-1.40.0-src/src/libstd/future.rs:111
  17: std::future::poll_with_tls_context
             at /private/tmp/rust-20191221-31429-1cj4fnn/rustc-1.40.0-src/src/libstd/future.rs:121
  18: kubectl_view_allocations::do_main::{{closure}}
             at src/main.rs:337
  19: <std::future::GenFuture<T> as core::future::future::Future>::poll::{{closure}}
             at /private/tmp/rust-20191221-31429-1cj4fnn/rustc-1.40.0-src/src/libstd/future.rs:43
  20: std::future::set_task_context
             at /private/tmp/rust-20191221-31429-1cj4fnn/rustc-1.40.0-src/src/libstd/future.rs:79
  21: <std::future::GenFuture<T> as core::future::future::Future>::poll
             at /private/tmp/rust-20191221-31429-1cj4fnn/rustc-1.40.0-src/src/libstd/future.rs:43
  22: std::future::poll_with_tls_context::{{closure}}
             at /private/tmp/rust-20191221-31429-1cj4fnn/rustc-1.40.0-src/src/libstd/future.rs:121
  23: std::future::get_task_context
             at /private/tmp/rust-20191221-31429-1cj4fnn/rustc-1.40.0-src/src/libstd/future.rs:111
  24: std::future::poll_with_tls_context
             at /private/tmp/rust-20191221-31429-1cj4fnn/rustc-1.40.0-src/src/libstd/future.rs:121
  25: kubectl_view_allocations::main::{{closure}}
             at src/main.rs:310
  26: <std::future::GenFuture<T> as core::future::future::Future>::poll::{{closure}}
             at /private/tmp/rust-20191221-31429-1cj4fnn/rustc-1.40.0-src/src/libstd/future.rs:43
  27: std::future::set_task_context
             at /private/tmp/rust-20191221-31429-1cj4fnn/rustc-1.40.0-src/src/libstd/future.rs:79
  28: <std::future::GenFuture<T> as core::future::future::Future>::poll
             at /private/tmp/rust-20191221-31429-1cj4fnn/rustc-1.40.0-src/src/libstd/future.rs:43
  29: tokio::runtime::enter::Enter::block_on
             at /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.8/src/runtime/enter.rs:100
  30: tokio::runtime::thread_pool::ThreadPool::block_on
             at /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.8/src/runtime/thread_pool/mod.rs:93
  31: tokio::runtime::Runtime::block_on::{{closure}}
             at /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.8/src/runtime/mod.rs:413
  32: tokio::runtime::context::enter
             at /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.8/src/runtime/context.rs:72
  33: tokio::runtime::handle::Handle::enter
             at /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.8/src/runtime/handle.rs:33
  34: tokio::runtime::Runtime::block_on
             at /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.8/src/runtime/mod.rs:408
  35: kubectl_view_allocations::main
             at src/main.rs:293
  36: std::rt::lang_start::{{closure}}
             at /private/tmp/rust-20191221-31429-1cj4fnn/rustc-1.40.0-src/src/libstd/rt.rs:61
  37: std::panicking::try::do_call
  38: panic_unwind::imp::find_eh_action::{{closure}}
  39: std::sys_common::cleanup
  40: std::rt::lang_start
             at /private/tmp/rust-20191221-31429-1cj4fnn/rustc-1.40.0-src/src/libstd/rt.rs:61
  41: kubectl_view_allocations::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

got it: scientific notation.
I have a pod with memory limit = 3145728e3

Thanks I'll make a release when back to home.

Can you tried 0.6.4 ?

0.6.4 works for me!