Skip to content

SMAPIv1 improvements for XCP-ng 8.2 #411

@stormi

Description

@stormi

There are several features that require improvements to the SMAPIv1 so they don't add technical debt and can be maintained confidently.

Features:

Related required improvements:

  • Create maintenance branches in our sm fork, that will be the basis for creating the patches we'll apply to the sm RPM.
  • Document their naming: Update develprocess.md xcp-ng-org#16
  • Merge sm-additional-drivers into sm (source repo and RPM -- I can do the RPM part (@stormi))
  • Update driver error messages to hint at missing packages (xfsprogs, glusterfs, ceph, linstor stuff...), since the drivers can be present without their dependencies. This is not a regression for the new drivers we are adding, but can be seen as one for the experimental xfs driver (sm-additional-drivers did pull xfs-progs). The situations where we can expect errors due to missing packages are:
    • attempts at creating a new SR
    • trying to use a SR after an upgrade (additional RPMs are not kept after an ISO upgrade)
      • Very important: when a required package is missing, we MUST make sure scanning the SR explicitly fails. It must not "believe" that the filesystem is appropriately mounted and consider that it's empty, else all metadata is wiped and lost.
        List of dependencies:
    • xfs: needs xfsprogs
    • gluster: needs glusterfs-server
    • cephfs: needs ceph-common
    • linstor: needs python-linstor (Package is direclty used, and if LINSTOR is not connected, an exception is always thrown. So It's not useful to test it.)
    • zfs: needs zfs
  • Patch sm to let storage drivers give their cleanupType themselves rather than using a hardcoded correspondance list. That list is a pain to change each time we add a driver. => not easy to to because cleanup.py doesn't import the driver classes themselves.
    • So we'll just remove the monkey patching from the Gluster, Ceph and maybe other drivers and keep modifying the hardcoded correspondance in cleanup.normalizeType
  • Update the list of supported drivers in xapi.conf. Ideally make that default list NOT belong in a user-modifiable config file like it is currently, because it's painful to update with rpm (need to modify it through a scriplet since it's %config(noreplace)). The * value seems to be a possible solution to let XAPI accept any SM driver that is present. See [question] Are there drawbacks to setting sm-plugins=* in xapi.conf? xapi-project/xen-api#4159. Else let's continue to use a RPM scriptlet and make sure we don't mess up.
  • Rename classes in GlusterSR.py (they are not consistent with the file name and the driver identifier)
  • Also check sm source code for other changes required to really 100% support the additional drivers. There were for ext4 that we never made, and could be for other drivers too. Example: get_o_direct_capability => moved to sm code update for the added drivers #423
  • Contribute what can be contributed upstream to the XAPI project. => nothing probably as sm is "the past" and they're probably not very interested in adding drivers to it

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions