ONTAP Discussions

Is (na_results_status(out)!=NA_OK) sufficient?

garethgriffiths
2,175 Views

Looking at the sample code it always seems to just check na_results_status(out)  for not NA_OK as an indication of error. In most cases it we got NA_OK it says we're good.

I'm trying to use snapshot-multicreate and it seems I can get na_results_status(out) as NA_OK but the call didn't work. What SHOULD I check...

Options seem to be to see if there was any <volume-error> tag or a <status>false</status>. I'm still surprised that I didn't get a non OK result from na_results_status(out)

This is ONTAP 8.2 cluster mode. The output buffer looks like:

<?xml version='1.0' encoding='UTF-8' ?>

<netapp version='1.20' xmlns='http://www.netapp.com/filer/admin'>

          <results status='passed'>

                    <status>false</status>

                    <volume-errors>

                              <volume-error>

                                        <errno>13025</errno>

                                        <name>vol_mt_14</name>

                                        <reason>Snapshot operation failed: No space left on device.</reason>

                              </volume-error>

                    </volume-errors>

                    <volume-is-snapcreated-list>

                              <volume-is-snapcreated>

                                        <is-snapcreated>false</is-snapcreated>

                                        <name>vol_mt_00</name>

                              </volume-is-snapcreated>

                              <volume-is-snapcreated>

                                        <is-snapcreated>false</is-snapcreated>

                                        <name>vol_mt_01</name>

                              </volume-is-snapcreated>

                              <volume-is-snapcreated>

                                        <is-snapcreated>false</is-snapcreated>

                                        <name>vol_mt_02</name>

                              </volume-is-snapcreated>

...

...

1 REPLY 1

zulanch
2,175 Views

It looks like the status returned by snapshot-multicreate works a bit differently from other APIs for Clustered ONTAP. The documentation notes:

For clustered systems, the output 'status' will be set to FALSE in case of failure. In such case the caller should look at the output 'volume-errors' to find out in which volume snapshot creation failed.

So in most cases, keep checking for NA_OK. But here, check the status output.

Public