Skip to content

Router reloads even with no route changes #1592

Closed

Description

@jimmidyson

Logs grow with same message:

E0404 06:50:41.931028       1 router.go:126] Error reloading router: wait: no child processes
 Reload output: + config_file=/var/lib/haproxy/conf/haproxy.config
+ pid_file=/var/lib/haproxy/run/haproxy.pid
+ old_pid=
+ path_map_file=/var/lib/haproxy/conf/os_http_be.map
+ sort -r /var/lib/haproxy/conf/os_http_be.map -o /var/lib/haproxy/conf/os_http_be.map
+ '[' -f /var/lib/haproxy/run/haproxy.pid ']'
+ old_pid=21654
+ '[' -n 21654 ']'
+ /usr/sbin/haproxy -f /var/lib/haproxy/conf/haproxy.config -p /var/lib/haproxy/run/haproxy.pid -sf 21654
[WARNING] 093/065041 (21658) : Setting tune.ssl.default-dh-param to 1024 by default, if your workload permits it you should set it to at least 2048. Please set a value >= 1024 to make this warning disappear.
E0404 06:51:05.031033       1 iowatcher.go:93] Unable to decode an event from the watch stream: read tcp 172.18.25.34:8443: use of closed network connection
E0404 06:51:05.662696       1 iowatcher.go:93] Unable to decode an event from the watch stream: read tcp 172.18.25.34:8443: use of closed network connection

The time between reloads is inconsistent, not obvious what is causing the reload.

I assume we should only be reloading router when there are actually route changes?

