rancher: 422 Body: [code=NotUnique, fieldName=name] when multiple containers use the same data volume
Rancher Version: v1.0.0
Docker Version: 1.10.3
OS: Ubuntu 15.04
Steps to Reproduce:
docker-compose --verbose up
with this docker-compose.yml
:
app:
image: mageinferno/magento2-nginx:1.9.9-2
ports:
- "80:80"
links:
- phpfpm
- db
volumes_from:
- appdata
environment:
- APP_MAGE_MODE=production
- VIRTUAL_HOST=shop.liquid-trading.de
labels:
io.rancher.sidekicks: appdata, phpfpm, setup
appdata:
image: tianon/true
volumes:
- "/var/magento2/src:/src"
phpfpm:
image: mageinferno/magento2-php:7.0.2-fpm-1
links:
- db
volumes_from:
- appdata
environment:
- APP_MAGE_MODE=default
- PHP_MEMORY_LIMIT=2048M
db:
image: mariadb:10.1.10
ports:
- "3306:3306"
volumes:
- "/var/magento2/mysql:/var/lib/mysql"
setup:
image: mageinferno/magento2-php:7.0.2-fpm-1
command: /usr/local/bin/mage-setup
links:
- db
volumes_from:
- appdata
Results:
INFO[0000] Creating service app
DEBU[0000] Creating service app with hash: digest.ServiceHash{Service:"04eebe96f990ab64972bce5193990b3e6b8da6a2", LaunchConfig:"792bc6859a5da13c8bc9ce0c1e502a38418e3cb8", SecondaryLaunchConfigs:map[string]string{"appdata":"a4b64bdd56ddf28671e2787b7fc583bb55b804e9", "phpfpm":"5b7975000c982dd602f04b98f9e55f63d3b9817c", "setup":"367a2ef15c2a8d522e9f05f9ed23229eb02b05bd"}}
ERRO[0000] Failed Creating app : Bad response statusCode [422]. Status [422 status code 422]. Body: [code=NotUnique, fieldName=name] from [http://rancher.storyx.company:8080/v1/services]
Expected:
Spinning up all containers.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 20 (4 by maintainers)
I get same issue with v1.6.10…
Tested it with
Elasticsearch Cluster 5.5.1
package, getting the same error with different services inside same package.It happens once you deploy the package from catalog, you remove it and immediately redeploy it with same name.
Redeploy 1 failing es-data service…
Redeploy 2 failing es-client service…
Waiting a couple of minutes between remove and redeploy the package, issue doesn’t occur…
It seems a race condition, Services are removed async and some of them could still exist transitioning to removed once the stack is already removed. Redeploying so quickly from the catalog could eventually generates status code 422, notUnique service name error.