-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Error when adding devices /dev/disk/by-id/* #427
Comments
Yes, That will fix the issue. Thanks for sharing. |
Are there any other parsings doing this? |
aravindavk
added a commit
that referenced
this issue
Feb 2, 2021
If device path contains `:` character then parsing was failing. ``` $ kubectl kadalu storage-add storage-pool-1 \ --device node2:/dev/disk/by-id/usb-SanDisk_Ultra_4C530001061023116262-0:0 ``` Error: ``` The following nodes are available: node1, node2, node3, node4, node5, node6 Traceback (most recent call last): File "/Users/hfi/opt/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/Users/hfi/opt/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/local/bin/kubectl-kadalu/__main__.py", line 58, in <module> File "/usr/local/bin/kubectl-kadalu/__main__.py", line 47, in main File "/usr/local/bin/kubectl-kadalu/storage_add.py", line 231, in run File "/usr/local/bin/kubectl-kadalu/storage_add.py", line 189, in storage_add_data ValueError: too many values to unpack (expected 2) ``` Added fix to handle the parsing. Credits: Hans Fischer (https://github.com/hans-fischer) Fixes: #427 Signed-off-by: Aravinda Vishwanathapura <aravinda@kadalu.io>
Sent PR to fix the issue. #428 Thanks |
amarts
pushed a commit
that referenced
this issue
Feb 2, 2021
If device path contains `:` character then parsing was failing. ``` $ kubectl kadalu storage-add storage-pool-1 \ --device node2:/dev/disk/by-id/usb-SanDisk_Ultra_4C530001061023116262-0:0 ``` Error: ``` The following nodes are available: node1, node2, node3, node4, node5, node6 Traceback (most recent call last): File "/Users/hfi/opt/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/Users/hfi/opt/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/local/bin/kubectl-kadalu/__main__.py", line 58, in <module> File "/usr/local/bin/kubectl-kadalu/__main__.py", line 47, in main File "/usr/local/bin/kubectl-kadalu/storage_add.py", line 231, in run File "/usr/local/bin/kubectl-kadalu/storage_add.py", line 189, in storage_add_data ValueError: too many values to unpack (expected 2) ``` Added fix to handle the parsing. Credits: Hans Fischer (https://github.com/hans-fischer) Fixes: #427 Signed-off-by: Aravinda Vishwanathapura <aravinda@kadalu.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello together!
I tried to add my devices by-id because it's consistent when rebooting the cluster.
My command I execute is:
kubectl kadalu storage-add storage-pool-1 --device node2:/dev/disk/by-id/usb-SanDisk_Ultra_4C530001061023116262-0:0
The error:
The problem is that the device-id contains a ':'.
In my opinion the fix would be:
File: cli/kubectl_kadalu/storage_add.py
by changing line: 190
FROM: .split(":")
TO: .split(":", 1)
Is that a valid solution?
The text was updated successfully, but these errors were encountered: