-
-
Notifications
You must be signed in to change notification settings - Fork 271
Persistence strategies not automatically applied #3123
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
Conversation
#4018 Bundle Size — 12.54MiB (+0.05%).38f1afd(current) vs 9ae1ca5 main#4017(baseline) Warning Bundle contains 2 duplicate packages – View duplicate packages Bundle metrics
Bundle size by type
Bundle analysis report Branch mherwege:persistence_no_default Project dashboard Generated by RelativeCI Documentation Report issue |
0f2616c to
3840cbd
Compare
3840cbd to
054ff5c
Compare
054ff5c to
e2c97ef
Compare
e2c97ef to
fb21f97
Compare
fb21f97 to
114227b
Compare
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
30ccec6 to
796ebf2
Compare
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
|
@florian-h05 Might I ask you for a 10 minute speed review? If there isn't anything that you think is a problem, I would merge it now together with openhab/openhab-core#4682. |
kaikreuzer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@florian-h05 As you seem to be afk right now, allow me to merge - if there's any issue with it, let's fix it in a follow-up PR.
florian-h05
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have found a number of issues I think originating from rebasing this PR after the Vue 3 upgrade and a few other issues, I will shortly open a PR to fix all my findings.
Apart from that LGTM and thanks for finally replaing the default persistence strategies with something better!
|
Could someone hav alook in my comments here: I think there'S a critical issue with persistence settings in RC1 |
Mine seems to be still used. |
Can you share a screenshot from WebUI Persistence settings? |
From the logs that you provided, it seems that the upgrader now adds a managed configuration despite the fact that you already have a textual configuration in place and during startup it picks the "new" managed config and thus it does not regard your "real" textual one anymore: If that's the case, that's indeed a very critical issue! |
|
Yes it is. Should I delete the added configuration in WebUI in order to fix? |
|
I would guess it will resolve your issue, yes. So sure, please have a try. But we will have to investigate this... |
Stop OH and then look at in userdata/jsondb a find the json file that contains the persistence configuration. Delete this file and then restart openHAB. Sorry I have not in mind the name of the generated file. Edit: file is org.openhab.core.persistence.PersistenceServiceConfiguration.json I have not such file myself. |
|
I can confirm the issue. I have a textual inmemory.persist file. When calling the upgradetool with which should not happen. During startup, I then get the warning: Looking at the PR that I merged yesterday, it indeed does not respect textual configs: |
|
For you information.
What I also saw, that the permissions for /var/lib/openhab/jsondb/org.openhab.core.persistence.PersistenceServiceConfiguration.json changed to root:root:
Maybe this happend thru update to RC1 and caused the issue? Here's my startup log after deleting persistence settings in WebUI: |
This was not the right reference, but this is the place where the file is created with root user rights; this might need to be fixed as well... Not sure yet, why unmanaged configs are not correctly identified and managed configs are created. Need to investigate. |
|
The upgrader tool should only add a managed persistence configuration for the specific service if there is no .persist file for the service. If there was a persist file and it still does, there still is a bug in the changes to the upgrade tool done yesterday. The upgrade tool lists the existing .persist files and should not add a managed persistence file for these. |
The exclusion of the unmanaged ones should be done on line 70 in that file. |
|
I've found the bug and seems I have a fix for it. |
@helmar74 When you say "changed to root:root", does this mean that this file already existed before? Does it contain any information? |
Ok, that's what I expected. So permissions were not changed, but the newly created file was simply created by the root user. |
|
Yes it looks like. Update was done with |
|
I would imagine that this can be an issue, because the runtime might not have write permission to that file, so doing changed through the Main UI might fail. |
|
It looks like @florian-h05 beat me with a solution on this. The change in distro is probably better as it effectively changes ownership. My solution just changes file permissions. |
|
I just wanted to comment that I've created openhab/openhab-distro#1847 but you were faster to comment. |
See openhab/openhab-webui#3123 (comment). Signed-off-by: Florian Hotze <[email protected]>
See openhab/openhab-webui#3123 (comment). Signed-off-by: Florian Hotze <[email protected]>
…239) See openhab/openhab-webui#3123 (comment). Signed-off-by: Florian Hotze <[email protected]>
Depends on: openhab/openhab-core#4682
This PR removes the default strategy from the persistence configuration and implements a health check on the persistence configuration.