ElektraInitiative / libelektra

Elektra serves as a universal and secure framework to access configuration settings in a global, hierarchical key database.
https://www.libelektra.org
BSD 3-Clause "New" or "Revised" License
208 stars 123 forks source link

augeas: use checkconf #977

Closed markus2330 closed 7 years ago

markus2330 commented 8 years ago

Describe what you wanted to do

Mount an augeas plugin by giving the .aug filename, e.g.:

kdb mount /etc/network/interfaces system/network/interfaces augeas lens=interfaces.aug
kdb mount /etc/network/interfaces system/network/interfaces augeas lens=/usr/share/augeas/lenses/dist/interfaces.aug

Describe what you expected

That augeas checks its configuration via checkconf at mount time and rejects (or at least warn) wrongly specified lenses. (Or even better: rename "interfaces" or "interfaces.aug" to "Interfaces.lns").

Describe what actually happened

Mount is successful, but the mountpoint does not work:

kdb ls system/network/interfaces
The command ls failed while accessing the key database with the info:
Error (#85) occurred!
Description: an Augeas error occurred
Ingroup: plugin
Module: storage
At: /home/jenkins/workspace/workspace/elektra-git-buildpackage-jessie/libelektra/src/plugins/augeas/augeas.c:461
Reason: Lens not found
Mountpoint: system/network/interfaces
Configfile: /etc/network/interfaces

The error message also does not show which Lens was tried.

System Information

For Infos about checkconf see:

markus2330 commented 8 years ago

As discussed in #1006 we also need a way for to list every possible configuration for augeas plugins. Can you also implement a way to query every possible configuration?

Thanks!