Skip to content

Commit 6d098cf

Browse files
author
雪染
committed
Merge branch 'dev_3.2.2' into 'master'
Dev 3.2.2 See merge request oceanbase/ob-deploy!460
2 parents 9a47188 + a45db3d commit 6d098cf

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

_errno.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class InitDirFailedErrorMessage(object):
170170
EC_OBSERVER_GET_MEMINFO_FAIL = OBDErrorCodeTemplate(2011, "{server}: fail to get memory info.\nPlease configure 'memory_limit' manually in configuration file")
171171
EC_OBSERVER_FAIL_TO_START_OCS = OBDErrorCodeTemplate(2012, 'Failed to start {server} obshell')
172172
EC_OBSERVER_UNKONE_SCENARIO = OBDErrorCodeTemplate(2013, 'Unknown scenario: {scenario}')
173-
EC_CPU_NOT_SUPPORT_AVX = OBDErrorCodeTemplate(2014, "{server}'s cpu not support avx")
173+
EC_CPU_NOT_SUPPORT_AVX = OBDErrorCodeTemplate(2014, "{server}'s cpu does not support avx")
174174
EC_OBSERVER_DISABLE_AUTOSTART = OBDErrorCodeTemplate(2015, "{server}: Failed to modify the configuration of the automatic startup. Please check whether the current user has sudo permissions")
175175

176176
WC_OBSERVER_SYS_MEM_TOO_LARGE = OBDErrorCodeTemplate(2010, '({server}): system_memory too large. system_memory should be less than {factor} * memory_limit/memory_limit_percentage.')

plugins/oceanbase/3.1.0/environment_check.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ def environment_check(plugin_context, work_dir_empty_check=True, generate_config
135135
err.EC_CONFLICT_PORT.format(server=ip, port=port),
136136
[err.SUG_USE_OTHER_PORT.format()]
137137
)
138-
if not client.execute_command('lscpu | grep Flags | grep avx').stdout:
138+
139+
if len(re.findall(r'(^avx\s+)|(\s+avx\s+)|(\s+avx$)', client.execute_command('lscpu | grep avx').stdout)) == 0 and os.uname()[4].startswith('x86'):
139140
critical(server, 'cpu', err.EC_CPU_NOT_SUPPORT_AVX.format(server=server), [err.SUG_CHANGE_SERVER.format()])
140141
if success:
141142
for ip in servers_net_interface:

plugins/oceanbase/4.0.0.0/environment_check.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,7 @@ def environment_check(plugin_context, work_dir_empty_check=True, generate_config
134134
err.EC_CONFLICT_PORT.format(server=ip, port=port),
135135
[err.SUG_USE_OTHER_PORT.format()]
136136
)
137-
138-
if not client.execute_command('lscpu | grep Flags | grep avx').stdout:
137+
if len(re.findall(r'(^avx\s+)|(\s+avx\s+)|(\s+avx$)', client.execute_command('lscpu | grep avx').stdout)) == 0 and os.uname()[4].startswith('x86'):
139138
critical(server, 'cpu', err.EC_CPU_NOT_SUPPORT_AVX.format(server=server), [err.SUG_CHANGE_SERVER.format()])
140139
if success:
141140
for ip in servers_net_interface:

plugins/oceanbase/4.2.0.0/environment_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def environment_check(plugin_context, work_dir_empty_check=True, generate_config
134134
err.EC_CONFLICT_PORT.format(server=ip, port=port),
135135
[err.SUG_USE_OTHER_PORT.format()]
136136
)
137-
if not client.execute_command('lscpu | grep Flags | grep avx').stdout:
137+
if len(re.findall(r'(^avx\s+)|(\s+avx\s+)|(\s+avx$)', client.execute_command('lscpu | grep avx').stdout)) == 0 and os.uname()[4].startswith('x86'):
138138
critical(server, 'cpu', err.EC_CPU_NOT_SUPPORT_AVX.format(server=server), [err.SUG_CHANGE_SERVER.format()])
139139
if success:
140140
for ip in servers_net_interface:

0 commit comments

Comments
 (0)