Commit 28d11e5
Fix file backup in dev mode & fatal restore error
When we were restoring the engine from a previous backup where there was
no active DWH, Cinderlib installation or Keycloak database, the restore
always resulted in a FATAL error:
-----
Rewriting /home/build/ovirt//etc/ovirt-engine/engine.conf.d/10-setup-database.conf
/home/build/ovirt/share/ovirt-engine/bin/engine-backup.sh: line 1419: [: syntax error: `-' unexpected
FATAL: Can not find /home/build/ovirt//etc/ovirt-engine/engine.conf.d/10-setup-cinderlib-database.conf
-----
This is because of a check that is done when restoring the engine. When
only restoring the DB, the value ${CHANGE_DB_CREDENTIALS} is true and
because of the OR condition, the false flag of for example
${CHANGE_DWH_CREDENTIALS} does not have any effect anymore. By removing
the CHANGE_DB_CREDENTIALS variable, the condition is dependent on only
the flag of the type of DB itself and the DB_USER.
There were also issues with running a backup in development mode.
When installing a development environment, a path is specified with the
PREFIX value. However, the backup script does not change the paths that
it is backing up relative to this PREFIX value. This has also been
changed to that it does backup the correct paths.
Signed-off-by: Brooklyn Dewolf <[email protected]>1 parent 80d6b0f commit 28d11e5
2 files changed
+18
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | | - | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | | - | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
119 | | - | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| |||
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| |||
1413 | 1414 | | |
1414 | 1415 | | |
1415 | 1416 | | |
| 1417 | + | |
1416 | 1418 | | |
1417 | | - | |
1418 | | - | |
1419 | | - | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
1420 | 1422 | | |
1421 | 1423 | | |
1422 | 1424 | | |
| |||
1876 | 1878 | | |
1877 | 1879 | | |
1878 | 1880 | | |
1879 | | - | |
| 1881 | + | |
1880 | 1882 | | |
1881 | 1883 | | |
1882 | 1884 | | |
| |||
0 commit comments