-
Notifications
You must be signed in to change notification settings - Fork 45
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
PLT-7566 Add docker images for marlowe-apps #715
Conversation
b5e8317
to
e1cfeda
Compare
# REQUIRED VARS # | ||
################# | ||
# ADDRESS: The Bech32 address of the oracle. | ||
# KEYFILE: The extended payment signing key file for the oracle. |
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.
In order to use an external keyfile, don't we need a volume that we can bind to? We'll need to document this.
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.
Yes, that is the idea. Where best to document this I wonder.
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.
The code and images look good, except for an unset environment variables that I noted.
I verified that the oracle works outside of the container.
However, when I run the image, the oracle crashes early with an apparent inability to connect to the marlowe-tx-proxy
service, even though the ping to the port succeeds. Note that the Runtime service is at this very same commit.
Connection to 192.168.0.9 13780 port [tcp/*] succeeded!
{"DiscoveryProcess":{"duration":60.055698835,"end":"2023-09-22T02:31:40.301659265Z","event-id":"7a8e1c7e-97a9-4301-a325-7045a4133cff","start":"2023-09-22T02:30:40.24596043Z","unstructured-exception":"DeserializeError {message = \"not enough bytes\", offset = 0, unconsumedInput = \"\"}"}}
marlowe-oracle: DeserializeError {message = "not enough bytes", offset = 0, unconsumedInput = ""}
{"OracleProcess":{"duration":60.058800326,"end":"2023-09-22T02:31:40.304757094Z","event-id":"48aecbb1-7cce-45a6-a80a-ac94f1b840c2","start":"2023-09-22T02:30:40.245956768Z","unstructured-exception":"thread blocked indefinitely in an STM transaction"}}
marlowe-oracle: thread blocked indefinitely in an STM transaction
{"DetectionProcess":{"duration":60.058783247,"end":"2023-09-22T02:31:40.304808034Z","event-id":"2ebc936c-df46-4140-a278-5763d8295375","start":"2023-09-22T02:30:40.246024787Z","unstructured-exception":"thread blocked indefinitely in an STM transaction"}}
This may be a problem with my test environment, but the kube file is pretty simple:
kind: Pod
metadata:
name: mrt-preprod-oracle
labels:
app: mrt-preprod-oracle
spec:
hostname: mrt-preprod-oracle
containers:
- name: marlowe-oracle
image: docker.io/bwbush/marlowe-oracle:ee6889829b67adb5af128d8786f6212eebcacc43
env:
- name: MARLOWE_RT_HOST
value: 192.168.0.9
- name: RUNTIME_HOST # A workaround for a bug in operable.
value: 192.168.0.9
- name: MARLOWE_RT_PORT
value: 13780
- name: RUNTIME_PORT # A workaround for a bug in operable.
value: 13780
- name: ADDRESS
value: addr_test1vq9prvx8ufwutkwxx9cmmuuajaqmjqwujqlp9d8pvg6gupczgtm9j
- name: KEYFILE
value: /data/treasury/payment.skey
volumeMounts:
- mountPath: /data/treasury
name: treasury
volumes:
- name: treasury
hostPath:
type: Directory
path: /extra/iohk/networks/treasury
restartPolicy: Always
enableServiceLinks: false
automountServiceAccountToken: false
status: {}
# CONFIRM_SECONDS: Wait specified seconds after transaction confirmation. | ||
# RETRY_SECONDS: Wait specified seconds after a failed transaction before trying again. | ||
# RETRY_LIMIT: Maximum number of attempts for trying a failed transaction again. | ||
|
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.
Do we need to add the following because an export
is required for the app to see the variable? Or does docker automatically mark the variable as exported?
export MARLOWE_RT_HOST="''${MARLOWE_RT_HOST}"
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.
That should not be necessary
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.
Also, the connection is successful, but something is going wrong over the wire
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.
You would see a different error if the connection failed, not a DeserializeError
Co-authored-by: Brian W Bush <[email protected]>
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 resolved the oracle crash, which was due to a misconfigured container.
Pre-submit checklist: