Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

dini: new default storage plugin #1693

Closed
3 of 4 tasks
markus2330 opened this issue Nov 2, 2017 · 6 comments
Closed
3 of 4 tasks

dini: new default storage plugin #1693

markus2330 opened this issue Nov 2, 2017 · 6 comments
Assignees
Milestone

Comments

@markus2330
Copy link
Contributor

markus2330 commented Nov 2, 2017

To be done

Specification

For the migration from dump to ini, we need a new plugin dini (for "default ini" or "dump ini"), which is capable of:

  • reading (but not writing!) dump files with the dump plugin, if it fails reading a dump file it falls back to:
  • reading and writing ini files with the ini plugin
  • instantiate plugins the ini plugin needs (null, binary, dir2leaf dir2leafvalue #106, others?)

Every error that happens during reading with dump is ignored, including the absence of the dump plugin. This allows the dump plugin to be dropped as hard dependency. (e.g. people not caring about migration but caring about the plugins ini needs). People might even remove the dump plugin on purpose because it obviously causes some overhead.

The goals of the plugin are:

  • to be completely compatible with Elektra installations that currently use dump
  • safely migrate such installations to use INI
  • to be able to represent every KeySet, like dump did (thus null, binary, dir2leaf, etc. plugins might be needed)

When we have dini, we can make the plugin dump obsolete. dump then only is used in the context of dini: to migrate legacy Elektra installations.

What do you think?

@sanssecours
Copy link
Member

What do you think?

Sounds good to me (as long as I do not have to implement the dini plugin ☺️).

@sanssecours sanssecours removed their assignment Nov 9, 2017
@markus2330 markus2330 assigned markus2330 and unassigned tom-wa Nov 24, 2017
@markus2330
Copy link
Contributor Author

Are there any further leftovers for dini except merging #1722?

To everyone: Please use and test the dini plugin.

@sanssecours
Copy link
Member

Are there any further leftovers for dini except merging #1722?

I do not think so. I already pulled the relevant changes from #1722 into the master branch yesterday.

To everyone: Please use and test the dini plugin.

I currently use dini as default storage. As far as I can tell everything works fine 🙌.

@markus2330
Copy link
Contributor Author

In particular we should test if partly-done-migrations (like /etc/kdb/default.ecf is already INI but /etc/kdb/elektra.ecf is not) causes any problems.

Do we need (or can we) add other plugins to be used within INI? (null, binary, directoryvalue?)

@sanssecours
Copy link
Member

Do we need (or can we) add other plugins to be used within INI? (null, binary, directoryvalue?)

  • Adding directoryvalue to INI does not work, as already stated here.

  • Fortunately using Base64 (binary) together with INI seems to work. I already added a Markdown Shell Recorder test for this situation in one of the branches of my repo.

  • I do not think it makes much sense to also use the null plugin together with INI, since INI already supports empty values. If we use Base64, then INI can also save empty binary values.

@sanssecours sanssecours mentioned this issue Dec 13, 2017
12 tasks
@markus2330
Copy link
Contributor Author

markus2330 commented Dec 13, 2017

Thank you, that is great, then let us add binary/base64. (I added it in the top post)

@markus2330 markus2330 mentioned this issue Dec 19, 2017
7 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants