3scale / zync

Zync takes your 3scale data and pushes it somewhere else, reliably.
Apache License 2.0
19 stars 20 forks source link

zync resync domain issues #236

Open duomotomo opened 5 years ago

duomotomo commented 5 years ago

I had OpenShift 3.11 and 3scale 2.5 environment. Recently i have upgraded to 3scale 2.6. Based on documentation at the end of migration process i have removed all routes and run zync domain resync with following command:

SYSTEM_SIDEKIQ_POD=$(oc get pods | grep sidekiq | awk '{print $1}') echo ${SYSTEM_SIDEKIQ_POD} oc exec -it ${SYSTEM_SIDEKIQ_POD} -- bash -c 'bundle exec rake zync:resync:domains'

After that I'v got many routes with "HostAlreadyClaimed" in my project: oc get routes: zync-3scale-api-2m5m4 HostAlreadyClaimed apicast-staging gateway edge/Redirect None zync-3scale-api-2tjhb HostAlreadyClaimed apicast-staging gateway edge/Redirect None zync-3scale-api-4dhsx HostAlreadyClaimed apicast-staging gateway edge/Redirect None zync-3scale-api-4w586 HostAlreadyClaimed apicast-production gateway edge/Redirect None zync-3scale-api-56bkj HostAlreadyClaimed apicast-staging gateway edge/Redirect None zync-3scale-api-56gcm HostAlreadyClaimed apicast-staging gateway edge/Redirect None zync-3scale-api-5br9g HostAlreadyClaimed apicast-staging gateway edge/Redirect None zync-3scale-api-5ccbj brw-api-prod-brw-apicast-production. apicast-production gateway edge/Redirect None zync-3scale-api-5cftp HostAlreadyClaimed apicast-staging gateway edge/Redirect None zync-3scale-api-5vx2b HostAlreadyClaimed apicast-staging gateway edge/Redirect None zync-3scale-api-5whgm HostAlreadyClaimed apicast-staging gateway edge/Redirect None zync-3scale-api-5x2xq api-brw-apicast-staging. apicast-staging gateway edge/Redirect None zync-3scale-api-6kpdw HostAlreadyClaimed apicast-staging gateway edge/Redirect None zync-3scale-api-6t9tl HostAlreadyClaimed apicast-staging gateway edge/Redirect None zync-3scale-api-7t665 apicast- apicast-production gateway edge/Redirect None zync-3scale-api-br694 HostAlreadyClaimed apicast-production gateway edge/Redirect None zync-3scale-api-cxbr4 HostAlreadyClaimed apicast-production gateway edge/Redirect None zync-3scale-api-czlm4 HostAlreadyClaimed apicast-staging gateway edge/Redirect None zync-3scale-api-d4c7b HostAlreadyClaimed apicast-staging gateway edge/Redirect None zync-3scale-api-jmp8c HostAlreadyClaimed apicast-staging gateway edge/Redirect None zync-3scale-api-jnrcb HostAlreadyClaimed apicast-staging gateway edge/Redirect None zync-3scale-api-jxdpj HostAlreadyClaimed apicast-staging gateway edge/Redirect None zync-3scale-api-km78n HostAlreadyClaimed apicast-staging gateway edge/Redirect None zync-3scale-api-kq2nf HostAlreadyClaimed apicast-production gateway edge/Redirect None zync-3scale-api-lzh86 HostAlreadyClaimed apicast-staging gateway edge/Redirect None

And so on. Look like because we are using path routing in our environment and public host is the same for many apis domain sync tries to create them with the same hostname. It seem this is not neccessary and should be fixed.

duomotomo commented 4 years ago

Hello, is it possible to get update?

andrewdavidmackenzie commented 4 years ago

Hi duotomo - are you a Red Hat customer for 3scale? If so, you should be able to get help resolving your issues via Support - by opening a Support case.

I'll ask people to take a look at this issue here, but will be "best effort"

thanks

mikz commented 4 years ago

We intentionally replicate each API as a Route (one to one), so it is more resilient to race conditions. Zync tries to reliably reproduce state from Porta (API object) into OpenShift (Route object). If it would start merging multiple API objects it could not reliably do its function. It opens door to race conditions and into decisions like what to do with multiple tenants etc. Multiple Route objects don't hurt and once some API is deleted (and relevant Route) others will pick that host up and keep working.

duomotomo commented 4 years ago

Hello milkz, why you need to merge anything, just don't create objects that not needed or just don't create them when path routing is enabled. Don't hate me, but now i have tens of route objects in error state and you say this is doesn't hurt, but I think it's totally wrong. Is there a possibility do disable this sync "globally", not by service?