Project

General

Profile

Bug #36238

Add VMware sync support for snapshots to APIv1

Added by Vaibhav Chauhan about 2 years ago. Updated about 2 years ago.

Status:
Done
Priority:
No priority
Assignee:
Waqar Ahmed
Category:
Middleware
Target version:
Severity:
Low Medium
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

creating this ticket as a reminder


Related issues

Related to FreeNAS - Bug #35626: Convert VMware Snapshot page to websocket in new UIDone

Associated revisions

Revision 8589fde4 (diff)
Added by Waqar Ahmed about 2 years ago

Vmware sync support added for snapshots in API v1 This commit adds support for vmware sync when taking snapshots via api v1 Ticket: #36238

History

#1 Updated by William Grzybowski about 2 years ago

  • Status changed from Unscreened to Screened
  • Target version changed from Backlog to 11.2-RC2
  • Severity changed from New to Low Medium
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#2 Updated by Vaibhav Chauhan about 2 years ago

  • Related to Bug #35626: Convert VMware Snapshot page to websocket in new UI added

#3 Updated by William Grzybowski about 2 years ago

  • Status changed from Screened to Unscreened
  • Assignee changed from William Grzybowski to Waqar Ahmed
  • Target version changed from 11.2-RC2 to 11.2-BETA2

Waqar, we have a POST /storage/snapshot/ endpoint to create a snapshot. We need to change that to use the Django manual snapshot form, which supports the vmware sync field.

Thanks!

#4 Updated by Waqar Ahmed about 2 years ago

  • Status changed from Unscreened to In Progress

#5 Avatar?id=14398&size=24x24 Updated by Kris Moore about 2 years ago

  • Parent task deleted (#33900)

#6 Updated by Waqar Ahmed about 2 years ago

  • Status changed from In Progress to Ready for Testing

#7 Updated by Dru Lavigne about 2 years ago

  • Subject changed from please support vmware_sync for rest storage/snapshot call (if not already) to Add VMware sync support for snapshots to APIv1

#8 Updated by Dru Lavigne about 2 years ago

  • Related to deleted (Bug #35626: Convert VMware Snapshot page to websocket in new UI)

#9 Updated by Dru Lavigne about 2 years ago

  • Has duplicate Bug #35626: Convert VMware Snapshot page to websocket in new UI added

#10 Updated by Dru Lavigne about 2 years ago

  • Has duplicate deleted (Bug #35626: Convert VMware Snapshot page to websocket in new UI)

#11 Updated by Dru Lavigne about 2 years ago

  • Related to Bug #35626: Convert VMware Snapshot page to websocket in new UI added

#12 Updated by Eric Turgeon about 2 years ago

From below should we be able to reuse the name "ready" when deleted?

In [18]: payload = {
    ...:           "dataset": "tank",
    ...:           "name": "ready",
    ...:           "recursive": True,
    ...:           "vmware_sync": True
    ...:   }

In [19]: POST('/storage/snapshot/', payload).text
Out[19]: '{"filesystem": "tank", "fullname": "tank@ready", "id": "tank@ready", "mostrecent": true, "name": "ready", "parent_type": "filesystem", "refer": 90112, "used": 0}'

In [20]: DELETE('/storage/snapshot/tank@ready/').text
Out[20]: ''

In [21]: DELETE('/storage/snapshot/tank@ready/').text
Out[21]: '{"error": "Invalid snapshot"}'

In [22]: POST('/storage/snapshot/', payload).text
Out[22]: '{"error": "Snapshot could not be taken: cannot create snapshot \'tank/share@ready\': dataset already exists\\ncannot create snapshot \'tank/jails@ready\': dataset already exists\\ncannot create snapshot \'tank/testuser@ready\': dataset already exists\\ncannot create snapshot \'tank/snapcheck@ready\': dataset already exists\\ncannot create snapshot \'tank/.system@ready\': dataset already exists\\ncannot create snapshot \'tank/.system/rrd-e8bc44d546b1474cb10948820b10de35@ready\': dataset already exists\\ncannot create snapshot \'tank/.system/configs-e8bc44d546b1474cb10948820b10de35@ready\': dataset already exists\\ncannot create snapshot \'tank/.system/webui@ready\': dataset already exists\\ncannot create snapshot \'tank/.system/cores@ready\': dataset already exists\\ncannot create snapshot \'tank/.system/syslog-e8bc44d546b1474cb10948820b10de35@ready\': dataset already exists\\ncannot create snapshot \'tank/.system/samba4@ready\': dataset already exists\\ncannot create snapshot \'tank/webdav-bsd-share@ready\': dataset already exists\\nno snapshots were created\\n"}'

#14 Updated by Eric Turgeon about 2 years ago

22048

My bad making a snapshot on tank have created a snapshot for all dataset and I did not look at what dataset was created.

So now knowing that I was able to delete one of the snapshots and recreated it under the same name.

In [2]: from functions import POST, DELETE, GET, PUT

In [3]: DELETE('/storage/snapshot/tank/jails@ready/').text
Out[3]: ''

In [4]: payload = {
   ...:           "dataset": "tank/jails",
   ...:           "name": "ready",
   ...:           "recursive": True,
   ...:           "vmware_sync": True
   ...:   }

In [5]: POST('/storage/snapshot/', payload).text
Out[5]: '{"filesystem": "tank/jails", "fullname": "tank/jails@ready", "id": "tank/jails@ready", "mostrecent": true, "name": "ready", "parent_type": "filesystem", "refer": 90112, "used": 0}'

Thanks, Waqar for your help

#15 Updated by Dru Lavigne about 2 years ago

  • Status changed from Passed Testing to Done

Also available in: Atom PDF