Skip to content
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

Optionally run a command when completing jobs #15017

Merged
merged 1 commit into from Jul 28, 2022

Conversation

andrewhibbert
Copy link
Contributor

Description

This allows users to run a command before the jobs (e.g. make bucket job) are completed.

Motivation and Context

In our case we are using istio, a sidecar container is injected and we cannot contact minio without this. The problem is it does not terminate once the main container is completed. This change will allow us to add a curl command to stop the istio container, when the main command is finished so kubernetes can complete the job.

How to test this PR?

Add in a command to exitCommand, view logs and ensure you can see it has run.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Documentation updated
  • Unit tests added/updated

@minio-trusted
Copy link
Contributor

Mint Automation

Test Result
mint-large-bucket.sh ✔️
mint-fs.sh ✔️
mint-gateway-s3.sh ✔️
mint-erasure.sh ✔️
mint-compress-encrypt-dist-erasure.sh ✔️
mint-pools.sh ✔️
mint-dist-erasure.sh more...

15017-028c3d2/mint-dist-erasure.sh.log:

Running with
SERVER_ENDPOINT:      minio-k8s7:32433
ACCESS_KEY:           minio
SECRET_KEY:           ***REDACTED***
ENABLE_HTTPS:         0
SERVER_REGION:        us-east-1
MINT_DATA_DIR:        /mint/data
MINT_MODE:            full
ENABLE_VIRTUAL_STYLE: 0
RUN_ON_FAIL:          0

To get logs, run 'docker cp :/mint/log /tmp/mint-logs'

(1/14) Running awscli tests ... done in 55 seconds
(2/14) Running aws-sdk-go tests ... done in 1 seconds
(3/14) Running aws-sdk-java tests ... done in 1 seconds
(4/14) Running aws-sdk-php tests ... done in 44 seconds
(5/14) Running aws-sdk-ruby tests ... done in 7 seconds
(6/14) Running healthcheck tests ... done in 0 seconds
(7/14) Running mc tests ... FAILED in 55 seconds
{
  "name": "mc",
  "duration": "40130",
  "function": "test_presigned_get_object",
  "status": "FAIL",
  "error": "/mint/run/core/mc/mc --config-dir /tmp/.mc-1234 --quiet --no-color cp /mint/data/datafile-1-MB myminio/mc-test-bucket-29804/mc-test-object-21740  >>> \n`/mint/data/datafile-1-MB` -> `myminio/mc-test-bucket-29804/mc-test-object-21740`\nmc: <ERROR> Failed to copy `/mint/data/datafile-1-MB`. Get \"http://minio-k8s7:32433/mc-test-bucket-29804/?location=\": dial tcp 15.15.15.7:32433: i/o timeout\nTotal: 0 B, Transferred: 0 B, Speed: 0 B/s"
}
(7/14) Running minio-go tests ... done in 1 minutes and 47 seconds
(8/14) Running minio-java tests ... done in 31 seconds
(9/14) Running minio-js tests ... done in 1 minutes and 5 seconds
(10/14) Running minio-py tests ... done in 1 minutes and 22 seconds
(11/14) Running s3cmd tests ... done in 27 seconds
(12/14) Running s3select tests ... done in 4 seconds
(13/14) Running versioning tests ... done in 3 minutes and 4 seconds

Executed 13 out of 14 tests successfully.

Deleting image on docker hub
Deleting image locally

@harshavardhana harshavardhana merged commit 0357121 into minio:master Jul 28, 2022
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.

None yet

4 participants