Open BrooklynDewolf opened 3 months ago
Did you check this on both devenv and RPM (as root)? With and without dwh/grafana/cinderlib/keycloak/etc.?
Generally speaking, we did not expose PREFIX to subsystems, but only more-specific vars, such as ENGINE_USE, ENGINE_ETC, etc. I think with an rpm build, PREFIX will be /usr, not "/".
Also, engine-backup was never designed to work in devenv. I can't believe something like the current patch will be enough for making it work. engine-setup code has tops of "if devenv: Do something else: Do something else", and I think you'll need to replicate many of these in engine-backup for it to work properly. Can you please clarify the need/use-case? Any doc with a plan? If it's for running it in a container, why do you even need to change engine-backup?
For simple stuff like changing the backup paths, you can rely on the "source_d" hooks. I don't remember anymore why we added them, but you can find on the net (very few) examples by searching for "/etc/ovirt-engine-backup/engine-backup".
The need for engine-backup to work in a development environment is because of https://github.com/oVirt/ovirt-engine/pull/930. When rebuilding the container, data is lost. At this moment, the changes that I made seem to work fine in my case.
I will look into your feedback and get back to you.
The need for engine-backup to work in a development environment is because of #930. When rebuilding the container, data is lost.
Right, but is the data important? If it's just empty DB is created by engine-setup, perhaps just let it recreate. If you only need the DB - most likely, in a dev-env - perhaps it's easier to just dump/restore the DB itself with pg_dump/pg_restore. You can write very simple wrappers for these if you want - see e.g. packaging/dbscripts/engine-psql.sh.
At this moment, the changes that I made seem to work fine in my case.
Good, but what about the other cases? That's the question :-)
I will look into your feedback and get back to you.
Good luck!
Changes introduced with this PR
Added the DEV_PREFIX value to backup paths to ensure that the correct files get found when backing up the engine
Fixed FATAL error when restoring the engine when no DWH, Cinderlib installation or Keycloak DB is used
Are you the owner of the code you are sending in, or do you have permission of the owner?
Yes