Comment 3 for bug 1176102

Revision history for this message
Sushil Kumar (sushil-kumar2) wrote :

As per Bug trove-guestagent uses trove-guestagent.conf.sample directly placed inside the rsync'd trove code from host.

This piece of code comes from the "trove-guest" service start-up file inside trove-integration, where the configuration file is mapped to sample file.

Now while doing a research found that code is already available in _create_server in trove.taskmanager.models, which is used to create an instance in our case, to create the file "/etc/trove-guestagent.conf" but this method was not able to work because of a false evaluating condition "if os.path.isfile(CONF.get('guest_config')):".

Problem was because guest_config was derived from "pybasedir" as '$pybasedir/etc/trove/trove-guestagent.conf.sample' in trove.common.cfg, however the correct location for the etc was the parent of pybasedir.

So to resolve the bug,

1. We need to first correct the guest_config default location, in trove, which would help taskmanager to read the conf file and send the contents to nova for guest-instantiation. (https://review.openstack.org/64539)

2. Correct the service start-up file in trove-integration to point to the built-up conf file in /etc. (https://review.openstack.org/64543)