Skip to content

Commit 7111b86

Browse files
authored
Merge pull request #318 from weaviate/jose/increase-container-time-upgrade-journey
Increase container waiting times for multi-node.
2 parents e9365ec + 25e42ae commit 7111b86

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

apps/upgrade-journey/containers.go

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func (c *cluster) startWeaviateNode(ctx context.Context, nodeId int, version str
135135
WithStatusCodeMatcher(func(status int) bool {
136136
return status >= 200 && status <= 299
137137
}).
138-
WithStartupTimeout(30 * time.Second),
138+
WithStartupTimeout(c.getStartupTimeout()),
139139
},
140140
Started: true,
141141
})
@@ -159,3 +159,16 @@ func (c *cluster) allNodes() string {
159159

160160
return strings.Join(hosts, ",")
161161
}
162+
163+
func (c *cluster) getStartupTimeout() time.Duration {
164+
// Base timeout of 30 seconds for single node
165+
baseTimeout := 30 * time.Second
166+
167+
// For multi-node clusters, increase timeout based on node count
168+
// Each additional node adds 30 seconds to account for cluster joining time
169+
if c.nodeCount > 1 {
170+
return baseTimeout + time.Duration(c.nodeCount)*30*time.Second
171+
}
172+
173+
return baseTimeout
174+
}

0 commit comments

Comments
 (0)