-
Notifications
You must be signed in to change notification settings - Fork 252
Forward/orbit #1183
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
Merged
Merged
Forward/orbit #1183
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
79c6c57
FT: Less verbose report handler
rachedbenmustapha e8e9287
Support target host header
rachedbenmustapha f474e7e
Pre-provision instance ID
rachedbenmustapha e976c4d
Update default configuration for Zenko
rachedbenmustapha 36ff274
Default to S3DATA=multiple
rachedbenmustapha 1264067
Initial management implementation
rachedbenmustapha fe129c7
Ignore data/metadata dirs
rachedbenmustapha 1d191f4
bf: fix linter errors
2870477
chore: additional lint fixes
LaurenSpiegel 7828c0d
FT: Add changes for clueso
LaurenSpiegel a95018a
TEMP: Special treatment for clueso
LaurenSpiegel 798c42d
TEMP: Disable remote mgmt for mem
LaurenSpiegel 337b049
FT: Switch out mongo search for spark
LaurenSpiegel 343b658
use hosts instead of host and port
vrancurel b443b92
FT: ZENKO-118: Add support for Wasabi data backend
ebf1316
Fix: limit exported config items
rachedbenmustapha 06d2dbc
FT: Adds support for GCP data backend
alexanderchan-scality c760229
FT: Add CRR statistics for Orbit (#1162)
e54318d
Multiple endpoints
8fe22c0
fix mongodb hosts entrypoint
bf811ec
S3C-1348 FT: Integrating 1-many locations replication into Orbit
nicolas2bert 8bf35f7
Tested and completed prom-client for S3
anurag4DSB a612735
finished S3 prom client integration
anurag4DSB af3ea03
changed PR as adviced in the review
anurag4DSB 9d1cd39
Disable remote management in tests
rachedbenmustapha 61bb309
Make mongodb database configurable
rachedbenmustapha b505656
FX: functional tests (#1190)
nicolas2bert ed3ee6d
S3C-1354 Grant replication user permission to read/write buckets/objects
nicolas2bert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| node_modules | ||
| localData/* | ||
| localMetadata/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| #!/bin/sh | ||
| // 2>/dev/null ; exec "$(which nodejs 2>/dev/null || which node)" "$0" "$@" | ||
| 'use strict'; // eslint-disable-line strict | ||
|
|
||
| const { auth } = require('arsenal'); | ||
| const commander = require('commander'); | ||
|
|
||
| const http = require('http'); | ||
| const https = require('https'); | ||
| const logger = require('../lib/utilities/logger'); | ||
|
|
||
| function _performSearch(host, | ||
| port, | ||
| bucketName, | ||
| query, | ||
| accessKey, | ||
| secretKey, | ||
| verbose, ssl) { | ||
| const escapedSearch = encodeURIComponent(query); | ||
| const options = { | ||
| host, | ||
| port, | ||
| method: 'GET', | ||
| path: `/${bucketName}/?search=${escapedSearch}`, | ||
| headers: { | ||
| 'Content-Length': 0, | ||
| }, | ||
| rejectUnauthorized: false, | ||
| }; | ||
| const transport = ssl ? https : http; | ||
| const request = transport.request(options, response => { | ||
| if (verbose) { | ||
| logger.info('response status code', { | ||
| statusCode: response.statusCode, | ||
| }); | ||
| logger.info('response headers', { headers: response.headers }); | ||
| } | ||
| const body = []; | ||
| response.setEncoding('utf8'); | ||
| response.on('data', chunk => body.push(chunk)); | ||
| response.on('end', () => { | ||
| if (response.statusCode >= 200 && response.statusCode < 300) { | ||
| logger.info('Success'); | ||
| process.stdout.write(body.join('')); | ||
| process.exit(0); | ||
| } else { | ||
| logger.error('request failed with HTTP Status ', { | ||
| statusCode: response.statusCode, | ||
| body: body.join(''), | ||
| }); | ||
| process.exit(1); | ||
| } | ||
| }); | ||
| }); | ||
| // generateV4Headers exepects request object with path that does not | ||
| // include query | ||
| request.path = `/${bucketName}`; | ||
| auth.client.generateV4Headers(request, { search: query }, | ||
| accessKey, secretKey, 's3'); | ||
| request.path = `/${bucketName}?search=${escapedSearch}`; | ||
| if (verbose) { | ||
| logger.info('request headers', { headers: request._headers }); | ||
| } | ||
| request.end(); | ||
| } | ||
|
|
||
| /** | ||
| * This function is used as a binary to send a request to S3 to perform a | ||
| * search on the objects in a bucket | ||
| * | ||
| * @return {undefined} | ||
| */ | ||
| function searchBucket() { | ||
| // TODO: Include other bucket listing possible query params? | ||
| commander | ||
| .version('0.0.1') | ||
| .option('-a, --access-key <accessKey>', 'Access key id') | ||
| .option('-k, --secret-key <secretKey>', 'Secret access key') | ||
| .option('-b, --bucket <bucket>', 'Name of the bucket') | ||
| .option('-q, --query <query>', 'Search query') | ||
| .option('-h, --host <host>', 'Host of the server') | ||
| .option('-p, --port <port>', 'Port of the server') | ||
| .option('-s', '--ssl', 'Enable ssl') | ||
| .option('-v, --verbose') | ||
| .parse(process.argv); | ||
|
|
||
| const { host, port, accessKey, secretKey, bucket, query, verbose, ssl } = | ||
| commander; | ||
|
|
||
| if (!host || !port || !accessKey || !secretKey || !bucket || !query) { | ||
| logger.error('missing parameter'); | ||
| commander.outputHelp(); | ||
| process.exit(1); | ||
| } | ||
|
|
||
| _performSearch(host, port, bucket, query, accessKey, secretKey, verbose, | ||
| ssl); | ||
| } | ||
|
|
||
| searchBucket(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
No sure it is useful for people using DMD. And Mongo does not use this param.
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.
it works explicitly for dmd