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

dispatcher: increase heartbeat period for unknown nodes #1250

Merged
merged 1 commit into from Jul 29, 2016

Conversation

LK4D4
Copy link
Contributor

@LK4D4 LK4D4 commented Jul 27, 2016

Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>
@aaronlehmann
Copy link
Collaborator

LGTM, but we need to make sure this doesn't break Docker integration tests. #1238 broke the ForceNewCluster test because it didn't mark nodes as down fast enough.

@aluzzardi
Copy link
Member

#1238 broke engine tests because it took too long (2 additional minutes) and it wasn't configurable.

This change makes it proportional so I believe it can work, although it may not depending on the current timeout values. We should check that and then tweak the engine test.

@codecov-io
Copy link

Current coverage is 54.94% (diff: 80.00%)

Merging #1250 into master will increase coverage by 0.13%

@@             master      #1250   diff @@
==========================================
  Files            78         78          
  Lines         12422      12405    -17   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           6809       6816     +7   
+ Misses         4671       4653    -18   
+ Partials        942        936     -6   

Sunburst

Powered by Codecov. Last update b1c576c...f4e0641

@aluzzardi
Copy link
Member

LGTM

@aluzzardi
Copy link
Member

@LK4D4 @aaronlehmann @dongluochen: I'm thinking of pushing this to 1.12.1 - do you agree?

@aaronlehmann
Copy link
Collaborator

Agreed.

@aaronlehmann
Copy link
Collaborator

But test it with the Docker integration tests before 1.12.1 :)

@@ -79,7 +82,7 @@ func (s *nodeStore) AddUnknown(n *api.Node, expireFunc func()) error {
Node: n,
}
s.nodes[n.ID] = rn
rn.Heartbeat = heartbeat.New(s.periodChooser.Choose()*s.gracePeriodMultiplier, expireFunc)
rn.Heartbeat = heartbeat.New(s.periodChooser.Choose()*s.gracePeriodMultiplierUnknown, expireFunc)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the node goes to Ready, does heartbeat restore to normal?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, and this heartbeat is cancelled.

@dongluochen
Copy link
Contributor

Agree with 1.12.1 plan.

@aluzzardi aluzzardi added this to the 1.12.1 milestone Jul 28, 2016
@dongluochen
Copy link
Contributor

LGTM

@aaronlehmann
Copy link
Collaborator

Confirmed that this breaks DockerSwarmSuite.TestApiSwarmForceNewCluster.

@LK4D4 can you please find a fix for TestApiSwarmForceNewCluster, or make this PR not affect that test, before we merge it?

@LK4D4
Copy link
Contributor Author

LK4D4 commented Jul 29, 2016

@aaronlehmann I'll take a look tomorrow.

@LK4D4
Copy link
Contributor Author

LK4D4 commented Jul 29, 2016

@aaronlehmann PR was merged in docker.

@aaronlehmann
Copy link
Collaborator

Thanks, confirmed that the integration tests are working properly with this.

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

Successfully merging this pull request may close these issues.

None yet

6 participants