Skip to content

cephadm: remove injected_args - #39619

Merged
sebastian-philipp merged 5 commits into
ceph:masterfrom
sebastian-philipp:rm_injected_argv
Mar 10, 2021
Merged

sebastian-philipp merged 5 commits into
ceph:masterfrom
sebastian-philipp:rm_injected_argv

Conversation

@sebastian-philipp

@sebastian-philipp sebastian-philipp commented Feb 22, 2021 •

Copy link
Copy Markdown
Contributor

This PR is based on #39141 and will contain those commits, unit it is merged

Avoid copying cephadm all the time.

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@sebastian-philipp

Copy link
Copy Markdown
Contributor Author

replaces #37495

@liewegas

Copy link
Copy Markdown
Member

jenkins test make check

Comment thread src/cephadm/cephadm Outdated
Comment on lines 6580 to 6727

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@sebastian-philipp

Copy link
Copy Markdown
Contributor Author
>       assert exporter.binary_path == "/var/lib/ceph/foobar/cephadm"
E       AssertionError: assert '/home/jenkin...phadm/cephadm' == '/var/lib/ceph/foobar/cephadm'
E         - /var/lib/ceph/foobar/cephadm
E         + /home/jenkins-build/build/workspace/ceph-pull-requests/src/cephadm/cephadm

@sebastian-philipp

Copy link
Copy Markdown
Contributor Author

changelog: fix cephadm tox

Comment thread src/pybind/mgr/cephadm/serve.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

maybe this kind of situations and the consequences deserves an "error" instead of a "warning"

@jmolmo jmolmo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It works.!

@mgfritch mgfritch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm! .. mostly nits around readability of the remoto connection handling, but the code is correct

Comment thread src/pybind/mgr/cephadm/serve.py Outdated
Comment on lines 996 to 1004

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(nit) the remoto.process logic and the logic above are duplicates .. move into a helper func?

Comment thread src/pybind/mgr/cephadm/serve.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
if code_ls == 2:
if code_ls != 0:

(nit) similar, but maybe any non-zero errcode?

Might also be good to extract this into a dedicated cephadm_binary_exists function?

Comment thread src/pybind/mgr/cephadm/serve.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
if code == 2:
if code == errno.ENOENT:

(nit) I was somewhat confused why retval 2, but it's file not found from python.

@github-actions

github-actions Bot commented Mar 4, 2021

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

right now, an upgrade might overwrite the existing
binary which would force us to have the CLI stable.

Signed-off-by: Sebastian Wagner <[email protected]>
Removed the injected_argv parameter and the injection of code in the cephadm
script we send to hosts.
Now the script is copied and after that we execute the cephadm command.
I would like to copy it only one time (when adding new hosts) but this will be
part of a future PR, together with other prs to:

- Introduce cephadm version
- Get rid of packaged/root mode
- Use pex or eggs

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
Signed-off-by: Sebastian Wagner <[email protected]>
Avoid copying cephadm all the time.

Signed-off-by: Sebastian Wagner <[email protected]>
Because we now always have a script on the remote hosts.

Signed-off-by: Sebastian Wagner <[email protected]>
@sebastian-philipp

Copy link
Copy Markdown
Contributor Author

jenkins test make check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants