Running "yunohost storage disk info" fails due to error in script?

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 13.0.8
How are you able to access your server: The webadmin
SSH
Are you in a special context or did you perform specific tweaking on your YunoHost instance ?: Not that I know of.

Describe your issue

Running “yunohost storage disk info” fails with a python script error

Share relevant logs or error messages

Traceback (most recent call last):
File “/usr/bin/yunohost”, line 116, in
main()
~~~~^^
File “/usr/bin/yunohost”, line 105, in main
yunohost.cli(
~~~~~~~~~~~~^
debug=opts.debug,
^^^^^^^^^^^^^^^^^
…<4 lines>…
parser=parser,
^^^^^^^^^^^^^^
)
^
File “/usr/lib/python3/dist-packages/yunohost/init.py”, line 59, in cli
ret = moulinette.cli(
args,
…<5 lines>…
umask=0o022,
)
File “/usr/lib/python3/dist-packages/moulinette/init.py”, line 152, in cli
).run(args, output_as=output_as, timeout=timeout)
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py”, line 546, in run
ret = self.actionsmap.process(args, timeout=timeout)
File “/usr/lib/python3/dist-packages/moulinette/actionsmap.py”, line 581, in process
return func(**arguments)
TypeError: storage_disk_info() missing 1 required positional argument: ‘name’

Hi, thank you for the report. :slight_smile:

Bear in mind this feature is still experimental (but you might have guess it :sweat_smile:)

The contributors are currently focused on YunoHost 13 right now. I’ll propose a fix but it might take some time to be released.

If you are savvy enough, it lies in /usr/share/yunohost/actionsmap.yml, around line 2408 you need to add the last two lines of this snippet:

                # storage_disks_info
                info:
                    action_help: Get hard-drive information
                    api: GET /storage/disk/info/<name>
                    arguments:
                        name:
                            help: Disk to get information from

The name itself can be read from yunohost storage disk list.

That works, but the size of my SSD’s is shown as 0(“df -h” shows the correct size.). I think there are more issues. I do not need the functionality, was just poking around.