avalon icon indicating copy to clipboard operation
avalon copied to clipboard

Remove hard coding of /etc/avalon path in code

Open manojgop opened this issue 5 years ago • 1 comments
trafficstars

manojgop avatar Feb 06 '20 09:02 manojgop

I see /etc/avalon hard-coded here:

./shared_kv_storage/setup.py:conf_dir = "/etc/avalon"
./shared_kv_storage/kv_storage/remote_lmdb/lmdb_listener.py:    return '/etc/avalon'

Directory /etc/avalon is a reasonable choice of a default config directory. Certainly better than directory$TCF_HOME/config, especially once Avalon becomes packaging and we stop running Avalon under a mixed source/object/configuration directory ($TCF_HOME). But there must be a way to override the location. For example,

  • $AVALON_CONFIG with default /etc/avalon
  • $AVALON_HOME with default /opt/avalon
  • $AVALON_VAR with default /var/lib/avalon

This is based on the traditional UNIX/Linux practice of separating configuration, executible/read-only files, and writable data files in separate directories (and therefore possibly separate file systems).

danintel avatar Feb 20 '20 19:02 danintel