eclipse-volttron / volttron-core

Other
7 stars 10 forks source link

vctl install does not create default identities for agents associated with known_identities #119

Open bonicim opened 2 years ago

bonicim commented 2 years ago

Describe the bug

When installing the Volttron Platform Driver using the following command:

vctl install volttron-platform-driver --start

the Volttron platform will use the package name as the identity. For example, when running vctl status, we see the identity as the following:

UUID AGENT                            IDENTITY                     TAG STATUS          HEALTH
5 volttron-platform-driver-0.1.1a3 volttron-platform-driver-0.1.1a3_1

The expected behavior of vctl install is to use the default 'platform.driver' as defined in volttron-core.

Consequently, we expect to see the following after running vctl status:

UUID AGENT                            IDENTITY                     TAG STATUS          HEALTH
2 volttron-platform-driver-0.1.1a3 platform.driver                  running [6647]  GOOD

In addition, if a wheel already has an IDENTITY as seen in this PR, vctl install will still not pickup the IDENTITY file.

To check if an IDENTITY was installed for an agent, navigate to the virtual environment's 'site-packages' directory and open the directory of the agent that you installed.

To Reproduce Steps to reproduce the behavior:

  1. Start volttron
  2. Run vctl install volttron-platform-driver
  3. Run vctl status to see the incorrect name

Expected behavior

Below is sample output of running vctl status:

UUID AGENT                            IDENTITY                     TAG STATUS          HEALTH
5 volttron-platform-driver-0.1.1a3 volttron-platform-driver-0.1.1a3_1

Note how IDENTITY is not defined as 'platform.driver` and instead uses the package name.

schandrika commented 1 year ago

We cannot include default identity in a file named "IDENTITY" for all agents as this will create name clash when multiple agent wheels are installed in the same python environment. We should default identity to a file -default-vip-id so that we can identity default vip-ids of different agents without any name clash