Skip to content
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

mgr/cephadm: fix 'cephadm osd activate' on existing osd devices #44228

Merged
merged 3 commits into from Dec 17, 2021

Conversation

liewegas
Copy link
Member

@liewegas liewegas commented Dec 6, 2021

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
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 cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@liewegas liewegas changed the title <!-- - Please give your pull request a title like mgr/cephadm: fix 'cephadm osd activate' on existing osd devices Dec 7, 2021
@liewegas
Copy link
Member Author

jenkins test api

When this code was introduced way back in ea987a0,
for some reason I was focused only on freshly created OSDs.  The
get_osd_uuid_map() helper is used by deploy_osd_daemons_for_existing_osds()
which is called not only by OSD creation but also by 'ceph cephadm
osd activate', which is meant to instantiate daemons for existing OSD
devices (e.g., devices that were reattached to a new server, or whose
/var/lib/ceph/$fsid/osd.$id directory was lost for some other reason.
However, if we ignore OSDs with up_from > 0, then we can't recreate a
daemon instance for such existing OSDs--arguably the most important ones,
since they may hold real data.

Fixes: https://tracker.ceph.com/issues/53491
Signed-off-by: Sage Weil <sage@newdream.net>
If we are trying to deploy new or newly-found osds, we can skip the ones
that already have cephadm daemons deployed.

Fixes: https://tracker.ceph.com/issues/53491
Signed-off-by: Sage Weil <sage@newdream.net>
Make sure this command behaves when the /var/lib/ceph osd.NNN dir is
removed.

Signed-off-by: Sage Weil <sage@newdream.net>
@liewegas liewegas merged commit 12bf02a into ceph:master Dec 17, 2021
@liewegas liewegas deleted the cephadm-fix-osd-activate branch January 13, 2022 19:54
adk3798 added a commit to adk3798/ceph that referenced this pull request Jun 6, 2022
As is already done when checking the lvm list
results and should also be done for checking raw
list but is missing do ot a backporting mistake

Tachnically a partial backport of ceph#44228 that
was not included in ceph#44627 because raw osd support
was not in pacific then

Signed-off-by: Adam King <adking@redhat.com>
mkogan1 pushed a commit to mkogan1/ceph that referenced this pull request Jun 23, 2022
As is already done when checking the lvm list
results and should also be done for checking raw
list but is missing do ot a backporting mistake

Tachnically a partial backport of ceph#44228 that
was not included in ceph#44627 because raw osd support
was not in pacific then

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 9f4800a)

Resolves: rhbz#2094112
Resolves: rhbz#2093788
mkogan1 pushed a commit to mkogan1/ceph that referenced this pull request Aug 7, 2022
As is already done when checking the lvm list
results and should also be done for checking raw
list but is missing do ot a backporting mistake

Tachnically a partial backport of ceph#44228 that
was not included in ceph#44627 because raw osd support
was not in pacific then

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 9f4800a)

Resolves: rhbz#2094112
Resolves: rhbz#2093788
NitzanMordhai pushed a commit to NitzanMordhai/ceph that referenced this pull request Nov 19, 2023
As is already done when checking the lvm list
results and should also be done for checking raw
list but is missing do ot a backporting mistake

Tachnically a partial backport of ceph#44228 that
was not included in ceph#44627 because raw osd support
was not in pacific then

Signed-off-by: Adam King <adking@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants