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

multiresolver: unwanted error if glob fails #2277

Open
markus2330 opened this Issue Oct 23, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@markus2330
Contributor

markus2330 commented Oct 23, 2018

Steps to Reproduce the Problem

mkdir -p /folder
kdb mount -R multifile -c storage="ini",pattern="*/*",resolver="resolver" /folder /kdb
kdb ls /kdb

Expected Result

Successful return without any keys.

Actual Result

The command kdb ls failed while accessing the key database with the info:
Sorry, the error (#172) occurred ;(
Description: multifile globbing failed.
Reason: glob(/folder/*/*) failed with no matches
Ingroup: plugin
Module: multifile
At: /home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA@2/libelektra/src/plugins/multifile/multifile.c:408
Mountpoint: /kdb
Configfile: /folder

The main problem of this behavior is that you need to touch at least one file to be able to set any keys, so Elektra cannot bootstrap from an empty folder (which is possible for regularly mounted config files: empty keysets are represented with removed files there).

To fully resolve the issue:

  • return in "kdbGet" successful also without glob matches
  • create files if new keys are present
  • remove files if all keys for a file are removed

System Information

  • Elektra Version: master
  • Operating System or Docker Container?
  • Versions of other relevant software?

Further Log Files and Output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment