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

default config and mountpoints #4446

Closed
13 tasks
markus2330 opened this issue Aug 25, 2022 · 5 comments
Closed
13 tasks

default config and mountpoints #4446

markus2330 opened this issue Aug 25, 2022 · 5 comments

Comments

@markus2330
Copy link
Contributor

markus2330 commented Aug 25, 2022

In #4407 (comment) @kodebach proposed to make bootstrap storage != default storage. The proposal there, imho, moves too much complexity to the build system. I propose following alternative, reaching the same goal but reducing complexity from the build system.

An Elektra installation should come with following mountpoints by default (names all singular, see #4472 #4452):

  • / (i.e. user: system: dir: spec:, see drop cascading mountpoints/backends? #4428)
  • system:/info/elektra/constant/#0/current (constants plugin)
  • system:/info/elektra/metadata/#0/current (METADATA.ini)
  • system:/info/elektra/contract/#0/current (CONTRACT.ini)
  • system:/info/elektra/uname/#0/current (uname plugin)
  • system:/info/elektra/desktop/#0/current (desktop plugin)
  • system:/sys/host/#0 (hosts plugin)
  • system:/sys/fstab/#0
  • /sw/elektra/kdb/#0/current (i.e. spec: (via improved specload, see problems with specload #4032 remove specload plugin #4444) user: system: dir:, see drop cascading mountpoints/backends? #4428)
  • /sys/odbc/#0 (user: and system: /etc/odbc.ini and $HOME/.odbc.ini)
  • probably some other files in /etc we have good support for
  • enable all global plugins
  • configuration for recording

A script should do this mountpoints during installation. A user is free to recall this script later, to get different file formats, file paths or file names for root (e.g. from kdb mount-default toml default.ini, kdb mount-default xerces default.xml or even kdb mount-default sql <connection> so that everything goes to an SQL-database.), only the bootstrap file is more-or-less fixed (only changeable via symlinks or similar).

With these mountpoints by default, it does not matter anymore what the default storage is, as it is unused. We could mount "error" by default (during bootstrap phase, with error message that kdb mount-default needs to be executed).

@kodebach @flo91 @hannes99 what do you think?

@kodebach
Copy link
Member

it does not matter anymore what the default storage is, as it is unused

Not true, the default storage plugin is still used, if no storage plugin is defined during mounting. However, that is a tooling issue, so the default should be defined there.

only the bootstrap file is more-or-less fixed

And that is the really important issue that you did not address at all. The bootstrap file must always be readable because otherwise no kdbOpen can succeed. To reduce the potential causes for an error, I wanted to separate the bootstrap backend and use a minimal and very fixed setup instead of the vaguely defined default storage plugin. It would be really hard to diagnose bootstrap issues, when every installation of Elektra could use different plugins for bootstrap.

@markus2330
Copy link
Contributor Author

This issue is about a proposal to introduce default mountpoints via the normal mount mechanism and disable the current "default mountpoints" (replace by using an error plugin, which cannot be used by accident). It is not about improvements of the bootstrapping. Please open a different issue if you want to discuss these parts.

Not true, the default storage plugin is still used, if no storage plugin is defined during mounting. However, that is a tooling issue, so the default should be defined there.

Yes, this is a totally different default (not using the one from CMake) and can be changed by tooling (at least for resolver we currently have /sw/elektra/kdb/#0/current/resolver. We should add something similar for storage, too.)

Btw. maybe we should have something like /sw/elektra/tools/#0/current/ for config shared across different tools.

use a minimal and very fixed setup instead of the vaguely defined default storage plugin

It is very fixed (can only be changed via symlinks). There is a tool to change these symlinks but this only makes obvious what could be done in any case. If we want it or not: you can always replace libraries with other compatible libraries. We simply don't have control over which resolver or storage will be used for bootstrapping, even a hard-coded dlopen can (easily) be tricked by admins in a different lib to be used.

It would be really hard to diagnose bootstrap issues, when every installation of Elektra could use different plugins for bootstrap.

I cannot remember a case where these parts actually caused problems. As said above, further discussions about bootstrapping please elsewhere.

@kodebach
Copy link
Member

This issue is about a proposal to introduce default mountpoints via the normal mount mechanism and disable the current "default mountpoints" (replace by using an error plugin, which cannot be used by accident). It is not about improvements of the bootstrapping. Please open a different issue if you want to discuss these parts.

Okay, but you started by referencing one of my comments. In that comment my goal was not to change the current default mountpoint setup, but to separate the bootstrap backend. So I continued my comments from there....

It is very fixed (can only be changed via symlinks).

There is still quite a few moving parts. For example, the bootstrap file is not defined by an absolute path.

And yes, you can always swap the shared libraries. But what I dislike is that by using symlinks we kind of encourage it. This makes it seem like using a different setup for bootstrap might be supported. That's exactly what I want to avoid, since supporting such a thing would be a nightmare.

@markus2330 markus2330 changed the title default mountpoints default config and mountpoints Sep 30, 2022
@markus2330 markus2330 mentioned this issue May 16, 2023
19 tasks
Copy link

I mark this stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping by writing a message here or create a new issue with the remainder of this issue.
Thank you for your contributions 💖

@github-actions github-actions bot added the stale label May 16, 2024
Copy link

I closed this now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it or create a new issue with the remainder of this issue.
Thank you for your contributions 💖

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants