FreeNAS API not returning all snapshots

Status
Not open for further replies.

praecorloth

Contributor
Joined
Jun 2, 2011
Messages
159
Hello,

I'm trying to work with the FreeNAS API to monitor my snapshots. The test system, a 9.10.2-U5 machine, has almost 2500 snapshots. But the API only returns about 19 snapshots. And not from the beginning or end of the list of snapshots (assuming the list is generated using zfs list -t snapshot), but from a section in the middle of all of the snapshots.

I am doing something wonky here in that I have a non-FreeNAS machine replicating to this FreeNAS machine. The snapshots that are returned are not FreeNAS snapshots, which is fine, as I want to see all of the snapshots. But there are plenty more FreeNAS and non-FreeNAS snapshots to be had.

I'm in the process of spinning up another test environment that will just do FreeNAS to FreeNAS snapshots and replication, just to rule out these other snapshots as being a problem. But I thought I'd post here to see if anyone else has run into this or similar issue with the API.

The data was pulled from the API using Python 3, as well as just hitting up the storage/snapshot end point in a web browser (Chrome, Chromium, and Firefox).
 
D

dlavigne

Guest
That's an old version. Do you get the same results on 11.1-U6?
 

praecorloth

Contributor
Joined
Jun 2, 2011
Messages
159
I don't have a 11.1-U6 FreeNAS machine available. I do have a 11.2-RC1 box handy. This one does not have any non-FreeNAS snapshots on it. It returns 20 snapshots about 3800.
 
D

dlavigne

Guest
Paste your API call and the resulting output (sanitize the snapshot names if you wish).
 

praecorloth

Contributor
Joined
Jun 2, 2011
Messages
159
Oops, I'm sorry, I stopped coming back after a while. Just checking back today. Alright, I've installed a fresh FreeNAS 11.1-U4 VM, gave it some storage, and set it to taking snapshots. It now has 32 snapshots, and the API returns 19. I'm just browsing to the FreeNAS IP address, and hitting up /api/v1.0/storage/snapshot/. Screenshots attached.
 

Attachments

  • Selection_045.png
    Selection_045.png
    23.9 KB · Views: 251
  • Selection_046.png
    Selection_046.png
    76 KB · Views: 260
Status
Not open for further replies.
Top