Skip to content

Commit b0034ad

Browse files
authored
Merge pull request #148 from arangodb-helper/config-update-spec
Added proposal to update existing arangod.conf files
2 parents e087ef2 + 5dd8ed3 commit b0034ad

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

docs/arangod_conf_update_spec.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# ArangoDB Config File Update Proposal
2+
3+
## Context
4+
5+
The ArangoDB starter creates config files for all the `arangod` process
6+
it starts. These config files contain various settings such as authentication
7+
and server addresses.
8+
9+
The user is allowed to manually edit these config files.
10+
11+
Once the starter has created such a config file, it currently never touches
12+
it again. This means that when you specify something else on the commandline
13+
of the starter, it will not be reflected in the config file.
14+
For example, when you initially run the starter without authentication
15+
enabled and you later run it with authencation enabled, the database
16+
will still run without authentication.
17+
18+
This causes confusion.
19+
20+
This proposal intends to change that in a way that:
21+
22+
- Is less confusing for the user
23+
- Still makes it possible to make manual changes to the config files
24+
25+
## Proposed changes
26+
27+
We propose that the starter adds a hash to each generated config file.
28+
This hash reflects the content of the config file, without any comments or
29+
blank lines or spacing.
30+
31+
When the starter runs again and finds an existing config file, is re-calculates
32+
a hash based on the current content of the config file and compares it with the hash
33+
stored in the config file.
34+
35+
If these hashes are the same, the config file has not been modified by the user.
36+
In this case, the starter will update the config file according to its current
37+
commandline options, except for those settings that are immutable.
38+
39+
When the user tries to change an immutable setting, the starter will yield a warning.
40+
41+
If the hashes are different, the config file has been modified by the user.
42+
In that case, the starter will not modify the config file, but yield warnings
43+
about all settings in the config file that conflict with the current commandline
44+
options of the starter.
45+
46+
## Immutable settings
47+
48+
The following settings are considered immutable:
49+
50+
- Storage engine
51+
52+
## Hash details
53+
54+
The hash of a config file is stored in a single line in the config file
55+
that looks like this:
56+
57+
```text
58+
# CONTENT-HASH: <hex encoded hash value>
59+
```

0 commit comments

Comments
 (0)