You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When historians in modular are first installed, they do not have a valid configuration file by default. This causes the agent to die with an exception on startup. Because we are distributing the agent without source code, though, there is no place for the user to easily retrieve a configuration file without searching the documentation. While current users are accustomed to finding configuration files in the repository, we should not assume that users who first encounter VOLTTRON on Pypi will know where to look.
Since with modular, different historians have more specific agents associated with them (volttron-sqlite-historian, for instance), it should be possible to create a default configuration and place it in the configuration store on startup. For some, like the sqlite historian, this will probably just work. For more complicated databases, it will likely still need to be edited. In this case, though, the sane behavior would probably be to log an error asking the user to update the configuration before shutting down gracefully.
Describe the solution you'd like
Scenario 1 (sqlite):
User installs sqlite historian with "vctl install volttron-sqlite-historian".
User starts agent without adding a configuration file.
Agent detects that there is not a configuration file present.
Agent adds a default configuration to the configuration store and starts.
Scenario 2 (PostgreSQL):
User installs postgres historian with "vctl install volttron-postgresql-historian".
User starts agent without adding a configuration file.
Agent detects that there is not a configuration file present.
Agent adds a default configuration store and stops with error: "PostgreSQL historian must be configured before starting. Please edit the "config" file in the configuration store and then restart the agent."
Describe alternatives you've considered
The current state of affairs is that the user must be aware of how to find the configuration file before running the agent.
We could have a configuration tool which generates a template for the user.
We could simply die gracefully (without the current stack-trace) until the user creates a configuration. In this scenario, however, we should at least log a link to the appropriate documentation.
Additional context
We should keep in mind that if we automatically create a configuration and then start, that we should probably be cautious of overwriting or adding to an existing database. It would be straightforward to either check if the database uses the same vip-identity in the name or generate a different name if the default one is taken.
The text was updated successfully, but these errors were encountered:
This is only true if you don't pass an --agent-config as argument to the install path. Which I believe is how the agent should be installed in the first place. We don't require an --agent-config but it is definitely a recommended practice and should be documented as such in the readme.
When historians in modular are first installed, they do not have a valid configuration file by default. This causes the agent to die with an exception on startup. Because we are distributing the agent without source code, though, there is no place for the user to easily retrieve a configuration file without searching the documentation. While current users are accustomed to finding configuration files in the repository, we should not assume that users who first encounter VOLTTRON on Pypi will know where to look.
Since with modular, different historians have more specific agents associated with them (volttron-sqlite-historian, for instance), it should be possible to create a default configuration and place it in the configuration store on startup. For some, like the sqlite historian, this will probably just work. For more complicated databases, it will likely still need to be edited. In this case, though, the sane behavior would probably be to log an error asking the user to update the configuration before shutting down gracefully.
Describe the solution you'd like
Scenario 1 (sqlite):
Scenario 2 (PostgreSQL):
Describe alternatives you've considered
Additional context
We should keep in mind that if we automatically create a configuration and then start, that we should probably be cautious of overwriting or adding to an existing database. It would be straightforward to either check if the database uses the same vip-identity in the name or generate a different name if the default one is taken.
The text was updated successfully, but these errors were encountered: