@@ -59,7 +59,7 @@ def test_create_and_destroy_sr(self, pool_with_linstor, provisioning_type, stora
5959
6060
6161def get_drbd_status (host : Host , resource : str ):
62- logging .debug (f"[ { host } ] Fetching DRBD status for resource `{ resource } `..." )
62+ logging .debug ("[%s ] Fetching DRBD status for resource `%s `...", host , resource )
6363 return json .loads (host .ssh (["drbdsetup" , "status" , resource , "--json" ]))
6464
6565def get_corrupted_resources (host : Host , resource : str ):
@@ -76,7 +76,7 @@ def get_corrupted_resources(host: Host, resource: str):
7676 ]
7777
7878def wait_drbd_sync (host : Host , resource : str ):
79- logging .info (f"[ { host } ] Waiting for DRBD sync on resource `{ resource } `..." )
79+ logging .info ("[%s ] Waiting for DRBD sync on resource `%s `...", host , resource )
8080 host .ssh (["drbdadm" , "wait-sync" , resource ])
8181
8282
@@ -131,22 +131,22 @@ def test_resynchronization(
131131 for peer in conn .get ("peer_devices" , [])
132132 if peer .get ("peer-disk-state" , "" ) == "UpToDate"
133133 )
134- logging .info (f "Elected `{ other_host } ` as peer for verification and repair" )
134+ logging .info ("Elected `%s ` as peer for verification and repair" , other_host )
135135 except StopIteration :
136136 pytest .fail ("Could not find an UpToDate peer host" )
137137
138138 corrupted = None
139139 max_attempts = 3
140140 # Attempting several times since testing revealed `drbdadm verify` can be flaky
141141 for attempt in range (1 , max_attempts + 1 ):
142- logging .info (f "`drbdadm verify` attempt { attempt } / { max_attempts } " )
143- logging .info (f"[ { other_host } ] Running DRBD verify for ` { resource_name } ` ..." )
142+ logging .info ("`drbdadm verify` attempt %d/%d" , attempt , max_attempts )
143+ logging .info ("[%s ] Running DRBD verify for %s ...", other_host , resource_name )
144144 other_host .ssh (["drbdadm" , "verify" , f"{ resource_name } :{ hostname } /0" ])
145145 wait_drbd_sync (other_host , resource_name )
146146
147147 corrupted_resources = get_corrupted_resources (other_host , resource_name )
148148 if not corrupted_resources :
149- logging .warning (f "No corrupted resources found on attempt #{ attempt } " )
149+ logging .warning ("No corrupted resources found on attempt #%d" , attempt )
150150 continue
151151 for res_name , peer_name , out_of_sync in corrupted_resources :
152152 if res_name == resource_name and peer_name == hostname :
@@ -156,7 +156,7 @@ def test_resynchronization(
156156 if not corrupted :
157157 pytest .fail (f"Failed to identify corrupted resource after { max_attempts } attempts" )
158158
159- logging .info (f "Invalidating remote resource `{ resource_name } `..." )
159+ logging .info ("Invalidating remote resource `%s `..." , resource_name )
160160 other_host .ssh ([
161161 "drbdadm" , "invalidate-remote" ,
162162 f"{ resource_name } :{ hostname } /0" ,
0 commit comments