Skip to content

Commit

Permalink
Add PA fix to missing config files errors (#3090)
Browse files Browse the repository at this point in the history
* Add PA fix to missing config files errors

Signed-off-by: Peter Zhu <[email protected]>

* Add more changes

Signed-off-by: Peter Zhu <[email protected]>

Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon authored Jan 11, 2023
1 parent 0eb9e40 commit be73801
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion scripts/components/OpenSearch-Dashboards/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ while getopts ":h:v:s:o:p:a:d:f:" arg; do
DISTRIBUTION=$OPTARG
;;
f)
ARTIFACTS=$ARTIFACTS
ARTIFACTS=$OPTARG
;;
:)
echo "Error: -${OPTARG} requires an argument"
Expand Down
2 changes: 1 addition & 1 deletion scripts/components/OpenSearch/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ while getopts ":h:v:s:o:p:a:d:f:" arg; do
DISTRIBUTION=$OPTARG
;;
f)
ARTIFACTS=$ARTIFACTS
ARTIFACTS=$OPTARG
;;
:)
echo "Error: -${OPTARG} requires an argument"
Expand Down
16 changes: 6 additions & 10 deletions scripts/components/performance-analyzer/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ while getopts ":h:v:s:o:p:a:f:" arg; do
ARCHITECTURE=$OPTARG
;;
f)
ARTIFACTS=$ARTIFACTS
ARTIFACTS=$OPTARG
;;
:)
echo "Error: -${OPTARG} requires an argument"
Expand All @@ -71,13 +71,9 @@ fi
## Setup Performance Analyzer Agent
mv $OUTPUT/plugins/opensearch-performance-analyzer/performance-analyzer-rca $OUTPUT/

## Create data directory by default
## Do nothing if the directory already exists
mkdir -p $OUTPUT/data

## Performance Analyzer Configs
echo 'true' > $OUTPUT/data/rca_enabled.conf
echo 'true' > $OUTPUT/config/performance_analyzer_enabled.conf
echo 'true' > $OUTPUT/config/rca_enabled.conf


if echo $ARTIFACTS | grep -Eo '/deb/|/rpm/'; then
echo "DEB/RPM configs"
echo 'true' > $OUTPUT/../var/lib/opensearch/rca_enabled.conf
echo 'true' > $OUTPUT/../var/lib/opensearch/performance_analyzer_enabled.conf
fi
2 changes: 1 addition & 1 deletion scripts/default/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ while getopts ":h:v:q:s:o:p:a:f:" arg; do
ARCHITECTURE=$OPTARG
;;
f)
ARTIFACTS=$ARTIFACTS
ARTIFACTS=$OPTARG
;;
:)
echo "Error: -${OPTARG} requires an argument"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,6 @@ exit 0
%config(noreplace) %{config_dir}/%{name}.yml
%config(noreplace) %{config_dir}/jvm.options
%config(noreplace) %{config_dir}/log4j2.properties
%config(noreplace) %{config_dir}/performance_analyzer_enabled.conf
%config(noreplace) %{data_dir}/rca_enabled.conf
%config(noreplace) %{config_dir}/rca_enabled.conf

# Service files
%attr(0644, root, root) %{_prefix}/lib/systemd/system/%{name}.service
Expand Down

0 comments on commit be73801

Please sign in to comment.