Errors during NAS sleeptime on Network Mount
See original GitHub issueWhat version of Music Assistant has the issue?
2022.6.4
The problem
running the shell_command to mount my Nas drive (testing that functionality) works just fine. But… my Nas is turned down to sleepmode each night for power savings.
I didnt realize that could inhibit the Music Assistant install using that Mount until now.
this morning I see below errors in the logs, which of course relate to that. To my surprise the actual files in the mount are still visible, via the Media/Local files browser, and, more surprisingly after reading that error in the log, to Music Assistant!
I would have expected Music Assistant, sensing the drive had disappeared, to update the DB and delete those files in a whim. It didnt.
Only posting it here as a FYI, and maybe for others to test this functionality.
There’s no use in automating some kind of re-mount in the morning, because this is a) a temporary configuration, and b) it wont prevent MA from wiping during the Sleep time.
Yet is is something to consider going forward, in designing the MA’s core support for NAS drives, and not delete the DB during sleep time
How to reproduce
mount a nas drive with the known shell command
auto sleep the Nas
Relevant log output
Logger: music_assistant
Source: /usr/local/lib/python3.9/site-packages/music_assistant/mass.py:244
First occurred: 02:22:24 (2 occurrences)
Last logged: 05:22:25
Job [Library sync for provider Filesystem] failed with error [Errno 112] Host is down: '/media/music/nas/mp3/Wagner'.
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/music_assistant/music_providers/filesystem.py", line 155, in sync_library
async for entry in scantree(self.config.path):
File "/usr/local/lib/python3.9/site-packages/music_assistant/music_providers/filesystem.py", line 67, in scantree
async for subitem in scantree(entry.path):
File "/usr/local/lib/python3.9/site-packages/music_assistant/music_providers/filesystem.py", line 67, in scantree
async for subitem in scantree(entry.path):
File "/usr/local/lib/python3.9/site-packages/music_assistant/music_providers/filesystem.py", line 67, in scantree
async for subitem in scantree(entry.path):
File "/usr/local/lib/python3.9/site-packages/music_assistant/music_providers/filesystem.py", line 65, in scantree
for entry in await loop.run_in_executor(None, os.scandir, path):
OSError: [Errno 112] Host is down: '/media/music/nas/mp3/Wagner'
Additional information
No response
What version of Home Assistant Core are your running
2022.7.0.dev20220621
What type of installation are you running?
Home Assistant OS
Issue Analytics
- State:
- Created a year ago
- Comments:11 (5 by maintainers)
Top GitHub Comments
Well not sure I like that approach . Sure I have the Wol service, but I don’t want to wake the Nas during those off hours.
I agee with Marcel this should be a integration feature and not rely on external mount commands.
if the source is offline, just wait until it’s back online again and continue. Don’t manipulate the Db if source is offline
@erkr Eric, please re-open this is not resolved