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

Enable delfin installer to run multiple instances of delfin components #625

Merged
merged 2 commits into from
Jun 25, 2021

Conversation

AmitRoushan
Copy link

@AmitRoushan AmitRoushan commented Jun 24, 2021

What this PR does / why we need it:
The PR include changes to enable delfin installer for multi instance deployment of delfin components.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:
Installation documents are also updated

@codecov
Copy link

codecov bot commented Jun 24, 2021

Codecov Report

Merging #625 (560972c) into master (5b46f30) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #625   +/-   ##
=======================================
  Coverage   71.37%   71.37%           
=======================================
  Files         144      144           
  Lines       13077    13077           
  Branches     1563     1563           
=======================================
  Hits         9334     9334           
  Misses       3211     3211           
  Partials      532      532           

@AmitRoushan
Copy link
Author

@rajat-soda
Copy link

Corresponding tear down of all the instances during uninstall , is this present ?

@AmitRoushan
Copy link
Author

@rajat-soda tear down is present already. It kills all the process by grepping delfin name and remove installed files

@AmitRoushan AmitRoushan changed the title enable delfin installer to run multiple instances of delfin components Enable delfin installer to run multiple instances of delfin components Jun 24, 2021
```

Note: Multiple instances of exporter and api is not allowed currently.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Somewhere we can mention about the scope of this step is for single node, multi instances of processes

joseph-v
joseph-v previously approved these changes Jun 25, 2021
Copy link
Collaborator

@joseph-v joseph-v left a comment

Choose a reason for hiding this comment

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

LGTM

NajmudheenCT
NajmudheenCT previously approved these changes Jun 25, 2021
Copy link
Member

@NajmudheenCT NajmudheenCT left a comment

Choose a reason for hiding this comment

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

LGTM

for instance in range(0, instances):
proc_path = os.path.join(delfin_source_path, 'delfin', 'cmd',
process + '.py')
command = 'python3 ' + proc_path + ' --config-file ' + \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Its always good to put the absolute path of the command (viz. /usr/bin/python3) and it should be constant driven

Copy link
Author

Choose a reason for hiding this comment

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

issue created #635

# Ignore multiple instance of api
if process != 'api':
instances = os.environ.get(env_var)
if not instances:
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need this? start_process arg default value is 1

Copy link
Author

Choose a reason for hiding this comment

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

The reason the check is required because instances is type casted into int before passing to start_process. otherwise it would give NoneType

Copy link
Author

Choose a reason for hiding this comment

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

Optimized the code a little bit based on suggestion

Copy link
Collaborator

@kumarashit kumarashit left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@NajmudheenCT NajmudheenCT left a comment

Choose a reason for hiding this comment

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

LGTM

@NajmudheenCT NajmudheenCT merged commit 28707b0 into sodafoundation:master Jun 25, 2021
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.

6 participants