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

Problems with shared-folder bind mounts #428

Open
bmcgair opened this issue Aug 30, 2019 · 2 comments

Comments

@bmcgair
Copy link

commented Aug 30, 2019

Seems to happen EVERY time I try to add a share. Starting to lose faith in this project...

Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; systemctl restart 'sharedfolders-containers.mount' 2>&1' with exit code '1': Job for sharedfolders-containers.mount failed. See "systemctl status sharedfolders-containers.mount" and "journalctl -xe" for details.

Error #0:
OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; systemctl restart 'sharedfolders-containers.mount' 2>&1' with exit code '1': Job for sharedfolders-containers.mount failed.
See "systemctl status sharedfolders-containers.mount" and "journalctl -xe" for details. in /usr/share/php/openmediavault/system/process.inc:182
Stack trace:
#0 /usr/share/php/openmediavault/system/systemctl.inc(86): OMV\System\Process->execute(Array, 1)
#1 /usr/share/php/openmediavault/system/systemctl.inc(160): OMV\System\SystemCtl->exec('restart', NULL, false)
#2 /usr/share/openmediavault/engined/module/sharedfolders.inc(66): OMV\System\SystemCtl->restart()
#3 /usr/share/openmediavault/engined/rpc/config.inc(194): OMVModuleSharedfolders->startService()
#4 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
#5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(149): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
#7 /usr/share/php/openmediavault/rpc/serviceabstract.inc(565): OMV\Rpc\ServiceAbstract->OMV\Rpc{closure}('/tmp/bgstatusoQ...', '/tmp/bgoutput98...')
#8 /usr/share/php/openmediavault/rpc/serviceabstract.inc(159): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
#9 /usr/share/openmediavault/engined/rpc/config.inc(213): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
#10 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
#11 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#12 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
#13 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
#14 {main}

@votdev

This comment has been minimized.

Copy link
Collaborator

commented Sep 1, 2019

The problem seems to be that the mount point is still in use by Docker (according to the shared folder name) when the system tries to re-mount the bind mount.

You can test that yourself. Stop Docker and the error message should disapear when you press the 'Apply' button.

The problem here is that the sub-system does not know about that the shared-folder is used by a service.

By the way, as the documentation states that the /sharedfolders/<xyz> bind mounts should never be used by any service to prevent such situations. They are only meant to be used on CLI (if the user runs a command manually) or by cron scripts that are created by users. Maybe the Docker plugin or any other service breaks this rule. I don't know which plugins you are using. All (official) OMV plugins consider this rule. I think this is something that the external plugin developers need to keep in mind.

@votdev votdev changed the title Apply button fails with ugly error Problems with shared-folder bind mounts Sep 1, 2019

@votdev votdev added the known issue label Sep 1, 2019

@votdev

This comment has been minimized.

Copy link
Collaborator

commented Sep 5, 2019

See #432 and #433

@votdev votdev added 4.x 5.x labels Sep 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.