-
Notifications
You must be signed in to change notification settings - Fork 129
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
Error: inserting target into state: inserting target ip:port for upstream xxx: entity already exists #233
Comments
Can you please share the yaml file so that we can reproduce this error? |
ok, added 2 sample files, with these 2 yaml files i could reproduce the problem on a 2nd environment:
Don't know if select-tag is needed in command because it is still in config
but this makes no difference. |
This is potentially a bug in decK and needs further investigation. We will look into it and report back soon. |
There is nothing new about the bug? |
@mflendrich Let's get this re-prioritized for investigation. |
target.Target represents an IP address or a DNS name in Kong. These can be same across different Upstreams. Drop the unique index on Target resource for this reason. This is similar to the fix applies to ServiceVersion resource in cf44212. The test has been updated to remove insertion of Upstream which doesn't add in value. Fix #233
target.Target represents an IP address or a DNS name in Kong. These can be same across different Upstreams. Drop the unique index on Target resource for this reason. This is similar to the fix applies to ServiceVersion resource in cf44212. The test has been updated to remove insertion of Upstream which doesn't add in value. Fix #233
target.Target represents an IP address or a DNS name in Kong. These can be same across different Upstreams. Drop the unique index on Target resource for this reason. This is similar to the fix applies to ServiceVersion resource in cf44212. The test has been updated to remove insertion of Upstream which doesn't add in value. Fix #233
@michaelhsk I tried to reproduce this based on the files in #233 (comment) but I couldn't. |
Meanwhile we are using Kong 2.2.1, deck 1.5.1, same problem on 5 similar environments. All use cassandra as database. Maybe that this makes the difference? |
Ah, C*. What would help us is if you could use |
Hi, tried it also on a testinstallation with postgres DB, the problem does not seem to arise there. Attached you find the output with --verbose 2. |
@hbagdi , wasn't there a kind of flag to generate a throttling for Cassandra? Could it help? |
@mmorel-35 Good idea. @michaelhsk could you try this again with |
tried, unfortunately, does not solve the problem. |
Seems that the error has to do with the tags table. diff shoes no error, only that 4 targets will be created. 1st sync: no error, 4 targets will be deleted, 4 targets will be created. In cassandra DB i can see that only the delete was done. 2nd sync: no error, 4 targets will be created. After the 2nd sync the targets are really created, and i can see them in the targets table and the rows to the tags table where also addded. So all entries are completely available again in database. And now next sync shows the error again. |
Can you remove tags from your configuration and verify if the error occurs or not? |
See my first post ;-). "If i don't use tags everything works fine, also with targets." So if i don't use tags as parameter and at _info section in yaml everything works fine. |
With that finding (I'm sorry for overlooking that), @fffonion probably has some ideas as to why this happens. |
Meanwhile we have migrated our test environments to Kong 2.4.1 and it looks that the problem no longer occurs. It seems that it is fixed in kong and not really a deck problem. |
Yes, this is a problem in Kong and not decK because it violates the API contract (hence the ping to @fffonion earlier). Going to close this, please report back if the problem persists and we will re-open. |
target.Target represents an IP address or a DNS name in Kong. These can be same across different Upstreams. Drop the unique index on Target resource for this reason. This is similar to the fix applies to ServiceVersion resource in 512d53f. The test has been updated to remove insertion of Upstream which doesn't add in value. Fix #233
Kong Version 2.1.2
decK Version 2.2
When using upstreams with targets in my kong configuration deck fails with this error when using --select-tag in command line or select_tags in yaml file.
With routes, services, plugins and upstreams without target there is no problem. Only if i add targets to the upstreams.
If i don't use tags everything works fine, also with targets.
First time the configuration will be synct to kong without any problem. But after that every dump, diff or sync shows this error.
Is this a known bug?
The text was updated successfully, but these errors were encountered: