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

fs: client nonce collision due to unshared pid namespaces #6087

Merged
4 commits merged into from Oct 20, 2015

Conversation

Projects
None yet
4 participants
@smithfarm
Contributor

smithfarm commented Sep 26, 2015

msg: add simplified messenger constructor
Several callers create messengers using exactly the same parameters:

- reading the ms type from cct that is also passed in
- a default entity_name_t::CLIENT
- the default features

Additionally, the nonce should be randomized and not depend on
e.g. pid, as it does in several callers now. Clients running in
containers can easily have pid collisions, leading to hangs, so
randomize the nonce in this simplified constructor rather than
duplicating that logic in every caller.

Daemons have meaningful entity_name_ts, and monitors currently depend
on using 0 as a nonce, so make this simple constructer
client-specific.

Related: #13032
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
(cherry picked from commit e3785b0)

Conflicts:
	src/msg/Messenger.cc
            - different #includes in firefly
            - different Messenger::create() arguments in firefly

@smithfarm smithfarm self-assigned this Sep 26, 2015

@smithfarm smithfarm added this to the firefly milestone Sep 26, 2015

liewegas and others added some commits Oct 6, 2014

mon/MonClient: use generic Messenger factory
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit e55cb1f)
librados: use Messenger factory method
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 5a860be)
use simplifed messenger constructor for clients
This is all mechanical except the calculation of the nonce, which is
now always randomized for clients.

Fixes: #13032
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
(cherry picked from commit a3a8c85)

Conflicts:
	src/ceph_fuse.cc
	src/ceph_syn.cc
	src/libcephfs.cc
	src/librados/RadosClient.cc
	src/mds/MDSUtility.cc
	src/mon/MonClient.cc
	src/test/mon/test_mon_workloadgen.cc
            - different arguments to Messenger::create() in firefly
@smithfarm

This comment has been minimized.

Contributor

smithfarm commented Sep 27, 2015

@dachary: I used two commits from #2652 to get this to build.

@jdurgin

This comment has been minimized.

Member

jdurgin commented Sep 28, 2015

lgtm assuming testing passes

ghost pushed a commit that referenced this pull request Oct 20, 2015

Merge pull request #6087: client nonce collision due to unshared pid …
…namespaces

Reviewed-by: Loic Dachary <ldachary@redhat.com>

ghost pushed a commit that referenced this pull request Oct 20, 2015

Loic Dachary
Merge pull request #6087 from SUSE/wip-13244-firefly
client nonce collision due to unshared pid namespaces

Reviewed-by: Josh Durgin <jdurgin@redhat.com>

@ghost ghost merged commit 725401e into ceph:firefly Oct 20, 2015

@smithfarm smithfarm deleted the SUSE:wip-13244-firefly branch Oct 20, 2015

@ghost ghost changed the title from client nonce collision due to unshared pid namespaces to fs: client nonce collision due to unshared pid namespaces Oct 24, 2015

This issue was closed.

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