Activity

  1. added
    kind/bug
    on May 11, 2015
  2. pweil- commented on May 12, 2015

    @pweil-

    /cc @sdodson - this may be what we discussed in IRC today. When the loglevel is upped if you want to post the results here we can track the issue. My suspicion is that endpoints events are getting sent to the router which also causes a reload but may not be reflected as a route change.

  3. sdodson commented on May 12, 2015

    @sdodson
    Member

    Ahh cool, in my initial look timing was very consistent. Exactly 120s between process restarts, however I was not seeing logs like those above on each restart. I'll get higher level logs ASAP

  4. jimmidyson commented on May 12, 2015

    @jimmidyson
    ContributorAuthor

    Btw seems that now default log level doesn't show up when restarts happen. This would be useful for seeing changes more easily, without having to up logging level.

  5. sdodson commented on May 12, 2015

    @sdodson
    Member
    I0512 13:32:19.057038       1 plugin.go:68] Processing 1 Endpoints for Name: kubernetes (MODIFIED)
    I0512 13:32:19.057072       1 plugin.go:71]   Subset 0 : api.EndpointSubset{Addresses:[]api.EndpointAddress{api.EndpointAddress{IP:"172.16.156.11", TargetRef:(*api.ObjectReference)(nil)}}, Ports:[]api.EndpointPort{api.EndpointPort{Name:"", Port:8443, Protocol:"TCP"}}}
    I0512 13:32:19.057119       1 plugin.go:83] Modifying endpoints for default/kubernetes
    I0512 13:32:19.057141       1 router.go:120] Commiting router changes
    I0512 13:32:19.111817       1 reaper.go:24] Signal received: child exited
    I0512 13:32:19.111852       1 reaper.go:27] Waiting to reap
    I0512 13:32:19.111862       1 reaper.go:30] No more processes to reap.
    I0512 13:32:19.112078       1 plugin.go:68] Processing 1 Endpoints for Name: kubernetes-ro (MODIFIED)
    I0512 13:32:19.112096       1 plugin.go:71]   Subset 0 : api.EndpointSubset{Addresses:[]api.EndpointAddress{api.EndpointAddress{IP:"172.16.156.11", TargetRef:(*api.ObjectReference)(nil)}}, Ports:[]api.EndpointPort{api.EndpointPort{Name:"", Port:8443, Protocol:"TCP"}}}
    I0512 13:32:19.112142       1 plugin.go:83] Modifying endpoints for default/kubernetes-ro
    I0512 13:32:19.112161       1 router.go:120] Commiting router changes
    I0512 13:32:19.907364       1 reaper.go:24] Signal received: child exited
    I0512 13:32:19.907410       1 reaper.go:27] Waiting to reap
    I0512 13:32:19.907424       1 reaper.go:34] Reaped process with pid 65
    I0512 13:32:19.907434       1 reaper.go:27] Waiting to reap
    I0512 13:32:19.907442       1 reaper.go:30] No more processes to reap.
    I0512 13:32:19.907671       1 plugin.go:68] Processing 1 Endpoints for Name: router (MODIFIED)
    I0512 13:32:19.907693       1 plugin.go:71]   Subset 0 : api.EndpointSubset{Addresses:[]api.EndpointAddress{api.EndpointAddress{IP:"10.1.1.14", TargetRef:(*api.ObjectReference)(0xc208502070)}}, Ports:[]api.EndpointPort{api.EndpointPort{Name:"", Port:80, Protocol:"TCP"}}}
    I0512 13:32:19.907759       1 plugin.go:83] Modifying endpoints for default/router
    I0512 13:32:19.907781       1 router.go:120] Commiting router changes
    I0512 13:32:19.936460       1 reaper.go:24] Signal received: child exited
    I0512 13:32:19.936521       1 reaper.go:27] Waiting to reap
    I0512 13:32:19.936536       1 reaper.go:34] Reaped process with pid 70
    I0512 13:32:19.936544       1 reaper.go:27] Waiting to reap
    I0512 13:32:19.936552       1 reaper.go:30] No more processes to reap.
    I0512 13:32:21.533095       1 reaper.go:24] Signal received: child exited
    I0512 13:32:21.533134       1 reaper.go:27] Waiting to reap
    I0512 13:32:21.533156       1 reaper.go:34] Reaped process with pid 60
    I0512 13:32:21.533165       1 reaper.go:27] Waiting to reap
    I0512 13:32:21.533184       1 reaper.go:30] No more processes to reap.
    

    On the master it doesn't look like anything has changed, however the last three lines might be interesting.

    May 12 13:31:48 ose3.os1.phx2.redhat.com openshift-master[120560]: I0512 13:31:48.841758  120560 controller.go:75] Ignoring config change for default/router:1 (latestVersion=1); same as deployment default/router-1
    May 12 13:31:53 ose3.os1.phx2.redhat.com openshift-master[120560]: I0512 13:31:53.391984  120560 endpoints_controller.go:253] Finished syncing service "default/kubernetes" endpoints. (3.24us)
    May 12 13:31:53 ose3.os1.phx2.redhat.com openshift-master[120560]: I0512 13:31:53.392058  120560 endpoints_controller.go:253] Finished syncing service "default/kubernetes-ro" endpoints. (2.152us)
    May 12 13:31:53 ose3.os1.phx2.redhat.com openshift-master[120560]: I0512 13:31:53.497365  120560 endpoints_controller.go:253] Finished syncing service "default/router" endpoints. (105.282498ms)
    May 12 13:31:53 ose3.os1.phx2.redhat.com openshift-master[120560]: I0512 13:31:53.826907  120560 replication_controller.go:324] Finished syncing controller "default/router-1" (92.002us)
    May 12 13:32:05 ose3.os1.phx2.redhat.com openshift-master[120560]: I0512 13:32:05.698053  120560 nodecontroller.go:408] Nodes ReadyCondition updated. Updating timestamp: {Capacity:map[memory:{Amount:3711791104.000 Format:BinarySI} cpu:{Amount:1.000 Format:DecimalSI}] Phas
    e: Conditions:[{Type:Ready Status:True LastHeartbeatTime:2015-05-12 13:31:44 -0400 EDT LastTransitionTime:2015-05-11 17:04:05 -0400 EDT Reason:kubelet is posting ready status Message:}] Addresses:[{Type:LegacyHostIP Address:172.16.156.20}] NodeInfo:{MachineID:f45890df0415
    42529309dd26f0138be2 SystemUUID:00C7079A-5496-45C9-8FF7-427F2009BFC0 BootID:5f666649-3fcb-48c3-8f19-4bcfc7f39559 KernelVersion:3.10.0-229.4.2.el7.x86_64 OsImage:Unknown ContainerRuntimeVersion:docker://1.6.0 KubeletVersion:v0.16.2-338-gc07896e KubeProxyVersion:v0.16.2-338
    -gc07896e}}
    May 12 13:32:05 ose3.os1.phx2.redhat.com openshift-master[120560]: vs {Capacity:map[cpu:{Amount:1.000 Format:DecimalSI} memory:{Amount:3711791104.000 Format:BinarySI}] Phase: Conditions:[{Type:Ready Status:True LastHeartbeatTime:2015-05-12 13:31:59 -0400 EDT LastTransitio
    nTime:2015-05-11 17:04:05 -0400 EDT Reason:kubelet is posting ready status Message:}] Addresses:[{Type:LegacyHostIP Address:172.16.156.20}] NodeInfo:{MachineID:f45890df041542529309dd26f0138be2 SystemUUID:00C7079A-5496-45C9-8FF7-427F2009BFC0 BootID:5f666649-3fcb-48c3-8f19-
    4bcfc7f39559 KernelVersion:3.10.0-229.4.2.el7.x86_64 OsImage:Unknown ContainerRuntimeVersion:docker://1.6.0 KubeletVersion:v0.16.2-338-gc07896e KubeProxyVersion:v0.16.2-338-gc07896e}}.
    May 12 13:32:15 ose3.os1.phx2.redhat.com openshift-master[120560]: I0512 13:32:15.704630  120560 nodecontroller.go:408] Nodes ReadyCondition updated. Updating timestamp: {Capacity:map[memory:{Amount:3711791104.000 Format:BinarySI} cpu:{Amount:1.000 Format:DecimalSI}] Phas
    e: Conditions:[{Type:Ready Status:True LastHeartbeatTime:2015-05-12 13:31:59 -0400 EDT LastTransitionTime:2015-05-11 17:04:05 -0400 EDT Reason:kubelet is posting ready status Message:}] Addresses:[{Type:LegacyHostIP Address:172.16.156.20}] NodeInfo:{MachineID:f45890df041542529309dd26f0138be2 SystemUUID:00C7079A-5496-45C9-8FF7-427F2009BFC0 BootID:5f666649-3fcb-48c3-8f19-4bcfc7f39559 KernelVersion:3.10.0-229.4.2.el7.x86_64 OsImage:Unknown ContainerRuntimeVersion:docker://1.6.0 KubeletVersion:v0.16.2-338-gc07896e KubeProxyVersion:v0.16.2-338
    -gc07896e}}
    May 12 13:32:15 ose3.os1.phx2.redhat.com openshift-master[120560]: vs {Capacity:map[cpu:{Amount:1.000 Format:DecimalSI} memory:{Amount:3711791104.000 Format:BinarySI}] Phase: Conditions:[{Type:Ready Status:True LastHeartbeatTime:2015-05-12 13:32:14 -0400 EDT LastTransitio
    nTime:2015-05-11 17:04:05 -0400 EDT Reason:kubelet is posting ready status Message:}] Addresses:[{Type:LegacyHostIP Address:172.16.156.20}] NodeInfo:{MachineID:f45890df041542529309dd26f0138be2 SystemUUID:00C7079A-5496-45C9-8FF7-427F2009BFC0 BootID:5f666649-3fcb-48c3-8f19-4bcfc7f39559 KernelVersion:3.10.0-229.4.2.el7.x86_64 OsImage:Unknown ContainerRuntimeVersion:docker://1.6.0 KubeletVersion:v0.16.2-338-gc07896e KubeProxyVersion:v0.16.2-338-gc07896e}}.
    May 12 13:32:24 ose3.os1.phx2.redhat.com openshift-master[120560]: I0512 13:32:24.393957  120560 endpoints_controller.go:253] Finished syncing service "default/kubernetes" endpoints. (8.849us)
    May 12 13:32:24 ose3.os1.phx2.redhat.com openshift-master[120560]: I0512 13:32:24.394026  120560 endpoints_controller.go:253] Finished syncing service "default/kubernetes-ro" endpoints. (1.747us)
    May 12 13:32:24 ose3.os1.phx2.redhat.com openshift-master[120560]: I0512 13:32:24.397849  120560 endpoints_controller.go:253] Finished syncing service "default/router" endpoints. (3.794497ms)
    May 12 13:32:24 ose3.os1.phx2.redhat.com openshift-master[120560]: I0512 13:32:24.891467  120560 expiration_cache.go:85] Entry default/router-1: &{add:0 del:0 key:default/router-1} has expired
    May 12 13:32:24 ose3.os1.phx2.redhat.com openshift-master[120560]: I0512 13:32:24.891644  120560 controller_utils.go:98] Controller router-1 either never recorded expectations, or the ttl expired.
    May 12 13:32:24 ose3.os1.phx2.redhat.com openshift-master[120560]: I0512 13:32:24.891663  120560 replication_controller.go:324] Finished syncing controller "default/router-1" (331.815us)
    
  6. pweil- commented on May 12, 2015

    @pweil-

    might have to dig in to how the endpoints controller runs. If it is doing a periodic sync even if there are no changes this could be sending events to the router. On the router side we may be able to do a compare of the original endpoint table and new endpoint table and see if anything was actually changed to avoid the reload

  7. sdodson commented on May 12, 2015

    @sdodson
    Member

    It could be a non issue, but I've definitely made a requests to the stats server where it didn't show any routes, which leads me to believe a request during that timeframe wouldn't have been routed successfully.

  8. smarterclayton commented on May 15, 2015

    @smarterclayton
    Contributor

    The router reloading when no changes are happening has performance impacts on routes

  9. smarterclayton commented on May 15, 2015

    @smarterclayton
    Contributor

    This is P1 unless we can show the interval for the reload is going to be less than pod changes in general.

  10. modified the milestone: 0.6.0 on May 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

component/routingkind/bugpriority/P1

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions