-
Notifications
You must be signed in to change notification settings - Fork 52
Circuit breaker plugin #688
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
base: main
Are you sure you want to change the base?
Circuit breaker plugin #688
Conversation
weird error trying to
|
Yeah, I believe this issue is related to #689. To resolve it, I |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
* plugin: remove circuit-breaker from the plugin section * template: add extracontainers for circuitbreaker * pod: update pod for extra containers
ce43d60
to
0418553
Compare
Circuitbreaker4
…i/warnet into circuit-breaker-plugin
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.
I noticed a few things to check. Coudn't get the branch to run locally probably just because of the image error?
Also checkout the legacy branch for how we did integration tests for circuitbreaker:
https://github.com/bitcoin-dev-project/warnet/blob/legacy/test/ln_test.py#L34-L39
- mountPath: /root/.lnd/macaroon.hex | ||
name: config | ||
subPath: MACAROON_HEX |
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.
This shouldn't be necessary because lnd will deterministically generate the expected macaroon file shortly after startup:
warnet/resources/charts/bitcoincore/charts/lnd/values.yaml
Lines 93 to 95 in 8e7b135
- | | |
PHRASE=`curl --silent --insecure https://localhost:8080/v1/genseed | grep -o '\[[^]]*\]'` | |
curl --insecure https://localhost:8080/v1/initwallet --data "{\"macaroon_root_key\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\", \"wallet_password\":\"AAAAAAAAAAA=\", \"cipher_seed_mnemonic\": $PHRASE}" |
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.
Alright I will look into this and make the changes
- "--network=regtest" | ||
- "--rpcserver=localhost:10009" | ||
- "--tlscertpath=/tls.cert" | ||
- "--macaroonpath=/macaroon.hex" |
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.
as long as circuitbreaker either waits for lnd to start, or otherwise keeps trying to start until lnd has generated its macaroon file, you can expect it to be at /root/.lnd/data/chain/bitcoin/regtest/admin.macaroon
(assuming regtest)
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.
I will use a dynamic network in the path
- "--network=regtest" | ||
- "--rpcserver=localhost:10009" |
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.
network and port may change depending on the user config, you should pull these as global helm variables similar to how lnd pulls it from the bitcoin pod config.
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.
Alright, I will update the values to be pulled from the global helm variable
|
||
extraContainers: | ||
- name: circuitbreaker | ||
image: camillarhi/circuitbreaker:latest |
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.
I'm getting an ImagePullBackOff
error. Did you push your image to dockerhub? Is there some reason why you don't want to use https://hub.docker.com/r/carlakirkcohen/circuitbreaker
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.
I built the image using ubuntu on windows, I think that is why you could not pull it. I used mine because of the change I made on the circuit breaker code to accept a hex value for the macaroon
file.
No description provided.