global, osd/crimson: improve handling of the crimson-osd instance duplication#35337
Merged
tchaikov merged 3 commits intoceph:masterfrom Jun 3, 2020
Merged
Conversation
Contributor
Author
rzarzynski
commented
Jun 1, 2020
src/crimson/osd/main.cc
Outdated
| local_conf().parse_config_files(conf_file_list).get(); | ||
| local_conf().parse_argv(ceph_args).get(); | ||
| pidfile_write(local_conf()->pid_file); | ||
| if (auto ret = pidfile_write(local_conf()->pid_file); |
c1decc1 to
bdb1fc5
Compare
tchaikov
approved these changes
Jun 1, 2020
ideepika
approved these changes
Jun 1, 2020
Contributor
|
jenkins test crimson perf |
Contributor
tracked by https://tracker.ceph.com/issues/45694 |
Contributor
|
jenkins test make check |
Contributor
this test failed, but it proves ceph/ceph-build#1576 . |
Contributor
|
jenkins test crimson perf |
Contributor
Author
|
Contributor
Author
|
jenkins test crimson perf |
ronen-fr
approved these changes
Jun 2, 2020
src/crimson/osd/main.cc
Outdated
| ceph_abort_msg( | ||
| "likely there is another crimson-osd instance with the same id"); | ||
| } else if (ret < 0) { | ||
| ceph_abort_msg(fmt::format("pidfile_write failed with {}", ret)); |
Contributor
There was a problem hiding this comment.
Can we use cpp_strerror(-ret) here?
Contributor
Author
There was a problem hiding this comment.
Sure, will switch in a moment.
The motivation is to assert-with-human-readable-error on spawning a crimson-osd with already occupied ID. Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
The goal is to never implicitly ignore errors that the function can return, particularly the failure on pidfile locking due to the file being hold by another instance. This problem happened recently in crimson-osd. Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
bdb1fc5 to
847e723
Compare
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard backendjenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox