Commit f9ea9723 authored by Geoff Simmons's avatar Geoff Simmons

Don't check the dataplane reload state if none has ever been initiated.

parent 3d491ec8
......@@ -200,6 +200,12 @@ func (hc *Controller) updateLoadStatus(inst *haproxyInst) error {
// XXX initiate load
}
if inst.status.dplaneState.ID == "" {
hc.log.Infof("Offloader instance %s: no known TLS config "+
"reload state", inst.name)
return nil
}
hc.log.Debugf("Offloader instance %s: checking reload state: %s",
inst.name, inst.status.dplaneState.ID)
reloaded, state, err := inst.dplane.Reloaded(inst.status.dplaneState.ID)
......@@ -311,6 +317,7 @@ func (hc *Controller) updateInstance(inst *haproxyInst, spec *Spec) error {
return fmt.Errorf("Offloader instance %s: TLS config %s load "+
"failed or status unknown: %v", inst.name, spec, state)
case InProgress:
inst.status.dplaneState = state
hc.log.Debugf("Offloader instance %s: checking reload state: "+
"%s", inst.name, inst.status.dplaneState.ID)
reloaded, state, err := inst.dplane.Reloaded(
......@@ -431,7 +438,6 @@ func (hc *Controller) removeOffldrInstances(
switch state.Status {
case Succeeded:
inst.status.dplaneState = state
hc.log.Infof("Offloader instance %s: TLS config "+
"sucessfully deleted at %s", inst.name,
state.Timestamp.Format(time.RFC3339))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment