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

nanopi-neo: mtda-service: Probe of the shared storage device failed #296

Closed
WiseLord opened this issue Jun 9, 2023 · 1 comment · Fixed by #310
Closed

nanopi-neo: mtda-service: Probe of the shared storage device failed #296

WiseLord opened this issue Jun 9, 2023 · 1 comment · Fixed by #310
Assignees
Milestone

Comments

@WiseLord
Copy link

WiseLord commented Jun 9, 2023

I have built recent (master) version of mtda for the nanopi-neo board and booted it.
I'm using default config documentation proposes:

root@mtda:/home/mtda# cat /etc/mtda/config
[console]
variant=usbf

[power]
variant=gpio
gpio=gpiochip0@203

[keyboard]
variant=hid
device=/dev/hidg0

[storage]
variant=usbf

Partly this works, when mtda device boots, the relay "clicks" and powers off DUT.

But when I check "mtda-service", it's in "dead" state. When trying to run it manually, the following output is observed:

root@mtda:/home/mtda# /usr/sbin/mtda-service -n
Probe of the shared storage device failed!
Failed to start the MTDA server!

USB flash drive is properly visible as /dev/sda.

Due to failed service, mtda-cli doesn't work:

root@mtda:/home/mtda# mtda-cli 
Traceback (most recent call last):
  File "/usr/bin/mtda-cli", line 736, in <module>
    app.main()
  File "/usr/bin/mtda-cli", line 725, in main
    status = cmds[cmd](stuff)
  File "/usr/bin/mtda-cli", line 270, in console_cmd
    return cmds[cmd](args)
  File "/usr/bin/mtda-cli", line 82, in console_interactive
    self.target_info()
  File "/usr/bin/mtda-cli", line 535, in target_info
    locked = " (locked)" if client.target_locked() else ""
  File "/usr/lib/python3.9/dist-packages/mtda/client.py", line 306, in target_locked
    return self._impl.target_locked(self._session)
  File "/usr/lib/python3/dist-packages/zerorpc/core.py", line 278, in <lambda>
    return lambda *args, **kargs: self(method, *args, **kargs)
  File "/usr/lib/python3/dist-packages/zerorpc/core.py", line 270, in __call__
    return self._process_response(request_event, bufchan, timeout)
  File "/usr/lib/python3/dist-packages/zerorpc/core.py", line 227, in _process_response
    reply_event = bufchan.recv(timeout=timeout)
  File "/usr/lib/python3/dist-packages/zerorpc/channel.py", line 255, in recv
    event = self._input_queue.get(timeout=timeout)
  File "src/gevent/queue.py", line 334, in gevent._gevent_cqueue.Queue.get
  File "src/gevent/queue.py", line 349, in gevent._gevent_cqueue.Queue.get
  File "src/gevent/queue.py", line 326, in gevent._gevent_cqueue.Queue.__get_or_peek
    SimpleQueue = _PySimpleQueue
  File "src/gevent/_waiter.py", line 151, in gevent._gevent_c_waiter.Waiter.get
  File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  File "src/gevent/_greenlet_primitives.py", line 65, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  File "src/gevent/_gevent_c_greenlet_primitives.pxd", line 35, in gevent._gevent_c_greenlet_primitives._greenlet_switch
zerorpc.exceptions.LostRemote: Lost remote after 40s heartbeat

When I comment out sections [console] and [storage] in /etc/mtda/config, mtda service is running and commands like mtda target on work.

So, it looks like "usbf" doesn't work, at least with recent builds.

@WiseLord
Copy link
Author

WiseLord commented Jun 9, 2023

I must have been a little rushed to open the issue...

Adding file=/dev/sda to [storage] section solved the problem.

Anyway, this moment is worth adding to nanopi-neo guide to have things working "out of the box".

Feel free to close the issue.

@chombourger chombourger self-assigned this Aug 3, 2023
@chombourger chombourger added this to the 0.20 milestone Aug 3, 2023
chombourger added a commit to chombourger/mtda that referenced this issue Aug 3, 2023
Since a backing file/device is required for the emulated storage
to work, let's make sure setup instructions for the NanoPI NEO
have "file" set to "/dev/sda" to make sure people end-up with
something that works out of the box.

Fixes: siemens#296
Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
chombourger added a commit that referenced this issue Aug 3, 2023
Since a backing file/device is required for the emulated storage
to work, let's make sure setup instructions for the NanoPI NEO
have "file" set to "/dev/sda" to make sure people end-up with
something that works out of the box.

Fixes: #296
Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants