summaryrefslogtreecommitdiff
path: root/trove
diff options
context:
space:
mode:
authorwu.chunyang <wuchunyang@yovole.com>2022-08-16 23:07:37 +0800
committerwu.chunyang <wuchunyang@yovole.com>2022-08-16 23:07:37 +0800
commitc612dc64954368e7dabf8adc4b5552875c91b902 (patch)
treed0336274c00d1340f13911f987d3f976a2ae25e0 /trove
parent7d6105c9f97664ad2008a3ba0c3e0050458f3241 (diff)
downloadtrove-c612dc64954368e7dabf8adc4b5552875c91b902.tar.gz
Fix the missing of guest-agent.conf in guest vm
This PS sets the injected_config_owner to ubuntu and the injected_config_group to root. Story: 2010231 Task: 46023 Change-Id: I77f9d0332a123594eae434c6e1cc795242e4022d
Diffstat (limited to 'trove')
-rw-r--r--trove/common/cfg.py4
-rw-r--r--trove/tests/unittests/taskmanager/test_models.py5
2 files changed, 7 insertions, 2 deletions
diff --git a/trove/common/cfg.py b/trove/common/cfg.py
index 60692ac9..54dc4961 100644
--- a/trove/common/cfg.py
+++ b/trove/common/cfg.py
@@ -428,10 +428,10 @@ common_opts = [
cfg.StrOpt('injected_config_location', default='/etc/trove/conf.d',
help='Path to folder on the Guest where config files will be '
'injected during instance creation.'),
- cfg.StrOpt('injected_config_owner', default='trove',
+ cfg.StrOpt('injected_config_owner', default='ubuntu',
help='Owner of the Guest Agent directory and files to be '
'injected during instance creation.'),
- cfg.StrOpt('injected_config_group', default='trove',
+ cfg.StrOpt('injected_config_group', default='root',
help='Group of the Guest Agent directory and files to be '
'injected during instance creation.'),
cfg.StrOpt('guest_config',
diff --git a/trove/tests/unittests/taskmanager/test_models.py b/trove/tests/unittests/taskmanager/test_models.py
index 7497e1dd..3eb81b8c 100644
--- a/trove/tests/unittests/taskmanager/test_models.py
+++ b/trove/tests/unittests/taskmanager/test_models.py
@@ -253,6 +253,11 @@ class FreshInstanceTasksTest(BaseFreshInstanceTasksTest):
self.assertEqual('fake_keypair', server.key_name)
+ def test_create_instance_prepare_cloud_config(self):
+ files = {"/tmp/fake_file": "fake text"}
+ user_data = self.freshinstancetasks.prepare_cloud_config(files)
+ self.assertTrue(user_data.startswith('#cloud-config'))
+
@patch.object(DBInstance, 'get_by')
def test_create_instance_guestconfig(self, patch_get_by):
cfg.CONF.set_override('guest_config', self.guestconfig)