portainer: Duplicate resources with agent endpoint
Bug description
Sometimes (not always) the Containers page has duplicate entries for many containers. Not every container is duplicated. If I reload the page several times, the problem occurs for some page reloads only.
The links are also identical except for ?nodeName=...
in the querystring. So Portainer thinks the same container (with the same task-id/slot) has been deployed to multiple nodes in the swarm.
When I click on one, I get the expected container detail page. When I click on another (with a different ?nodeName=...
in the querystring, I get an error about being unable to retrieve the container.
Expected behavior One entry in the list per container.
Steps to reproduce the issue: Happens intermittently. When it happens, page refresh might or might not fix it. Even if it does, a few more reloads will show the problem again.
Technical details:
- Portainer version:
agent-support
- Docker version (managed by Portainer): Docker for AWS 18.03.0-ce
- Platform (windows/linux): AWS/Linux
- Command used to start Portainer (
docker run -p 9000:9000 portainer/portainer
):
# Create networks for Docker services.
docker network create --driver overlay portainer-agent
# Create Portainer Agent service.
docker service create \
--env AGENT_CLUSTER_ADDR='tasks.portainer-agent' \
--limit-cpu 0.05 \
--limit-memory 10M \
--mode global \
--mount type='bind',src='/var/run/docker.sock',dst='/var/run/docker.sock' \
--name portainer-agent \
--network portainer-agent \
--reserve-cpu 0.01 \
--reserve-memory 10M \
portainer/agent:develop
# Create Portainer service.
docker service create \
--env SERVICE_PORTS=9000 \
--env VIRTUAL_HOST='https://portainer.*' \
--limit-cpu 0.05 \
--limit-memory 10M \
--mount type='volume',volume-driver='cloudstor:aws',src='portainer-data',dst='/data' \
--name portainer \
--network haproxy \
--network portainer-agent \
--reserve-cpu 0.01 \
--reserve-memory 10M \
portainer/portainer:agent-support -H 'tcp://tasks.portainer-agent:9001' --tlsskipverify
- Browser: Firefox
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 3
- Comments: 66 (46 by maintainers)
I’ve updated docker to 19.03.4, build 9013bf583a. If the issue happens again, I’ll report it here.
I think it happens when I reload the page, when it is on the container overview after a day of not using portainer. If I do a second reload all is normal again. It looks like that all containers running on the manager get duplicated to the worker node.
Just trying to give some info to try to succesfully reproduce this one…