Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6ac2542b
Commit
6ac2542b
authored
Mar 06, 2020
by
Changzheng Liu
Committed by
Heinrich Lee Yu
Mar 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set the default SSL cert path when invoking indexer
parent
1cf0dcb2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
+15
-5
ee/changelogs/unreleased/cl-openssl-cert.yml
ee/changelogs/unreleased/cl-openssl-cert.yml
+5
-0
ee/lib/gitlab/elastic/indexer.rb
ee/lib/gitlab/elastic/indexer.rb
+4
-2
ee/spec/lib/gitlab/elastic/indexer_spec.rb
ee/spec/lib/gitlab/elastic/indexer_spec.rb
+6
-3
No files found.
ee/changelogs/unreleased/cl-openssl-cert.yml
0 → 100644
View file @
6ac2542b
---
title
:
Set the default SSL cert path environment variables when invoking indexer
merge_request
:
26036
author
:
type
:
fixed
ee/lib/gitlab/elastic/indexer.rb
View file @
6ac2542b
...
...
@@ -83,10 +83,12 @@ module Gitlab
'ELASTIC_CONNECTION_INFO'
=>
elasticsearch_config
(
target
),
'GITALY_CONNECTION_INFO'
=>
gitaly_connection_info
,
'FROM_SHA'
=>
from_sha
,
'TO_SHA'
=>
to_sha
'TO_SHA'
=>
to_sha
,
'SSL_CERT_FILE'
=>
OpenSSL
::
X509
::
DEFAULT_CERT_FILE
,
'SSL_CERT_DIR'
=>
OpenSSL
::
X509
::
DEFAULT_CERT_DIR
}
#
SSL certificates related env will be sent to child process if configured
#
Users can override default SSL certificate path via these envs
%w(SSL_CERT_FILE SSL_CERT_DIR)
.
each_with_object
(
vars
)
do
|
key
,
hash
|
hash
[
key
]
=
ENV
[
key
]
if
ENV
.
key?
(
key
)
end
...
...
ee/spec/lib/gitlab/elastic/indexer_spec.rb
View file @
6ac2542b
...
...
@@ -269,11 +269,14 @@ describe Gitlab::Elastic::Indexer do
end
end
context
'when SSL env vars are not set'
do
context
'when SSL env vars are not set explicitly'
do
let
(
:ruby_cert_file
)
{
OpenSSL
::
X509
::
DEFAULT_CERT_FILE
}
let
(
:ruby_cert_dir
)
{
OpenSSL
::
X509
::
DEFAULT_CERT_DIR
}
subject
{
envvars
}
it
'they will
not be passed down to child process
'
do
is_expected
.
not_to
include
(
'SSL_CERT_FILE'
,
'SSL_CERT_DIR'
)
it
'they will
be set to default values determined by Ruby
'
do
is_expected
.
to
include
(
'SSL_CERT_FILE'
=>
ruby_cert_file
,
'SSL_CERT_DIR'
=>
ruby_cert_dir
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment