-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
FAB-17160 Ensure peer can be started without any docker requirements #384
Conversation
if err != nil { | ||
logger.Panicf("cannot create docker client: %s", err) | ||
|
||
if coreConfig.VMEndpoint != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we also add a check for coreConfig.ExternalBuilders[] being empty ... we need either a VMEndpoint or a list of ExternalBuilders
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 at the very least we should print a warning indicating that the peer will not be able to execute chaincode.
I suppose it's possible that someone simply wants to stand up a peer to pull and validate blocks, though without a chaincode to access state, I don't see any real usefulness for this configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jyellick one use case could be to construct state db for direct query against it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's easy enough to create a no-op external builder -- for instance:
mkdir -p mybuilder/bin
ln -s /bin/false mybuilder/bin/detect
Now you have a functioning external builder that will never build anything, and you can successfully make your peer start. If we find lots of users needing to do a workaround like this, we can look into relaxing the check, but we can always relax checks, but adding constraints later is hard.
Remember to add commit message and use PR template. |
/ci-run |
AZP build triggered! |
/ci-run |
AZP build triggered! |
Signed-off-by: Will Lahti <wtlahti@us.ibm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I believe this has been addressed. The peer now panics if there are no externalbuilders nor a docker daemon available.
With the introduction of external builders for chaincode, docker is no longer required. This PR
ensures that a peer can be started with an external builder/launcher for chaincode and zero docker requirements.
Signed-off-by: Will Lahti wtlahti@us.ibm.com