Giter Club home page Giter Club logo

Comments (18)

 avatar commented on July 26, 2024 2

@naslanidis
can you share your workaround?
im hitting this same error and have added 15 retry attempts on the step: TGW Attachment CRUD Operations and some other failing steps however one remaining subnet never gets the attachment after 15 retries.

@rakshb
Any way to get access to the fix for this in a beta version or similar?

I have also faced this issue. I have added dependency (DependsOn) in order to create subnets one by one and not to confuse STNO
First of all I create subnet-A with tag (Attach-to-tgw), subnet-B DependsOn subnet-A, subnet-C DependsOn subnet-B, etc

from network-orchestration-for-aws-transit-gateway.

rakshb avatar rakshb commented on July 26, 2024 2

We have fixed this issue in V3.0.0 which released this week.

from network-orchestration-for-aws-transit-gateway.

naslanidis avatar naslanidis commented on July 26, 2024 1

Hi @bebych and @adamcousins

Initially I played around with the STNO lambda to work around this but then I decided I'd rather not make changes there if a new version will be coming soon. So instead I just added some retries / catches in the state machine spec. You can replace the original state machine json spec with the attached in the stno hub cfn and it should work. I haven't changed anything else. If there's an error or 'IncorrectState' response it simply restarts from the describe states at the start. It's not pretty, but given a new version should be coming I wanted to keep changes to a minimum.

state_machine_spec.txt

I've attached a diff output compared to the original spec so you can see what's changed.

state_machine_spec_diff.txt

from network-orchestration-for-aws-transit-gateway.

groverlalit avatar groverlalit commented on July 26, 2024

Hello Roger,
Thanks for reporting this issue. We have added this issue to our backlog.

from network-orchestration-for-aws-transit-gateway.

naslanidis avatar naslanidis commented on July 26, 2024

Hi,

I am seeing the exact same behaviour:

"An error occurred (DuplicateTransitGatewayAttachment) when calling the CreateTransitGatewayVpcAttachment operation: tgw-003ded20995f40ef3 has non-deleted Transit Gateway Attachments with same VPC ID.",

I have 3 subnets and only 2 of them will attach. I thought this might be related to AZ ID's being different across different accounts but I'm not so sure. It seems that it's trying to create the attachment instead of adding additional subnets to an existing attachments.

Is this project still active and being worked on?

Thanks

EDIT: I did some further testing and if you add the tags to one subnet at a time and let the state machine execution run, it works fine every time. I.e. if I add subnet 1, then wait, then add subnet 2, then wait etc., all subnets are added perfectly. I tested this quite a few times. However when I used cloudformation to add the tags to 3 subnets at the same time it's unpredictable. Sometimes individual state machine executions work, other times they don't.

Looking at the state machine logs and lambda logs the issues arise when the 3 state machine executions are happening simultaneously. Those executions are getting in the way of each other, even with the various resource state checks implemented in the code. Just some example errors.

Subnet 1: 7:19:02:523 pm:
"errorMessage": "An error occurred (IncorrectState) when calling the AssociateTransitGatewayRouteTable operation: tgw-attach-00fd6c35b75ff25bb is in invalid state"

Subnet 2: 7:19:03.538 pm:
"errorMessage": "An error occurred (IncorrectState) when calling the EnableTransitGatewayRouteTablePropagation operation: tgw-attach-00fd6c35b75ff25bb is in invalid state",

Subnet 3: 7:19:08:293 pm
"errorMessage": "An error occurred (Resource.AlreadyAssociated) when calling the AssociateTransitGatewayRouteTable operation: Transit Gateway Attachment tgw-attach-00fd6c35b75ff25bb is already associated to a route table.",

I badly need some automation for transit gateway and connecting a significant number of workload accounts so I will have a look myself to see if I can find a work around at least in the short term.

from network-orchestration-for-aws-transit-gateway.

rakshb avatar rakshb commented on July 26, 2024

Hello @naslanidis. Thanks for the note. This issue will be fixed in the next release of STNO planned for Q3 2020

from network-orchestration-for-aws-transit-gateway.

naslanidis avatar naslanidis commented on July 26, 2024

Hello @naslanidis. Thanks for the note. This issue will be fixed in the next release of STNO planned for Q3 2020

Hi, thanks that's great news.

I've actually worked around it by simply adding a catch to some of the states in the state machine that were sometimes failing and just routing the flow back up top to retry again. Not perfect but it works and I look forward to seeing the next version.

from network-orchestration-for-aws-transit-gateway.

adamcousins avatar adamcousins commented on July 26, 2024

@naslanidis
can you share your workaround?
im hitting this same error and have added 15 retry attempts on the step: TGW Attachment CRUD Operations and some other failing steps however one remaining subnet never gets the attachment after 15 retries.

@rakshb
Any way to get access to the fix for this in a beta version or similar?

from network-orchestration-for-aws-transit-gateway.

dougireton avatar dougireton commented on July 26, 2024

I've hit this same issue.

from network-orchestration-for-aws-transit-gateway.

sreejanigit avatar sreejanigit commented on July 26, 2024

If we try to attach a transit gateway to two subnets of the same availability zone, this error occurs. According to the rule , one transit gateway can attach to a subnet of one availability zone only. Please correct me if I am wrong

from network-orchestration-for-aws-transit-gateway.

groverlalit avatar groverlalit commented on July 26, 2024

@sreejanigit This issue is related to duplicate TGW Attachment (DuplicateTransitGatewayAttachment) due to a race condition if more than 2 subnets are tagged at the same exact time (example: using CFN template).
If we try to attach a transit gateway to two subnets in the same availability zone we should expect DuplicateSubnetsInSameZoneError exception.

from network-orchestration-for-aws-transit-gateway.

sreejanigit avatar sreejanigit commented on July 26, 2024

@groverlalit, sorry for my misunderstanding. Thanks much for correcting me.

from network-orchestration-for-aws-transit-gateway.

badaldavda8 avatar badaldavda8 commented on July 26, 2024

Is this resolved yet? I am facing this constantly while creating VPC using CFN. I tried adding DependsOn, but it would still fail most of the times with "errorMessage": "An error occurred (Resource.AlreadyAssociated) when calling the AssociateTransitGatewayRouteTable operation: Transit Gateway Attachment..."

Or InvalidState error message.

from network-orchestration-for-aws-transit-gateway.

adamcousins avatar adamcousins commented on July 26, 2024

@groverlalit is this project abandoned or will bugs like this be resolved in a timely fashion?

from network-orchestration-for-aws-transit-gateway.

rayjanoka avatar rayjanoka commented on July 26, 2024

same issue - what's up @groverlalit? Any word on that new release?

from network-orchestration-for-aws-transit-gateway.

rayjanoka avatar rayjanoka commented on July 26, 2024

the @naslanidis fix seemed to work for me, thx!

from network-orchestration-for-aws-transit-gateway.

markymarkus avatar markymarkus commented on July 26, 2024

Yes, issue is still exists. Fresh install of v2.0.0. Trying to create VPC with 3 subnets from Cloudformation:

Step Functions:
First subnet succeeded.

Second subnet: "errorMessage": "An error occurred (IncorrectState) when calling the AssociateTransitGatewayRouteTable operation: tgw-attach-0a123456789abcdefg is in invalid state",

Third subnet: "errorMessage": "An error occurred (Resource.AlreadyAssociated) when calling the AssociateTransitGatewayRouteTable operation: Transit Gateway Attachment tgw-attach-0a123456789abcdefg is already associated to a route table.",

from network-orchestration-for-aws-transit-gateway.

gsingh04 avatar gsingh04 commented on July 26, 2024

We are currently working on the fix. This issue will be addressed in the next release. Please continue to monitor this thread for updates.

from network-orchestration-for-aws-transit-gateway.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.