Skip to content

cephadm: Add tcmu-runner container when deploying ceph-iscsi#36235

Merged
sebastian-philipp merged 1 commit intoceph:masterfrom
matthewoliver:cephadm_iscsi_tcmu_runner
Jul 29, 2020
Merged

cephadm: Add tcmu-runner container when deploying ceph-iscsi#36235
sebastian-philipp merged 1 commit intoceph:masterfrom
matthewoliver:cephadm_iscsi_tcmu_runner

Conversation

@matthewoliver
Copy link
Contributor

Currently when we deploy ceph-iscsi via cephadm it doesn't include a
running tcmu-runner. Which means initiators will be able to login but
you wont see the LUNS on the initiator.

This patch deploys an additional tcmu-runner container along side the
ceph-iscsi container that just runs the tcmu-runner service.

Fixes: https://tracker.ceph.com/issues/46540
Signed-off-by: Matthew Oliver moliver@suse.com

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 dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@matthewoliver
Copy link
Contributor Author

I managed to fix the problem on my dev env by manually creating a new tcmu container. This is my first attempt at a PR to do the same in cephadm. But still testing it. having some network issues to the office. So thought I'd get v 0.1 up now.

# type: () -> CephContainer
tcmu_container = get_container(self.fsid, self.daemon_type, self.daemon_id)
tcmu_container.entrypoint = '/usr/bin/tcmu-runner'
tcmu_container.args.append("/usr/bin/tcmu-runner")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For some reason in my initial testing having tcmu-runner as the entry point didn't work, but if I added it as an arg it did. But that doesn't make sense, so I plan on testing this again.

@matthewoliver matthewoliver force-pushed the cephadm_iscsi_tcmu_runner branch 3 times, most recently from d9f5f9c to dd28dd1 Compare July 23, 2020 06:27
@sebastian-philipp
Copy link
Contributor

jenkins test make check

@sebastian-philipp
Copy link
Contributor

jenkins test dashboard backend

@matthewoliver matthewoliver force-pushed the cephadm_iscsi_tcmu_runner branch from dd28dd1 to 3a4d628 Compare July 24, 2020 01:19
@matthewoliver
Copy link
Contributor Author

This PR now works in my env. If I loaded the orig container, I could attach the image, then if I ran the the second container everything worked. But running them both at the same time didn't.
Turned out to be the tcmu-running container needed access to dev. When starting the tcmu-runner later it must have had access to an updated /dev. When finding that out, it turns out to be an easy fix. Volume mount dev :)

file_obj.write('! '+ ' '.join(container.rm_cmd(storage=True)) + '\n')

# container run command
file_obj.write(' '.join(container.run_cmd()) + '\n')
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
file_obj.write(' '.join(container.run_cmd()) + '\n')
file_obj.write(' '.join(container.run_cmd()) + ('&' if background else '') + '\n')

?

Copy link
Contributor

@tchaikov tchaikov left a comment

Choose a reason for hiding this comment

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

cephadm:1940: error: Type signature has too few arguments
Found 1 error in 1 file (checked 1 source file)
ERROR: InvocationError for command /home/jenkins-build/build/workspace/ceph-pull-requests/src/cephadm/.tox/mypy/bin/mypy cephadm (exited with code 1)
___________________________________ summary ____________________________________
  py3: commands succeeded
ERROR:   mypy: commands failed

Currently when we deploy ceph-iscsi via cephadm it doesn't include a
running tcmu-runner. Which means initiators will be able to login but
you wont see the LUNS on the initiator.

This patch deploys an additional tcmu-runner container along side the
ceph-iscsi container that just runs the tcmu-runner service.

Fixes: https://tracker.ceph.com/issues/46540
Signed-off-by: Matthew Oliver <moliver@suse.com>
@matthewoliver matthewoliver force-pushed the cephadm_iscsi_tcmu_runner branch from c04f45e to eb604d3 Compare July 28, 2020 03:24
@matthewoliver
Copy link
Contributor Author

thanks @tchaikov forgot to update the mypi sig when I added background=False. Fixed.

@sebastian-philipp sebastian-philipp added the wip-swagner-testing My Teuthology tests label Jul 28, 2020
@sebastian-philipp
Copy link
Contributor

sebastian-philipp commented Jul 28, 2020

@sebastian-philipp
Copy link
Contributor

@tchaikov ping?

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants