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

Active standby fixes #2361

Merged
merged 3 commits into from
Dec 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ endif
local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' repo add appuio https://charts.appuio.ch; \
local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' upgrade --install -n k8up k8up appuio/k8up; \
local-dev/kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' create namespace dioscuri; \
local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' repo add dioscuri https://raw.githubusercontent.com/amazeeio/dioscuri/ingress/charts ; \
local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' repo add dioscuri https://raw.githubusercontent.com/amazeeio/dioscuri/main/charts ; \
local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' upgrade --install -n dioscuri dioscuri dioscuri/dioscuri ; \
local-dev/kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' create namespace dbaas-operator; \
local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' repo add dbaas-operator https://raw.githubusercontent.com/amazeeio/dbaas-operator/master/charts ; \
Expand All @@ -905,7 +905,10 @@ endif
--set vars.rabbitHostname=172.17.0.1:5672; \
local-dev/kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' create namespace lagoon; \
local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' repo add lagoon https://uselagoon.github.io/lagoon-charts/; \
local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' upgrade --install -n lagoon lagoon-remote lagoon/lagoon-remote --set dockerHost.image.name=172.17.0.1:5000/lagoon/docker-host --set dockerHost.registry=172.17.0.1:5000; \
local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' upgrade --install -n lagoon lagoon-remote lagoon/lagoon-remote \
--set dioscuri.enabled=false \
--set dockerHost.image.name=172.17.0.1:5000/lagoon/docker-host \
--set dockerHost.registry=172.17.0.1:5000; \
local-dev/kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' -n lagoon rollout status deployment lagoon-remote-docker-host -w;
ifeq ($(ARCH), darwin)
export KUBECONFIG="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')"; \
Expand Down
4 changes: 2 additions & 2 deletions services/kubernetesmisc/src/handlers/ingressMigration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export async function ingressMigration (data) {
}
// RouteMigrates are deleted quickly, but we still have to wait before we attempt to create the new one
try {
await retry(10, hasNoRouteMigrate, 2000);
await retry(30, hasNoRouteMigrate, 2000);
} catch (err) {
throw new Error(
`${openshiftProject}: IngressMigrate not deleted`
Expand Down Expand Up @@ -273,7 +273,7 @@ export async function ingressMigration (data) {

try {
// actually run the task that updates the task
await retry(10, updateActiveStandbyTask, 2000);
await retry(30, updateActiveStandbyTask, 2000);
} catch (err) {
throw new Error(
`${openshiftProject}: active/standby task is taking too long ${err}`
Expand Down
4 changes: 2 additions & 2 deletions services/openshiftmisc/src/handlers/routeMigration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export async function routeMigration (data) {
}
// RouteMigrates are deleted quickly, but we still have to wait before we attempt to create the new one
try {
await retry(10, hasNoRouteMigrate, 2000);
await retry(30, hasNoRouteMigrate, 2000);
} catch (err) {
throw new Error(
`${openshiftProject}: RouteMigrate not deleted`
Expand Down Expand Up @@ -266,7 +266,7 @@ export async function routeMigration (data) {

try {
// actually run the task that updates the task
await retry(10, updateActiveStandbyTask, 2000);
await retry(30, updateActiveStandbyTask, 2000);
} catch (err) {
throw new Error(
`${openshiftProject}: active/standby task is taking too long ${err}`
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/active-standby/deploy-active-standby.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
body: '{ "query": "query($id: Int!) {taskById(id: $id){status}}", "variables": {"id":{{ apiresponse.json.data.switchActiveStandby.id }}}}'
register: taskresult
until: taskresult.json.data.taskById.status == "succeeded" or taskresult.json.data.taskById.status == "failed"
retries: 10
retries: 20
delay: 5
- name: "{{ testname }} - fail if task fails"
fail:
Expand Down