Skip to content

builder: return error if a node fails to boot#3062

Merged
crazy-max merged 1 commit intodocker:masterfrom
crazy-max:builder-error-boot
Mar 13, 2025
Merged

builder: return error if a node fails to boot#3062
crazy-max merged 1 commit intodocker:masterfrom
crazy-max:builder-error-boot

Conversation

@crazy-max
Copy link
Member

fixes #2730

With #1869 we return an error only if all nodes fail to boot but that's not a correct pattern and we should return an error if any node fails.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Copy link
Member

@tonistiigi tonistiigi left a comment

Choose a reason for hiding this comment

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

I think this was intentional to make it so that if you have a multi-node builder and one of the nodes (temporarily) goes down then you can still build with rest of the builders. Eg. you could even have multiple nodes with the same arch for some redundancy.

I think it would be ok if inspect --bootstrap fails but I think then it would need some more specific condition as this Boot() function is also used in other cases.

@crazy-max
Copy link
Member Author

I think this was intentional to make it so that if you have a multi-node builder and one of the nodes (temporarily) goes down then you can still build with rest of the builders. Eg. you could even have multiple nodes with the same arch for some redundancy.

Ah yes that makes sense

I think it would be ok if inspect --bootstrap fails but I think then it would need some more specific condition as this Boot() function is also used in other cases.

Looks good I'm taking a look

@crazy-max crazy-max marked this pull request as draft March 12, 2025 16:28
@crazy-max
Copy link
Member Author

I think it would be ok if inspect --bootstrap fails but I think then it would need some more specific condition as this Boot() function is also used in other cases.

Looks good I'm taking a look

Boot func in builder package is only used by create and inspect command. On build we directly call driver.Boot

c, err := driver.Boot(ctx, baseCtx, r.nodes[idx].Driver, pw)

So I don't think we need anything special here.

@crazy-max crazy-max marked this pull request as ready for review March 13, 2025 10:07
@crazy-max crazy-max requested a review from tonistiigi March 13, 2025 10:07
@crazy-max crazy-max merged commit 00fdcd3 into docker:master Mar 13, 2025
138 checks passed
@crazy-max crazy-max deleted the builder-error-boot branch March 13, 2025 17:02
@crazy-max crazy-max added this to the v0.22.0 milestone Mar 17, 2025
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.

docker inspect --bootstrap ignores an error and exits successfully when one of two nodes fails

2 participants