Skip to content

mgr/cephadm: fix env_var passing to cephadm#34944

Merged
sebastian-philipp merged 5 commits intoceph:masterfrom
jschmid1:fix_osdspec_affinity_passing
May 14, 2020
Merged

mgr/cephadm: fix env_var passing to cephadm#34944
sebastian-philipp merged 5 commits intoceph:masterfrom
jschmid1:fix_osdspec_affinity_passing

Conversation

@jschmid1
Copy link
Contributor

@jschmid1 jschmid1 commented May 7, 2020

Signed-off-by: Joshua Schmid jschmid@suse.de

This needs to be merged together with: #34835

Fixes: https://tracker.ceph.com/issues/45394

Revert commit 8f27583 when #34835 is merged

  • moves the bin/cephadm shell's --env flag to the global parser
  • changes the way we pass environment variables to bin/cephadm from mgr/cephadm
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 dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@sebastian-philipp
Copy link
Contributor

needs rebase

@jschmid1 jschmid1 force-pushed the fix_osdspec_affinity_passing branch from 0fefb73 to 3204209 Compare May 8, 2020 10:28
Copy link
Contributor

@mgfritch mgfritch left a comment

Choose a reason for hiding this comment

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

couple minor nits, but overall looks good 👍

Comment on lines +1273 to +955
if env_vars:
for env_var_pair in env_vars:
final_args.extend(['--env', env_var_pair])
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if env_vars:
for env_var_pair in env_vars:
final_args.extend(['--env', env_var_pair])
if env_vars:
for k,v in env_vars.items():
final_args.extend(['--env', f'{k}={v}'])

Maybe it would be better to use a dict type instead of list?

Copy link
Contributor Author

@jschmid1 jschmid1 May 11, 2020

Choose a reason for hiding this comment

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

I deliberately chose [K=V] as this is the format that will be passed along to bin/cephadm. While I do agree that a dict type is the correct type for this case, but in this case I'd favor practicability.

@jschmid1 jschmid1 force-pushed the fix_osdspec_affinity_passing branch from 3204209 to ce8ccff Compare May 12, 2020 09:56
Joshua Schmid added 5 commits May 12, 2020 12:07
Signed-off-by: Joshua Schmid <jschmid@suse.de>
Signed-off-by: Joshua Schmid <jschmid@suse.de>
Signed-off-by: Joshua Schmid <jschmid@suse.de>
Signed-off-by: Joshua Schmid <jschmid@suse.de>
Signed-off-by: Joshua Schmid <jschmid@suse.de>
@jschmid1 jschmid1 force-pushed the fix_osdspec_affinity_passing branch from aaf463e to 8f27583 Compare May 12, 2020 10:10
Comment on lines +33 to +34
# env_vars = [f"CEPH_VOLUME_OSDSPEC_AFFINITY={drive_group.service_id}"]
# disable this until https://github.com/ceph/ceph/pull/34835 is merged
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of reverting this, can we make this somehow optional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought about this as well, but I'm not sure how. The workability depends on the ceph-osd version (no specific version can be determined though)

@jschmid1
Copy link
Contributor Author

the make check error looks pretty much unrelated:

py3 run-test: commands[0] | flake8 --ignore=W503 --max-line-length=100 cephfs-shell
cephfs-shell:200:17: F522 '...'.format(...) has unused named argument(s): sep
cephfs-shell:205:17: F522 '...'.format(...) has unused named argument(s): sep
cephfs-shell:367:14: E225 missing whitespace around operator
cephfs-shell:704:18: E225 missing whitespace around operator

@sebastian-philipp
Copy link
Contributor

@sebastian-philipp
Copy link
Contributor

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.

3 participants