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

Use GetSourceIP for source ip as request params #6109

Merged
merged 1 commit into from Jul 2, 2018

Conversation

harshavardhana
Copy link
Member

@harshavardhana harshavardhana commented Jun 30, 2018

Description

Use GetSourceIP for source ip as request params

Motivation and Context

Fixes #6108

How Has This Been Tested?

Manually behind proxy

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added unit tests to cover my changes.
  • I have added/updated functional tests in mint. (If yes, add mint PR # here: )
  • All new and existing tests passed.

@minio-ops
Copy link

Error running mint automation
+ mkdir -p 6109-4423a55/gopath/src/github.com/minio
+ git clone --quiet https://github.com/minio/minio.git 6109-4423a55/gopath/src/github.com/minio/minio
++ cd 6109-4423a55/gopath/src/github.com/minio/minio
++ git remote add minio https://github.com/minio/minio.git
++ cd 6109-4423a55/gopath/src/github.com/minio/minio
++ git fetch --quiet minio pull/6109/head:pr6109
++ cd 6109-4423a55/gopath/src/github.com/minio/minio
++ git checkout --quiet pr6109
+ GOPATH=/home/mint-auto/mint-auto/6109-4423a55/gopath
+ make -C 6109-4423a55/gopath/src/github.com/minio/minio --quiet
# github.com/minio/minio/cmd
cmd/bucket-handlers.go:378:39: undefined: handlers
cmd/bucket-handlers.go:651:39: undefined: handlers
cmd/object-handlers-common.go:246:37: undefined: handlers
cmd/object-handlers.go:199:39: undefined: handlers
cmd/object-handlers.go:295:39: undefined: handlers
cmd/object-handlers.go:619:39: undefined: handlers
cmd/object-handlers.go:825:39: undefined: handlers
cmd/object-handlers.go:1496:39: undefined: handlers
cmd/utils.go:339:15: undefined: handlers
make: *** [build] Error 2

Copy link
Contributor

@kannappanr kannappanr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the compilation errors

@codecov
Copy link

codecov bot commented Jul 1, 2018

Codecov Report

Merging #6109 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6109      +/-   ##
==========================================
+ Coverage   58.63%   58.65%   +0.02%     
==========================================
  Files         221      221              
  Lines       31775    31781       +6     
==========================================
+ Hits        18630    18641      +11     
+ Misses      11491    11487       -4     
+ Partials     1654     1653       -1
Impacted Files Coverage Δ
cmd/handler-utils.go 79.31% <100%> (ø) ⬆️
cmd/object-handlers-common.go 68.75% <100%> (ø) ⬆️
cmd/bucket-handlers.go 58.19% <100%> (ø) ⬆️
cmd/utils.go 69.81% <100%> (+0.87%) ⬆️
cmd/object-handlers.go 62.68% <100%> (ø) ⬆️
cmd/xl-v1-common.go 85% <0%> (+3.33%) ⬆️
cmd/retry.go 87.5% <0%> (+5.35%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 360f3f9...53f2219. Read the comment docs.

@minio-ops
Copy link

Mint Automation

Test Result
mint-xl.sh ✔️
mint-gateway-nas.sh ✔️
mint-large-bucket.sh ✔️
mint-worm.sh ✔️
mint-fs.sh ✔️
mint-dist-xl.sh ✔️
mint-gateway-s3.sh more...
mint-gateway-azure.sh more...

6109-53f2219/mint-gateway-azure.sh.log:

Running with
SERVER_ENDPOINT:      minikube:30274
ACCESS_KEY:           minioazure
SECRET_KEY:           ***REDACTED***
ENABLE_HTTPS:         0
SERVER_REGION:        us-east-1
MINT_DATA_DIR:        /mint/data
MINT_MODE:            full
ENABLE_VIRTUAL_STYLE: 0

To get logs, run 'docker cp 857b93bfa186:/mint/log /tmp/mint-logs'
(1/13) Running awscli tests ... FAILED in 7 seconds
{
  "name": "awscli",
  "duration": 1838,
  "function": "make_bucket\n",
  "status": "FAIL",
  "error": "An error occurred (InvalidAccessKeyId) when calling the CreateBucket operation: The access key ID you provided does not exist in our records."
}

Executed 0 out of 13 tests successfully.

6109-53f2219/mint-gateway-s3.sh.log:

Running with
SERVER_ENDPOINT:      minikube:31799
ACCESS_KEY:           AKIAJH7GQKYNU3C2ADXA
SECRET_KEY:           ***REDACTED***
ENABLE_HTTPS:         0
SERVER_REGION:        us-east-1
MINT_DATA_DIR:        /mint/data
MINT_MODE:            full
ENABLE_VIRTUAL_STYLE: 0

To get logs, run 'docker cp ff0f6b71760d:/mint/log /tmp/mint-logs'
(1/13) Running awscli tests ... done in 1 minutes and 57 seconds
(2/13) Running aws-sdk-go tests ... done in 4 seconds
(3/13) Running aws-sdk-java tests ... done in 2 seconds
(4/13) Running aws-sdk-php tests ... done in 1 minutes and 17 seconds
(5/13) Running aws-sdk-ruby tests ... done in 51 seconds
(6/13) Running mc tests ... done in 4 minutes and 59 seconds
(7/13) Running minio-dotnet tests ... done in 7 minutes and 27 seconds
(8/13) Running minio-go tests ... done in 7 minutes and 6 seconds
(9/13) Running minio-java tests ... FAILED in 6 minutes and 7 seconds
{
  "name": "minio-java",
  "function": "putObject(String bucketName, String objectName, InputStream stream, long size, Map<String, String> headerMap)",
  "args": "size: 13 MB",
  "duration": 10474,
  "status": "FAIL",
  "error": "java.lang.Exception: content type mismatch, expected: application/javascript, got: application/octet-stream >>> [FunctionalTest.putObject_test13(FunctionalTest.java:806), FunctionalTest.runTests(FunctionalTest.java:2463), FunctionalTest.main(FunctionalTest.java:2588)]"
}

Executed 8 out of 13 tests successfully.

Copy link
Contributor

@kannappanr kannappanr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kannappanr kannappanr merged commit 6c85706 into minio:master Jul 2, 2018
@harshavardhana harshavardhana deleted the fix-source-ip branch July 2, 2018 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How can I get real client ip address in bucket notification events?
4 participants