Skip to content

Commit dbcb970

Browse files
committed
Two more fixes
1 parent fb28bf5 commit dbcb970

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

operator/src/main/java/oracle/kubernetes/operator/DomainProcessorImpl.java

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ public void makeRightDomainPresence(
654654
// Has the spec actually changed? We will get watch events for status updates
655655
if (!explicitRecheck && spec != null && spec.equals(current.getSpec())) {
656656
// nothing in the spec has changed, but status likely did; update current
657-
info.setDomain(dom);
657+
existing.setDomain(dom);
658658
LOGGER.fine(MessageKeys.NOT_STARTING_DOMAINUID_THREAD, domainUID);
659659
return;
660660
}
@@ -696,8 +696,7 @@ public StartPlanStep(DomainPresenceInfo info, Step next) {
696696

697697
@Override
698698
public NextAction apply(Packet packet) {
699-
register(info);
700-
Step strategy = getNext();
699+
Step strategy = new RegisterStep(info, getNext());
701700
if (!info.isPopulated()) {
702701
strategy =
703702
Step.chain(
@@ -710,6 +709,21 @@ public NextAction apply(Packet packet) {
710709
}
711710
}
712711

712+
private static class RegisterStep extends Step {
713+
private final DomainPresenceInfo info;
714+
715+
public RegisterStep(DomainPresenceInfo info, Step next) {
716+
super(next);
717+
this.info = info;
718+
}
719+
720+
@Override
721+
public NextAction apply(Packet packet) {
722+
register(info);
723+
return doNext(packet);
724+
}
725+
}
726+
713727
private static Step readExistingPods(DomainPresenceInfo info) {
714728
return new CallBuilder()
715729
.withLabelSelectors(

0 commit comments

Comments
 (0)