Skip to content

Commit 8170d3d

Browse files
Dev: migration: refine message wording (jsc#PED-11808)
(cherry picked from commit 97fa52b)
1 parent 022915e commit 8170d3d

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

crmsh/migration.py

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,7 @@ def write_in_color(f, color: str, text: str):
124124
f.write(text)
125125

126126
def end(self):
127-
if self.has_problems:
128-
self.write_in_color(sys.stdout, constants.RED, '[FAIL]\n\n')
129-
else:
130-
self.write_in_color(sys.stdout, constants.GREEN, '[PASS]\n\n')
131-
if not self.has_problems:
132-
self.write_in_color(sys.stdout, constants.GREEN, '[PASS]\n')
127+
sys.stdout.write('\n')
133128

134129

135130
def migrate():
@@ -171,8 +166,9 @@ def check(args: typing.Sequence[str]) -> int:
171166
else:
172167
check_remote_yield = check_remote()
173168
next(check_remote_yield)
174-
print('------ corosync @ localhost ------')
169+
print('------ localhost ------')
175170
check_local(handler)
171+
print('------ cib ------')
176172
check_global(handler)
177173
handler.end()
178174
match handler:
@@ -189,12 +185,12 @@ def check(args: typing.Sequence[str]) -> int:
189185
print('****** summary ******')
190186
if ret == 0:
191187
CheckResultInteractiveHandler.write_in_color(sys.stdout, constants.GREEN, '[INFO]')
192-
sys.stdout.write(' Please run "crm cluster health sles16 --fix" on on any one of above nodes, after migrating all the nodes to SLES 16.\n')
188+
sys.stdout.write(' Please run "crm cluster health sles16 --fix" on on any one of above nodes.\n')
193189
CheckResultInteractiveHandler.write_in_color(sys.stdout, constants.GREEN, '[PASS]')
194190
sys.stdout.write(' This cluster is good to migrate to SLES 16.\n')
195191
else:
196192
CheckResultInteractiveHandler.write_in_color(sys.stdout, constants.RED, '[FAIL]')
197-
sys.stdout.write(' Please fix all the "FAIL" problems above before migrating to SLES 16.\n')
193+
sys.stdout.write(' The pacemaker cluster stack can not migrate to SLES 16.\n')
198194
return ret
199195

200196

@@ -340,8 +336,7 @@ def _check_unsupported_corosync_transport(handler: CheckResultHandler, dom):
340336
except KeyError:
341337
# looks like a corosync 3 config
342338
return
343-
handler.handle_tip(f'Corosync transport "{transport}" will be deprecated in corosync 3.', [
344-
'Run "crm health sles16 --fix" to migrate it to transport "knet".',
339+
handler.handle_tip(f'Corosync transport "{transport}" will be deprecated in corosync 3. Please use knet.', [
345340
])
346341

347342

@@ -529,8 +524,7 @@ def check_unsupported_resource_agents(handler: CheckResultHandler):
529524
ocf_resource_agents.append(resource_agent)
530525
elif resource_agent.m_class == 'stonith':
531526
if resource_agent.m_type == 'external/sbd':
532-
handler.handle_tip('stonith:external/sbd will be removed.', [
533-
'* Please replace it with stonith:fence_sbd.'
527+
handler.handle_tip('stonith:external/sbd will be removed. Please use stonith:fence_sbd', [
534528
])
535529
else:
536530
stonith_resource_agents.append(resource_agent)
@@ -606,6 +600,5 @@ def _check_removed_resource_agents(
606600

607601
def _check_ocfs2(handler: CheckResultHandler, cib: lxml.etree.Element):
608602
if cibquery.has_primitive_filesystem_with_fstype(cib, 'ocfs2'):
609-
handler.handle_problem(False, 'OCFS2 is not supported in SLES 16.', [
610-
'* Before migrating to SLES 16, replace it with GFS2.',
603+
handler.handle_problem(False, 'OCFS2 is not supported in SLES 16. Please use GFS2.', [
611604
])

0 commit comments

Comments
 (0)