terion
06/13/2018, 1:36 PMdpetrick
06/13/2018, 1:55 PMterion
06/13/2018, 1:56 PMdpetrick
06/13/2018, 1:59 PMterion
06/13/2018, 2:00 PMterion
06/13/2018, 2:00 PMterion
06/13/2018, 2:01 PMdpetrick
06/13/2018, 2:03 PMterion
06/13/2018, 2:07 PM{
"kind": "Ingress",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "ingress-prisma",
"namespace": "default",
"selfLink": "/apis/extensions/v1beta1/namespaces/default/ingresses/ingress-prisma",
"uid": "e5705f08-6811-11e8-b424-4eaef66759da",
"resourceVersion": "4573807",
"generation": 3,
"creationTimestamp": "2018-06-04T16:11:10Z",
"annotations": {
"<http://certmanager.k8s.io/cluster-issuer|certmanager.k8s.io/cluster-issuer>": "letsencrypt-prod",
"<http://kubectl.kubernetes.io/last-applied-configuration|kubectl.kubernetes.io/last-applied-configuration>": "{\"apiVersion\":\"extensions/v1beta1\",\"kind\":\"Ingress\",\"metadata\":{\"annotations\":{\"<http://certmanager.k8s.io/cluster-issuer\|certmanager.k8s.io/cluster-issuer\>":\"letsencrypt-prod\",\"<http://kubernetes.io/ingress.class\|kubernetes.io/ingress.class\>":\"nginx\",\"<http://kubernetes.io/tls-acme\|kubernetes.io/tls-acme\>":\"true\"},\"name\":\"ingress-prisma\",\"namespace\":\"default\"},\"spec\":{\"rules\":[{\"host\":\"<http://prisma.dev.dosvit.org.ua|prisma.dev.dosvit.org.ua>\",\"http\":{\"paths\":[{\"backend\":{\"serviceName\":\"prisma\",\"servicePort\":4466},\"path\":\"/\"}]}}],\"tls\":[{\"hosts\":[\"<http://prisma.dev.dosvit.org.ua|prisma.dev.dosvit.org.ua>\"],\"secretName\":\"prisma-tls\"}]}}\n",
"<http://kubernetes.io/ingress.class|kubernetes.io/ingress.class>": "nginx",
"<http://kubernetes.io/tls-acme|kubernetes.io/tls-acme>": "true"
}
},
"spec": {
"tls": [
{
"hosts": [
"<http://prisma.dev.dosvit.org.ua|prisma.dev.dosvit.org.ua>"
],
"secretName": "prisma-tls"
}
],
"rules": [
{
"host": "<http://prisma.dev.dosvit.org.ua|prisma.dev.dosvit.org.ua>",
"http": {
"paths": [
{
"path": "/",
"backend": {
"serviceName": "prisma",
"servicePort": 4466
}
}
]
}
}
]
},
"status": {
"loadBalancer": {
"ingress": [
{}
]
}
}
}
dpetrick
06/13/2018, 2:14 PMdpetrick
06/13/2018, 2:14 PMterion
06/13/2018, 2:16 PMwhat do you mean by multi-tenant DBhttps://www.prisma.io/docs/reference/prisma-servers-and-dbs/database-connectors/overview-eiw6ahgiet#multitenancy
terion
06/13/2018, 2:18 PMdpetrick
06/13/2018, 2:20 PMdpetrick
06/13/2018, 2:22 PMterion
06/13/2018, 2:23 PMterion
06/13/2018, 2:24 PMdpetrick
06/13/2018, 2:29 PMterion
06/13/2018, 2:31 PMdpetrick
06/13/2018, 2:36 PMterion
06/13/2018, 2:37 PMterion
06/13/2018, 2:44 PMdpetrick
06/13/2018, 2:48 PMterion
06/13/2018, 2:54 PMterion
06/13/2018, 3:22 PMterion
06/13/2018, 3:22 PMterion
06/13/2018, 3:22 PMterion
06/13/2018, 3:23 PMterion
06/13/2018, 3:24 PMterion
06/13/2018, 3:25 PMterion
06/13/2018, 3:27 PMterion
06/13/2018, 3:31 PM#!/usr/bin/env bash
REPLACE='$MUNICIPALITY_NAME:$APPLICATION_NAME:$APPLICATION_VERSION_SAFE:$PRISMA_STAGE
cat .dosvit/prisma/mysql.project.request.data | envsubst $REPLACE | curl \
--request POST --url $PRISMA_HOST:$PRISMA_PORT/cluster \
--header 'accept: application/json' --header 'content-type: application/json' \
--data @-
cat .dosvit/prisma/mysql.migrate.request.data | envsubst $REPLACE | curl \
--request POST --url $PRISMA_HOST:$PRISMA_PORT/cluster \
--header 'accept: application/json' --header 'content-type: application/json' \
--data @-
don't get how an can overlap can appearterion
06/13/2018, 3:35 PMdpetrick
06/13/2018, 9:53 PMterion
06/14/2018, 7:43 PMdpetrick
06/15/2018, 9:04 AMterion
06/21/2018, 1:08 PM% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
{
"data" : {
"addProject" : null
},
"errors" : [ {
"locations" : [ {
"line" : 2,
"column" : 5
} ],
"path" : [ "addProject" ],
"code" : 4005,
"message" : "Service with name 'stub-documents-0-0-2-beta-3' and stage 'staging' already exists",
"requestId" : "local:management:cjiok967m001x0986hebna25p"
} ]
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 680 100 351 100 329 10609 9944 --:--:-- --:--:-- --:--:-- 10968
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 3124 100 429 100 2695 3379 21233 --:--:-- --:--:-- --:--:-- 21388
}{
"data" : {
"deploy" : null
},
"errors" : [ {
"locations" : [ {
"line" : 2,
"column" : 5
} ],
"path" : [ "deploy" ],
"code" : 4008,
"message" : "You can not deploy to a service stage while there is a deployment in progress or a pending deployment scheduled already. Please try again after the deployment finished.",
"requestId" : "local:management:cjiok9a42001y0986ke0bkooc"
} ]
terion
06/21/2018, 1:08 PMterion
06/21/2018, 1:09 PMdpetrick
06/21/2018, 1:13 PMdpetrick
06/21/2018, 1:19 PMterion
06/21/2018, 11:13 PMdpetrick
06/22/2018, 9:05 AMmigrationStatus
query against the /management
GraphQL endpoint to see what is going on the the stuck deployment?terion
06/23/2018, 10:26 AMdpetrick
06/25/2018, 8:04 AMterion
06/25/2018, 3:28 PMPRISMA_HOST: <http://prisma>
PRISMA_PORT: 4466
PRISMA_STAGE: staging
PRISMA_SECRET:
PRISMA_PROJECT: stub-news-1-0-3-beta-5
PORT: 3000
APP_KEY: bf22b7ce-01ae-41f9-9cae-c5aa85f7d52b
S3_KEY:
S3_SECRET:
S3_HOST:
S3_BUCKET:
MUNICIPALITY_NAME: stub
APPLICATION_NAME: news
APPLICATION_VERSION: 1.0.3-beta.5
APPLICATION_VERSION_SAFE: 1-0-3-beta-5
container start script contains deploy and migration commands:
#!/usr/bin/env bash
REPLACE='$MUNICIPALITY_NAME:$APPLICATION_NAME:$APPLICATION_VERSION_SAFE:$PRISMA_STAGE
cat .dosvit/prisma/mysql.project.request.data | envsubst $REPLACE | curl \
--request POST --url $PRISMA_HOST:$PRISMA_PORT/cluster \
--header 'accept: application/json' --header 'content-type: application/json' \
--data @-
cat .dosvit/prisma/mysql.migrate.request.data | envsubst $REPLACE | curl \
--request POST --url $PRISMA_HOST:$PRISMA_PORT/cluster \
--header 'accept: application/json' --header 'content-type: application/json' \
--data @-
I also tried to add sleep between them — this did not help.
Also worse to mention that this bug fires not all the times. Sometimes container starts okdpetrick
06/25/2018, 3:49 PMterion
06/26/2018, 7:31 PMdpetrick
06/26/2018, 9:46 PMterion
06/27/2018, 12:10 PMterion
07/05/2018, 2:17 PMterion
07/20/2018, 12:01 PMterion
07/20/2018, 12:04 PM{
"data" : {
"deploy" : {
"clientMutationId" : null,
"migration" : {
"projectId" : "test-otg-enterprises-registry-0-0-8@staging",
"status" : "PENDING",
"applied" : 0
},
"errors" : [ ]
}
}
It looks like if application tries to access project before migration succeeds, server caches empty schema and does not recreate it after migrationdpetrick
07/20/2018, 1:43 PMterion
11/29/2018, 4:09 PMdpetrick
11/29/2018, 4:25 PMterion
11/29/2018, 4:56 PMterion
11/29/2018, 4:56 PM