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

osd: Add cephcluster status for deprecated osds to replace #14187

Merged
merged 1 commit into from May 13, 2024

Conversation

travisn
Copy link
Member

@travisn travisn commented May 9, 2024

To follow up from #14100, we add status to the cephcluster CR that at least gives a clue that the OSDs should be replaced.
LVM-based OSDs on PVCs are legacy and are not well tested, so this is a small attempt to raise that fact in the status, even while we still attempt to keep them running.

This will result in status on the CephCluster such as:

  status:
    storage:
      deviceClasses:
      - name: hdd
      legacyOSDs:
      - id: 0
        reason: LVM-based OSD on a PVC (id=0) is deprecated and should be replaced
      - id: 1
        reason: LVM-based OSD on a PVC (id=1) is deprecated and should be replaced
      - id: 2
        reason: LVM-based OSD on a PVC (id=2) is deprecated and should be replaced
      osd:
        storeType:
          bluestore: 3

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Reviewed the developer guide on Submitting a Pull Request
  • Pending release notes updated with breaking and/or notable changes for the next minor release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

@satoru-takeuchi
Copy link
Member

@travisn Do you recall whether OSD on PVC is created about all configurations in main. If unsure, I can help you to verify it.

In addition, it's better to describe what lvm mode and raw mode are. Since OSD modes are not explained well in both rook (and ceph!), most users would not know about them at all. In addtion, it's better to write down replaced OSDs will be created as raw mode without any modification of CephCluster CR.

@travisn
Copy link
Member Author

travisn commented May 10, 2024

@travisn Do you recall whether OSD on PVC is created about all configurations in main. If unsure, I can help you to verify it.

I could not find how to create new OSDs on PVCs in LVM mode in the current code base. Even encrypted OSDs or OSDs with a metadata device are using raw mode when on PVCs. But I will look again to see if I missed any scenarios. If it is still possible to create new OSDs like this, then I need to be more limited about this deprecation message.

In addition, it's better to describe what lvm mode and raw mode are. Since OSD modes are not explained well in both rook (and ceph!), most users would not know about them at all. In addtion, it's better to write down replaced OSDs will be created as raw mode without any modification of CephCluster CR.

I will think more about this message. But I don't think they need to fully understand these mode, it is just important to know that we recommend they replace them.

@travisn travisn force-pushed the legacy-osd-status branch 3 times, most recently from 57c6c0f to 312ddef Compare May 10, 2024 21:56
@travisn
Copy link
Member Author

travisn commented May 10, 2024

Based on feedback, renaming the output and making it more efficient to avoid duplicating the message. Now the output is:

    storage:
      deprecatedOSDs:
        LVM-based OSDs on a PVC are deprecated, see documentation on replacing OSDs:
        - 0
        - 1
        - 2
      deviceClasses:
      - name: hdd

@travisn travisn changed the title osd: Add cephcluster status for legacy osds to replace osd: Add cephcluster status for deprecated osds to replace May 10, 2024
LVM-based OSDs on PVCs are legacy and are not well tested.
Therefore, we add status to the cephcluster CR that at least
gives a clue that the OSDs should be replaced.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
@travisn
Copy link
Member Author

travisn commented May 10, 2024

@satoru-takeuchi Looking again into the OSD creation, all OSDs on PVCs appear to always be created in raw mode. See here inside the initializeBlockPVC() method:

baseArgs = []string{"-oL", cephVolumeCmd, "raw", "prepare", storeFlag}
} else {
baseArgs = []string{"-oL", cephVolumeCmd, "--log-path", cvLogDir, "raw", "prepare", storeFlag}

I cannot find in my testing or in the code anywhere that lvm-mode OSDs can be created on PVCs. Therefore, I propose we declare them officially deprecated and with this status request that they be replaced, as they will be difficult to support. But if there is still some scenario where we will need to support these type of OSDs, at least this status does not prevent them from running.

@satoru-takeuchi satoru-takeuchi merged commit 39f8852 into rook:master May 13, 2024
53 checks passed
mergify bot added a commit that referenced this pull request May 13, 2024
osd: Add cephcluster status for deprecated osds to replace (backport #14187)
mergify bot added a commit that referenced this pull request May 13, 2024
osd: Add cephcluster status for deprecated osds to replace (backport #14187)
@travisn travisn deleted the legacy-osd-status branch May 22, 2024 13:58
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.

None yet

3 participants