-
Notifications
You must be signed in to change notification settings - Fork 123
kdb spec-mount incompatibilities #2760
Comments
Thank you for reporting this problem! It is always important to get feedback about parts that are not working as expected. A special thanks for the detailed description. test 2 is already reported in #2561 test 3 is a newly found issue. The problem here maybe is that Elektra detects that the key is not changed at all. test 4 is also a newly found issue but not surprising as cascading import/export are not yet implemented. We should fail in such cases with a "not implemented error". @Piankero in which error category would you see a "not implemented"? Maybe interface error? |
Yes, this fits perfectly into Interface errors. |
#2561 doesn't mention
No the problem actually is
Note: Caching might hide this problem as it would retrieve the whole KeySet. However, I found this bug while working on LCDproc which uses |
Are you sure? I get the same behavior in your 4 cases if I use: kdb setmeta /tests/hello/mykey type long
kdb mount hello.ecf /tests/hello type But very interesting is that: mmap caching seems to change the behavior of these tests.
Btw. test 4 also destroys spec.ini (see #2762). Maybe related is #2761. @mpranj Do you know what is going on here? We definitely need more tests with the tools. Especially for caching. (All tests should run with and without caching). |
Then the problem likely isn't spec-mount itself, but its use of cascading mountpoints. |
Could you please describe the problem (maybe in a different issue) once again? The bugs above can imho explained by broken implementation in Elektra itself of course allows to write broken configs if used improperly, e.g. not getting spec keys, removing spec keys before doing Btw. there is already a proposal to make every But imho it is also okay if the tools can circumvent the validation with a |
When there is a cache hit ( If this validation should happen in |
For me it seems like that cached spec keys suddenly appear in a non-cascading kdbGet that previously were not there, so something like: kdbGet ("/tests") returns:
then, a later kdbGet ("user/tests") returns the same keys, although this was not the case without caching. Without caching, kdbGet ("user/tests") would only return user keys and the spec plugin would only do a no-op. If it is an improvement of behavior or not is to be discussed (see #1291). |
If this really happens, then it was definitely not intended with my implementation of the cache. I always check that the parentKey is the same or below, which is not the case here. If so, it's definitely a bug and I need to check it. |
Of course, but one
As stated above, I originally encountered this problem while doing some stuff with LCDproc and
Like described above, the problem boils down to the fact that |
Unfortunately it can: if the previous
Yes, this is because of #2561. If you want validation, you currently need to use cascading keys.
Also without cache hits, kdbGet can return any number of keys. (It might even return all keys).
I need to debunk some myths:
We should write this down somewhere in the docu. What is a good place? FAQ? Is someone reading the FAQ? |
I mark this issue 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 the issue by writing a message here or create a new issue with the remainder of this issue. |
I closed this issue 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. |
test 3 fails now as expected (I updated the key names in the example above), and the other tests should fail after #3742 |
Steps to Reproduce the Problem
Assume that
spec.ni
contains:Expected Result
That all 4 tests fail, with an error message from the
type
plugin.Actual Result
test 1
fails as expected, all others (includingtest 3
succeed).Further Information
spec-mount
creates a weird cascading mountpoint. I assume this is what breaks everything.The
import
command actually also has a problem with the cascading key. It results in merge problems because thekdbGet
with the cascading key returned thespec
namespace as well, which is not part of the imported KeySet.The text was updated successfully, but these errors were encountered: