-
Notifications
You must be signed in to change notification settings - Fork 644
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
WIP: Fix 4352 #4353
base: master
Are you sure you want to change the base?
WIP: Fix 4352 #4353
Conversation
74ce9d2
to
2a9184d
Compare
One issue to note here this does remove
A migration will have to be made to migrate this key to the new keys. Primary domains will also have to migrate if Flow for migration.
I'm new to how migrations work and will need help or at least some pointers on how to test migrations, I have created a migration |
2a9184d
to
b4caaad
Compare
Signed-off-by: Jeremy-Boyle <[email protected]>
b4caaad
to
dd14147
Compare
@NHellFire @sestary Any idea how we can sync from the database file back into opnsense for transfers ? I have solved the issue with the journal restarts, running rndc sync, freeze and thaw poplulates the db file now. But is still removed on config save. Looks like we would have to parse the db file and update the model, I'm not sure what the best option to do this would be ? |
This is one option that i see for example, i would like to prevent opening the config file if possible. But this is a option, that potentially could have a cron or something that sits and watches for when it needs to update. |
An ideal solution would be to parse the journal with
Alternatively, rather than processing all the individual updates manually, we could just process the updated zone and delete any records from the opnsense config that are no longer in the zone:
We'd need to ensure that the journal is has been applied to the opnsense config any time we're listing or modifying the zone to avoid conflicts. Both formats are easy enough to parse, I'm just not sure how to go about integrating that |
Hi @NHellFire , yes i thought of that same example and started writing some code to do that. One option i was thinking was to hook it with the PHP, to open the file and create the record and handle the relations, However, this would have a issue with that you would have to have a button to sync it that the user would have to push or you could hook it to do the check every time someone goes to look at it. Both didn't really seem like good options. I have not looked around for any examples, but would it be possible to add a php based file cron that would run periodically that would allow this ? That way we can avoid manually editing the config ? What do you think about this ? When user goes to page -> function will run manually when looking at any records for that zone -> adds them before grabbing the records -> records are populated in the ui. This is a potential example plugins/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/Api/RecordController.php Line 60 in 598cf8c
Cron -> syncs at a configurable time interval that can be set by the user?
This could be a good way forward, however once we sync it with the config, it will move that record into the primary db. With the fix that i have here it will add it to the primary with syncing / freezing, that removes it from the journal . So always reading the journal as the might not be 100% i would have to check how that works. |
This issue fixes #4352