-
New Feature
-
Resolution: Fixed
-
Minor
-
None
-
9223372036854775807
A general import and export for nodemaps and their properties would be beneficial, e.g., for backup, parsing, restore, etc. For exporting nodemap YAML definitions, the existing lctl nodemap_info can be extended. For importing nodemap YAML definitions, a new command, e.g., lctl nodemap_import, can be added. In addition, the API should allow enough flexibility to restrict the export/import to specific nodemaps and their properties so that users are not required to manually modify the YAML definition, e.g., to remove unwanted nodemaps or properties before importing.
This issue targets YAML export:
The following API definition is possible:
(extended) lctl nodemap_info [--name <nodemap_name>] [--list] [–-yaml] [–-property <value>]
- Adds the new --yaml argument which extends the existing lctl nodemap_info command to support YAML-formatted output.
- All arguments are optional so that lctl nodemap_info. For example, only using --yaml would output all nodemaps in YAML format.
- Using additional arguments to specify a nodemap and/or property restricts the output.
- --property may be used multiple times to allow several properties to be exported.
Sample YAML definition:
nodemap.c0.admin_nodemap: 0 nodemap.c0.audit_mode: 1 nodemap.c0.deny_unknown: 0 nodemap.c0.exports: [ { nid: 192.155.155.50@tcp, uuid: bb3e4906-d094-4afb-a8bb-8ff66a6bb518 } ] nodemap.c0.fileset: /remote nodemap.c0.forbid_encryption: 0 nodemap.c0.id: 2 nodemap.c0.idmap: [ { idtype: uid, client_id: 1003, fs_id: 11000 }, { idtype: gid, client_id: 1003, fs_id: 11000 } ] nodemap.c0.map_mode: all nodemap.c0.offset: { start_uid: 0, limit_uid: 0, start_gid: 0, limit_gid: 0, start_projid: 0, limit_projid: 0 } nodemap.c0.ranges: [ { id: 2, start_nid: 192.155.155.50@tcp, end_nid: 192.155.155.50@tcp } ] nodemap.c0.rbac: file_perms,dne_ops,quota_ops,byfid_ops,chlg_ops,fscrypt_admin,server_upcall,ignore_root_prjquota,hsm_ops nodemap.c0.readonly_mount: 0 nodemap.c0.sepol: nodemap.c0.squash_gid: 65534 nodemap.c0.squash_projid: 65534 nodemap.c0.squash_uid: 65534 nodemap.c0.trusted_nodemap: 0