#question about fcp port

1 messages · Page 1 of 1 (latest)

bright folio
#

We have a custom zapi template for fcp port. It works well on our 4 node clusters. But on 2 node cluster it reports

│ 20:33:88:94:71:e5:ad:00" returned "flc2-02-prod-prt-storage 0f 10 20:00:88:94:71:e5:ad:00". Poller=flc2-prod-prt-storage collector=Zapi:Fcpport task=data```
Only works when one of the 2 nodes is down. Here is the template
```name:                     Fcp_Port
query:                    fcp-topology-port-get-iter
object:                   fcp_port
collect_only_labels:      true
counters:
  fcp-topology-port-info:
    - ^^adapter                 => adapter
    - ^^node                    => node
    - ^port-attached-wwpn       => port_attached_wwpn
    - ^port-state               => state
    - ^^port-slot               => port
    - ^port-wwpn                => port_wwpn
    - ^switch-name              => switch_name
    - ^switch-release           => switch_release
    - ^switch-vendor            => switch_vendor
    - ^switch-wwn               => switch_wwn
plugins:
  LabelAgent:
    # metric label zapi_value rest_value `default_value`
    value_to_num:
      - new_status state online online `0`
export_options:
  instance_keys:
    - node
    - adapter
    - port
  instance_labels:
    - switch_name
    - port_attached_wwpn
    - state
    - port_wwpn
    - switch_release
    - switch_vendor
    - switch_wwn

Any idea? Thanks!

ebon thorn
#

hi @bright folio that message is from ONTAP. I'm guessing there is a bug with that ZAPI. Let me see if I can find anything. What version of ONTAP is your two node running?

bright folio
#

9.8P11

ebon thorn
#

i can't find anything about this error and ran your template against 24 clusters I have in the lab with no loop detected errors Can you ask in the #1063542514780475493 channel. Hopefully someone there can point you to the ontap release that fixes this bug? If reproduce steps are needed, we can help you create a curl that sends the ZAPI. That way there is no Harvest in the mix...

bright folio
#

a curl will be greatly appreciated 😃 thanks!

ebon thorn
#

@stark wagon had a good idea to try before the curl. If you have Harvest's bin/zapi command handy you could try recreating it that way first. Can you try bin/zapi --poller $poller show data --api fcp-topology-port-get-iter against the two node and see if you get the same error?

bright folio
#

working on it

bright folio
#

it does return some 100 records then stopped. no error.

connected to flc2-prod-prt-storage (NetApp Release 9.8P11: Sat Mar 12 10:19:15 UTC 2022)
<root>
blah
</next-tag><num-records>100</num-records>
</root>```
ebon thorn
#

ok that's good - how many records are there?

bright folio
#

100

#

<num-records>100</num-records>

ebon thorn
#

right, i meant on the cluster, how many are there. bin/zapi returned 100 because it defaults to asking for at most 100

bright folio
#

think is 64x2==128?

ebon thorn
#

you can also add a --max num like this to request all of them bin/zapi --max 1000 --poller $poller show data --api fcp-topology-port-get-iter

bright folio
#

ssh flc2.prod.prt.storage.tmcs network fcp topology show
returned
512 entries were displayed.

ebon thorn
#

ah! ok that makes more sense

#

and what if you run bin/zapi with a max of 1000? does that return all or fail with error

bright folio
#

bin/zapi --max 1000 --poller flc2-prod-prt-storage show data --api fcp-topology-port-get-iter returns without error
</fcp-topology-port-info></attributes-list><num-records>512</num-records>

ebon thorn
#

ok can you try changing your fcp_port.yaml template - we want to try increasing Harvest's default batch size for ZAPIs, which is 500 (yes, above I said 100, but the cli client has different defaults). The edit looks like this

bright folio
#

ok. will report back

ebon thorn
#

the thinking is the ONTAP bug is only triggered when paginating the returned records. By that theory, bin/zapi --max 1000 worked because we returned all records in one "page" of results. Your template is using the default of 500 records which means two pages. Using batch_size: 1000 should pull them all back in one page like the bin/zapi did. 🤞

bright folio
#

It workded! thanks for your help!