Skip to content

Service order printing improvements#195

Merged
DmitriiRabenok merged 4 commits into
mainfrom
fix/service-order-print
Jul 2, 2025
Merged

Service order printing improvements#195
DmitriiRabenok merged 4 commits into
mainfrom
fix/service-order-print

Conversation

@theboringstuff
Copy link
Copy Markdown
Collaborator

@theboringstuff theboringstuff commented Jun 30, 2025

Problem

Need to improve services order printing. Currently it does not prints details for custom modules/services. This is how it looks currently (move site-2), there is no information on custom service operation:

2025-06-30 10:59:10,516 [DEBUG] sm-client.print_service_order(60): Service order by dependency:
2025-06-30 10:59:10,516 [DEBUG] sm-client.print_service_order(62): --------------------
2025-06-30 10:59:10,516 [DEBUG] sm-client.print_service_order(64): customService
2025-06-30 10:59:10,516 [DEBUG] sm-client.print_service_order(69): ------ Stage 1 -------
2025-06-30 10:59:10,516 [DEBUG] sm-client.print_service_order(74): serviceA ( -> active on site-2 -> standby on site-1 )
2025-06-30 10:59:10,516 [DEBUG] sm-client.print_service_order(74): serviceC ( -> standby on site-1 -> active on site-2 )
2025-06-30 10:59:10,516 [DEBUG] sm-client.print_service_order(69): ------ Stage 2 -------
2025-06-30 10:59:10,516 [DEBUG] sm-client.print_service_order(74): serviceB ( -> standby on site-1 -> active on site-2 )
2025-06-30 10:59:10,516 [DEBUG] sm-client.print_service_order(76): Done. ----------------

Solution

  • order no longer prints for status/list commands, because it does not make sense for these commands, they have no specific order
  • improved output a bit, to make it more consistent and lest cluttered
  • order now prints operation details for custom services, for example (move site-2)
2025-06-30 11:01:15,679 [DEBUG] sm-client.print_service_order(63): Service order by dependency:
2025-06-30 11:01:15,679 [DEBUG] sm-client.print_service_order(78): ------ Stage 1 -------
2025-06-30 11:01:15,679 [DEBUG] sm-client.print_service_order(92): customService: standby on site-1
2025-06-30 11:01:15,679 [DEBUG] sm-client.print_service_order(78): ------ Stage 2 -------
2025-06-30 11:01:15,679 [DEBUG] sm-client.print_service_order(96): serviceA: active on site-2 -> standby on site-1
2025-06-30 11:01:15,680 [DEBUG] sm-client.print_service_order(96): serviceC: standby on site-1 -> active on site-2
2025-06-30 11:01:15,680 [DEBUG] sm-client.print_service_order(78): ------ Stage 3 -------
2025-06-30 11:01:15,680 [DEBUG] sm-client.print_service_order(96): serviceB: standby on site-1 -> active on site-2
2025-06-30 11:01:15,680 [DEBUG] sm-client.print_service_order(78): ------ Stage 4 -------
2025-06-30 11:01:15,680 [DEBUG] sm-client.print_service_order(92): customService: active on site-2
2025-06-30 11:01:15,680 [DEBUG] sm-client.print_service_order(102): ------ Done ------

@theboringstuff theboringstuff changed the title Fix/service order print Service order printing improvements Jun 30, 2025
@theboringstuff theboringstuff marked this pull request as ready for review June 30, 2025 06:07
Comment thread sm-client Outdated
@DmitriiRabenok DmitriiRabenok merged commit bf74ee0 into main Jul 2, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants