sodafoundation / api

SODA Terra Project API module : is an open source implementation of SODA API connecting storage to platforms like Kubernetes, OpenStack, and VMware
Apache License 2.0
827 stars 316 forks source link

snapshot name should not start with snapshot prefix in lvm backend. #899

Open PravinRanjan10 opened 5 years ago

PravinRanjan10 commented 5 years ago

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug /kind feature

What happened: if backend is lvm, snapshot creation will fail, if snapshot name start with prefix "snapshot".

for example: lvcreate -n snapshot1 -L 1g -p r -s . it fail with below error: Names starting "snapshot" are reserved. Please choose a different LV name.

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

PravinRanjan10 commented 5 years ago

This issue is open for discussion. How to handle snapshopt name for lvm. Currently, volume snapshot is being created as: _snaphot+user_given_name+uuid. The discussion point is, why we are adding "_snaphot" as snpshot prefix?

Few commenst are given by jerry and sanil: Screenshot1

kumarashit commented 5 years ago

After creation of snapshot of fileshare, SnapshotId is not updated FS_Snap

root@ubuntu:/var/log/opensds# osdsctl fileshare show 4927ed62-ee91-4035-a58f-3df938058acd +------------------+-------------------------------------------------------------+ Property Value +------------------+-------------------------------------------------------------+ Id 4927ed62-ee91-4035-a58f-3df938058acd CreatedAt 2019-06-19T15:41:46 UpdatedAt 2019-06-19T15:41:46 TenantId 94b280022d0c4401bcf3b0ea85870519 UserId 558057c4256545bd8a307c37464003c9 Name test_fs Protocols [nfs] Description Size 1 AvailabilityZone default Status available PoolId 7bce6d5d-5256-5545-9070-d4af128e9fec ProfileId b1c9cc90-1491-4abd-b4e7-11f338d387ff SnapshotId ExportLocations [192.168.20.163:/var/test_fs] Metadata { "lvPath": "/dev/opensds-nfs/test_fs", "nfsFileshareID": "4927ed62-ee91-4035-a58f-3df938058acd", "nfsFileshareName": "test_fs" }

+------------------+-------------------------------------------------------------+

kumarashit commented 5 years ago

lvscan o/p: ACTIVE Original '/dev/opensds-nfs/test_fs' [1.00 GiB] inherit ACTIVE Snapshot '/dev/opensds-nfs/snp' [1.00 GiB] inherit