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

zync resync domain issues #236

Open
duomotomo opened this issue Aug 22, 2019 · 4 comments
Open

zync resync domain issues #236

duomotomo opened this issue Aug 22, 2019 · 4 comments

Comments

@duomotomo
Copy link

duomotomo commented Aug 22, 2019

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
Copy link
Author

Hello, is it possible to get update?

@andrewdavidmackenzie
Copy link
Member

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
Copy link
Contributor

mikz commented Sep 20, 2019

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
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants