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 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)
As per Bug: https:/ /bugs.launchpad .net/trove- integration/ +bug/1176102 trove-guestagent uses trove-guestagen t.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.taskmanag er.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-guestagen t.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 which would help taskmanager to read the conf file and send the contents to nova for guest-instantia tion. (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)