Error when several sites with the same key are present
Bug #1878239 reported by
Benjamin Allot
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Content Cache Charm |
In Progress
|
High
|
Benjamin Allot |
Bug Description
Due to manual edition in a huge set of sites, human error can lead to duplicate entries.
The charm should error when a site key is found several time and avoid writing the configuration and taking any action.
Related branches
~ballot/content-cache-charm/+git/content-cache-charm:site_unique
On hold
for merging
into
content-cache-charm:master
- Content Cache Charmers: Pending requested
-
Diff: 84 lines (+48/-3)2 files modifiedlib/utils.py (+38/-0)
reactive/content_cache.py (+10/-3)
Changed in content-cache-charm: | |
assignee: | nobody → Benjamin Allot (ballot) |
Changed in content-cache-charm: | |
status: | New → In Progress |
importance: | Undecided → Medium |
Changed in content-cache-charm: | |
importance: | Medium → High |
To post a comment you must log in.
FWIW, the current state is that the last defined site wins because it's using yaml.safe_load(). It is a good idea to have the charm detect duplicates and alert the user, also one to extend to include checking of sites (e.g. supported options, ensure sites have at least one location etc.).