Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition related to refresh_interval #24

Closed
kelchm opened this issue Feb 27, 2017 · 1 comment
Closed

Race condition related to refresh_interval #24

kelchm opened this issue Feb 27, 2017 · 1 comment

Comments

@kelchm
Copy link

kelchm commented Feb 27, 2017

I seem to be encountering a race condition related to configuration reloading when refresh_interval is set to the catalog default of 10 seconds.

Test Configuration

I'm testing in a Rancher environment with three hosts. Each host is running one instance of rawmind/alpine-traefik:1.1.2-1. I am automating deployments to this environment from GitLab which often results in multiple stacks being created/destroyed in a very short period of time.

docker-compose.yml

version: '2'
services:
  traefik-conf:
    image: rawmind/rancher-traefik:0.3.4-18
    network_mode: none
    volumes:
    - /opt/tools
    tty: true
    labels:
      io.rancher.scheduler.affinity:host_label: traefik_lb=true
      io.rancher.container.start_once: 'true'
      io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
      io.rancher.scheduler.global: 'true'
  traefik:
    image: rawmind/alpine-traefik:1.1.2-1
    environment:
      CONF_INTERVAL: '10'
      TRAEFIK_ACME_EMAIL: mkelch@foo.com
      TRAEFIK_ACME_ENABLE: 'false'
      TRAEFIK_ACME_ONDEMAND: 'false'
      TRAEFIK_ACME_ONHOSTRULE: 'false'
      TRAEFIK_HTTPS_ENABLE: 'false'
      TRAEFIK_HTTPS_PORT: '443'
      TRAEFIK_HTTP_PORT: '80'
    tty: true
    volumes_from:
    - traefik-conf
    ports:
    - 8000:8000/tcp
    - 80:80/tcp
    - 443:443/tcp
    labels:
      io.rancher.scheduler.affinity:host_label: traefik_lb=true
      io.rancher.sidekicks: traefik-conf
      io.rancher.container.hostname_override: container_name
      io.rancher.scheduler.global: 'true'

Symptoms

Traefik acts as if no configuration change has occurred. About a third of my deployments and up being unreachable (traefik responds with a 404 error) until I upgrade the Traefik services to force a reload.

What I've tried

I've had success in changing the refresh_interval to be less frequent. With a setting of 60 seconds I have not had a single occurrence of this issue so far.

@kelchm
Copy link
Author

kelchm commented Feb 27, 2017

After digging into this a bit more it's clear that the rules.toml file is being updated correctly, so any issue must be an upstream issue with traefik itself.

I'm going to go ahead and close this issue out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant