hashgraph / hedera-sourcify

Tools for verifying Hedera smart contracts using standard open source libraries.
Apache License 2.0
6 stars 7 forks source link

Reset mount filesystem #137

Closed rustyShacklefurd closed 3 months ago

rustyShacklefurd commented 4 months ago

Description: This PR modifies the reset job. The reset job has to be run via mounting the PVC that is in use so that the correct filesystem locations are being reset. There is a limitation in the CSI driver (aka google-filestore-driver in GCP Log explorer) where the driver has a subsystem puts locks on the volume mapped to the pod; this makes it impossible to get the volume to attach to a secondary pod on the same node where the server-repository lives . This adding a secondary pod on the same node where the PVC is bound is documented as a working solution but the subsystem has a different setup.

Because of the limitation above, the reset job now runs kubectl to get the running server-repository pod, execs into the pod and triggers the reset script. There is a reset job for both previewnet and testnet

Related issue(s):

Fixes #43

Notes for reviewer: These are the logs from the test environment run of this:

Defaulted container "sourcify-server" out of: sourcify-server, sourcify-repository
Unable to use a TTY - input is not a terminal or the right kind of file
Resetting Hedera previewnet (Chain ID: 297)
  /data/contracts/partial_match/297 does not exist
  /data/contracts/full_match/297 does not exist

Checklist