This commit is contained in:
Yatsishin Ilya 2021-05-11 16:13:26 +03:00
parent 9d159072ef
commit 6aa7c0fafc
4 changed files with 7 additions and 4 deletions

View File

@ -1854,6 +1854,7 @@ class ClickHouseInstance:
instance_config_dir = p.abspath(p.join(self.path, 'configs'))
os.makedirs(instance_config_dir)
os.chmod(instance_config_dir, stat.S_IRWXO)
logging.debug("Copy common default production configuration from {}".format(self.base_config_dir))
shutil.copyfile(p.join(self.base_config_dir, 'config.xml'), p.join(instance_config_dir, 'config.xml'))
@ -1873,6 +1874,7 @@ class ClickHouseInstance:
dictionaries_dir = p.abspath(p.join(instance_config_dir, 'dictionaries'))
os.mkdir(dictionaries_dir)
logging.debug("Copy common configuration from helpers")
# The file is named with 0_ prefix to be processed before other configuration overloads.
shutil.copy(p.join(HELPERS_DIR, '0_common_instance_config.xml'), self.config_d_dir)

View File

@ -7,12 +7,12 @@ class Layout(object):
'flat': '<flat/>',
'hashed': '<hashed/>',
'cache': '<cache><size_in_cells>128</size_in_cells></cache>',
'ssd_cache': '<ssd_cache><path>/etc/clickhouse/dictionaries/all</path></ssd_cache>',
'ssd_cache': '<ssd_cache><path>/etc/clickhouse-server/dictionaries/all</path></ssd_cache>',
'complex_key_hashed': '<complex_key_hashed/>',
'complex_key_hashed_one_key': '<complex_key_hashed/>',
'complex_key_hashed_two_keys': '<complex_key_hashed/>',
'complex_key_cache': '<complex_key_cache><size_in_cells>128</size_in_cells></complex_key_cache>',
'complex_key_ssd_cache': '<complex_key_ssd_cache><path>/etc/clickhouse/dictionaries/all</path></complex_key_ssd_cache>',
'complex_key_ssd_cache': '<complex_key_ssd_cache><path>/etc/clickhouse-server/dictionaries/all</path></complex_key_ssd_cache>',
'range_hashed': '<range_hashed/>',
'direct': '<direct/>',
'complex_key_direct': '<complex_key_direct/>'

View File

@ -41,7 +41,7 @@
<file_size>16777216</file_size>
<read_buffer_size>131072</read_buffer_size>
<write_buffer_size>1048576</write_buffer_size>
<path>/etc/clickhouse/dictionaries/radars</path>
<path>/etc/clickhouse-server/dictionaries/radars</path>
</complex_key_ssd_cache>
</layout>
<lifetime>1</lifetime>

View File

@ -31,7 +31,8 @@ def test_different_user():
with open(os.path.join(node.path, 'logs/clickhouse-server.err.log')) as log:
expected_message = "Effective user of the process \(.*\) does not match the owner of the data \(.*\)\. Run under 'sudo -u .*'\."
last_messages = ";".join(log.readlines()[-2:-1])
last_message = [row for row in log.readlines() if "Effective" in row][-1]
if re.search(expected_message, last_message) is None:
pytest.fail(