File tree Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ def _substrate(self) -> str:
135
135
"""Returns the substrate of the charm: vm or k8s"""
136
136
137
137
@abc .abstractmethod
138
- def is_exposed (self , relation = None ) -> bool :
138
+ def is_exposed (self , relation = None ) -> typing . Optional [ bool ] :
139
139
"""Whether router is exposed externally"""
140
140
141
141
def _cos_exporter_config (self , event ) -> typing .Optional [relations .cos .ExporterConfig ]:
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ def _tls_certificate(self) -> typing.Optional[str]:
100
100
def _tls_certificate_authority (self ) -> typing .Optional [str ]:
101
101
return self .tls .certificate_authority
102
102
103
- def is_exposed (self , relation = None ) -> bool :
103
+ def is_exposed (self , relation = None ) -> typing . Optional [ bool ] :
104
104
return self ._database_provides .is_exposed
105
105
106
106
def _reconcile_node_port (self , event ) -> None :
Original file line number Diff line number Diff line change @@ -348,10 +348,7 @@ def reconcile(
348
348
# If the host or port changes, MySQL Router will receive topology change
349
349
# notifications from MySQL.
350
350
# Therefore, if the host or port changes, we do not need to restart MySQL Router.
351
- is_charm_exposed = self ._charm .is_exposed ()
352
- socket_file_exists = self ._container .path ("/run/mysqlrouter/mysql.sock" ).exists ()
353
- require_rebootstrap = is_charm_exposed == socket_file_exists
354
- if not self ._container .mysql_router_service_enabled or require_rebootstrap :
351
+ if not self ._container .mysql_router_service_enabled :
355
352
logger .debug ("Enabling MySQL Router service" )
356
353
self ._cleanup_after_upgrade_or_potential_container_restart ()
357
354
# create an empty credentials file, if the file does not exist
You can’t perform that action at this time.
0 commit comments