@@ -364,7 +364,7 @@ public static void doRestartAdmin(String principal, String domainUID) {
364
364
if (info != null ) {
365
365
Domain dom = info .getDomain ();
366
366
if (dom != null ) {
367
- doCheckAndCreateDomainPresence (dom , true , null , null );
367
+ doCheckAndCreateDomainPresence (dom , false , true , null , null );
368
368
}
369
369
}
370
370
}
@@ -381,7 +381,7 @@ public static void doRollingRestartServers(String principal, String domainUID, L
381
381
if (info != null ) {
382
382
Domain dom = info .getDomain ();
383
383
if (dom != null ) {
384
- doCheckAndCreateDomainPresence (dom , false , servers , null );
384
+ doCheckAndCreateDomainPresence (dom , false , false , servers , null );
385
385
}
386
386
}
387
387
}
@@ -398,18 +398,25 @@ public static void doRollingRestartClusters(String principal, String domainUID,
398
398
if (info != null ) {
399
399
Domain dom = info .getDomain ();
400
400
if (dom != null ) {
401
- doCheckAndCreateDomainPresence (dom , false , null , clusters );
401
+ doCheckAndCreateDomainPresence (dom , false , false , null , clusters );
402
402
}
403
403
}
404
404
}
405
405
406
406
private static void doCheckAndCreateDomainPresence (Domain dom ) {
407
- doCheckAndCreateDomainPresence (dom , false , null , null );
407
+ doCheckAndCreateDomainPresence (dom , false , false , null , null );
408
+ }
409
+
410
+ private static void doCheckAndCreateDomainPresence (Domain dom , boolean explicitRecheck ) {
411
+ doCheckAndCreateDomainPresence (dom , explicitRecheck , false , null , null );
408
412
}
409
413
410
414
private static void doCheckAndCreateDomainPresence (
411
- Domain dom , boolean explicitRestartAdmin ,
412
- List <String > explicitRestartServers , List <String > explicitRestartClusters ) {
415
+ Domain dom ,
416
+ boolean explicitRecheck ,
417
+ boolean explicitRestartAdmin ,
418
+ List <String > explicitRestartServers ,
419
+ List <String > explicitRestartClusters ) {
413
420
LOGGER .entering ();
414
421
415
422
boolean hasExplicitRestarts = explicitRestartAdmin || explicitRestartServers != null || explicitRestartClusters != null ;
@@ -426,7 +433,7 @@ private static void doCheckAndCreateDomainPresence(
426
433
// Has the spec actually changed? We will get watch events for status updates
427
434
Domain current = info .getDomain ();
428
435
if (current != null ) {
429
- if (!hasExplicitRestarts && spec .equals (current .getSpec ())) {
436
+ if (!explicitRecheck && ! hasExplicitRestarts && spec .equals (current .getSpec ())) {
430
437
// nothing in the spec has changed
431
438
LOGGER .fine (MessageKeys .NOT_STARTING_DOMAINUID_THREAD , domainUID );
432
439
return ;
@@ -1274,7 +1281,7 @@ private static void dispatchPodWatch(Watch.Response<V1Pod> item) {
1274
1281
if (sko .getPod () != null ) {
1275
1282
// Pod was deleted, but sko still contains a non-null entry
1276
1283
LOGGER .info (MessageKeys .POD_DELETED , domainUID , metadata .getNamespace (), serverName );
1277
- doCheckAndCreateDomainPresence (info .getDomain ());
1284
+ doCheckAndCreateDomainPresence (info .getDomain (), true );
1278
1285
}
1279
1286
}
1280
1287
}
@@ -1307,7 +1314,7 @@ private static void dispatchServiceWatch(Watch.Response<V1Service> item) {
1307
1314
if ((channelName != null ? sko .getChannels ().get (channelName ) : sko .getService ()) != null ) {
1308
1315
// Service was deleted, but sko still contains a non-null entry
1309
1316
LOGGER .info (MessageKeys .SERVICE_DELETED , domainUID , metadata .getNamespace (), serverName );
1310
- doCheckAndCreateDomainPresence (info .getDomain ());
1317
+ doCheckAndCreateDomainPresence (info .getDomain (), true );
1311
1318
}
1312
1319
}
1313
1320
}
@@ -1336,7 +1343,7 @@ private static void dispatchIngressWatch(Watch.Response<V1beta1Ingress> item) {
1336
1343
if (clusterName != null && info .getIngresses ().get (clusterName ) != null ) {
1337
1344
// Ingress was deleted, but sko still contains a non-null entry
1338
1345
LOGGER .info (MessageKeys .INGRESS_DELETED , domainUID , metadata .getNamespace (), clusterName );
1339
- doCheckAndCreateDomainPresence (info .getDomain ());
1346
+ doCheckAndCreateDomainPresence (info .getDomain (), true );
1340
1347
}
1341
1348
}
1342
1349
}
0 commit comments