Active IQ Unified Manager Discussions

"Failed to resolve expression '0f'" when creating a SAN SVM (NetApp Workflow)

EricBecker
4,883 Views

I'm getting the following error when calling "Create and configure SAN Storage Virtual Machine" NetApp workflow (ver 2.0.0).

 

 

Failed to resolve expression '0f'
Location: 'Create FCP Logical Interface' command > 'Logical_Interface' tab > 'fcp_lif2' variable > 'name' property

 

 

This only happens if I request 2 FCP LIFs; requesting 1 correctly creates the LIF on 0e.  I thought it was related to mvel interpretting the name variable as a float with a value of 0 as described in this thread (instead of a string 0f), but I was able to clone the filter and tweak the sql to wrap single quotes around port name and I still get the same error. 

 

Filter FCP adapters by online status_copy

 

SELECT
--    fcp_adapter.name
++ QUOTE(fcp_adapter.name) as 'name', node.name AS 'node.name', cluster.primary_address AS 'node.cluster.primary_address', count(logical_interface.id) AS lifCount FROM cm_storage.fcp_adapter JOIN cm_storage.node ON fcp_adapter.node_id = node.id JOIN cm_storage.cluster ON node.cluster_id = cluster.id LEFT JOIN cm_storage.logical_interface ON fcp_adapter.id = logical_interface.fcp_adapter_id WHERE fcp_adapter.status = 'online' AND ( cluster.primary_address = '${cluster}' OR cluster.name = '${cluster}' ) AND node.name = '${node_name}' GROUP BY fcp_adapter.name, node.name, cluster.primary_address

 

 

 

Failed to resolve expression '''0f'''
Location: 'Create FCP logical interface' command > 'Logical_Interface' tab > 'fcp_lif2' variable > 'name' property

 

I'd attach logs, but it doesn't appear they're created for this workflow (redirected to a 404 when I click on download logs).

 

 

1 ACCEPTED SOLUTION

sinhaa
4,860 Views

@EricBecker

 

 

 

 

Try this, Use CONCAT function to add double quotes in your query result.

 

SELECT
   CONCAT('"', fcp_adapter.name, '"') as 'name',
...
...

 

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

6 REPLIES 6

sinhaa
4,861 Views

@EricBecker

 

 

 

 

Try this, Use CONCAT function to add double quotes in your query result.

 

SELECT
   CONCAT('"', fcp_adapter.name, '"') as 'name',
...
...

 

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

sinhaa
4,837 Views

@EricBecker

 

Did it work for you? I didn't test it now as I don't have a WFA with me.

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

EricBecker
4,790 Views

Unfortunately no dice.  I just cloned "Create and configure SAN Storage Virtual Machine" and filter "Filter FCP adapters by online status" (both copies have _copy appended to the name), updated the filter as instructed, and pointed the Logical_Interface fcp_lif2 -> fcp_adapter filter to the newly copied version.  When I run it I get the following:

 

"0f" is an invalid port on node na-cluster1-01. Location: Row '4' step 'Create FCP Logical Interface'.

Contents of "Filter FCP adapters by online status_coph"

 

SELECT
    CONCAT('"',
    fcp_adapter.name,
    '"') as 'name',
    node.name AS 'node.name',
    cluster.primary_address AS 'node.cluster.primary_address',
    count(logical_interface.id) AS lifCount 
FROM
    cm_storage.fcp_adapter 
JOIN
    cm_storage.node         
        ON fcp_adapter.node_id = node.id 
JOIN
    cm_storage.cluster         
        ON node.cluster_id = cluster.id 
LEFT JOIN
    cm_storage.logical_interface         
        ON fcp_adapter.id = logical_interface.fcp_adapter_id 
WHERE
    fcp_adapter.status = 'online'     
    AND (
        cluster.primary_address = '${cluster}'         
        OR cluster.name = '${cluster}'     
    )     
    AND node.name = '${node_name}' 
GROUP BY
    fcp_adapter.name,
    node.name,
    cluster.primary_address

sinhaa
4,770 Views

@EricBecker

 

This is now a different issue. The original issue of unable to resolve the expression 0f is solved.

 

To solve this :

 

 Are you getting this error during workflow preview? Or Preview passed but the workflow execution failed? This is important to know. Looks like the error is corrert, the selected port doesn't belong to the shown node.

 

You would need to make the right selection. Or modify the query to handle this user-mistake. 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

EricBecker
4,728 Views

The original error with single quotes failed during preview and the new one with double quotes is failing in execution. The SVM is created and so are the lifs on 0e for both nodes.  It bombs when trying to assign the 3rd lif (the first node on port 0f). 

 

na-cluster1::> network interface show -vserver wfasan9_svm -data-protocol fcp
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
wfasan9_svm
            wfasan9_svm_fcp_lif_01 
                         up/up    20:15:00:a0:98:be:1f:44 
                                                     na-cluster1-01 
                                                                   0e      true
            wfasan9_svm_fcp_lif_02 
                         up/up    20:05:00:a0:98:be:1f:44 
                                                     na-cluster1-02 
                                                                   0e      true
2 entries were displayed.

 

The execution values pulled from the job history are:

 

Cluster=na-cluster1.**********

FCPAdapter="0f"

LogicalInterfaceName=wfasan9_svm_fcp_lif_03

Node=na-cluster1-01

VserverName=wfasan9_svm

 

The way the official NetApp workflow is written I have no ability to select another port and it's better for my scenario that the workflow does it automatically (as written by NetApp) to avoid user mistakes.  As near as I can tell, the cluster, node, vserver, and port are valid.  I can create the lif using the same parameter from the cli without issue.

 

 

na-cluster1::> network interface create -lif wfasan9_svm_fcp_lif_03 -vserver wfasan9_svm -home-node na-cluster1-01 -home-port 0f -role data -data-protocol fcp

na-cluster1::> network interface show -vserver wfasan9_svm -lif wfasan9_svm_fcp_lif_03

                    Vserver Name: wfasan9_svm
          Logical Interface Name: wfasan9_svm_fcp_lif_03
                            Role: data
                   Data Protocol: fcp
                       Home Node: na-cluster1-01
                       Home Port: 0f
                    Current Node: na-cluster1-01
                    Current Port: 0f
              Operational Status: up
                 Extended Status: NS Registration done
                         Is Home: true
                 Network Address: -
                         Netmask: -
             Bits in the Netmask: -
                     Subnet Name: -
           Administrative Status: up
                 Failover Policy: disabled
                 Firewall Policy: -
                     Auto Revert: false
   Fully Qualified DNS Zone Name: none
         DNS Query Listen Enable: -
             Failover Group Name: -
                        FCP WWPN: 20:06:00:a0:98:be:1f:44
                  Address family: -
                         Comment: -
                  IPspace of LIF: -
  Is Dynamic DNS Update Enabled?: -

 

I attempted to manually execute the powershell commands to see if there's an issue with the wfa module accepting the quoted port "0f" vs non-quoted values for everything else. 

 

 

PS C:\Program Files\NetApp\WFA\PoSH> $Cluster = "na-cluster1.********"
PS C:\Program Files\NetApp\WFA\PoSH> $FCPAdapter = "`"0f`""        ####escaping the second set of quotes so the "0f" value is passed to the module double quoted
PS C:\Program Files\NetApp\WFA\PoSH> $LogicalInterfaceName = "wfasan9_svm_fcp_lif_03"
PS C:\Program Files\NetApp\WFA\PoSH> $Node = "na-cluster1-01"
PS C:\Program Files\NetApp\WFA\PoSH> $VserverName = "wfasan9_svm"
PS C:\Program Files\NetApp\WFA\PoSH>
PS C:\Program Files\NetApp\WFA\PoSH> Connect-WfaCluster $Cluster
Get-WfaCredentials : Execution URI input line was not set.
At C:\Program Files\NetApp\WFA\PoSH\Modules\WFAWrapper\WFAWrapper.psm1:680 char:20
+     $credentials = Get-WfaCredentials -Host $Node
+                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-WfaCredentials], Exception
    + FullyQualifiedErrorId : System.Exception,WFA.GetWfaCredentials

Failed to connect to cluster node: na-cluster1.********.
Execution URI input line was not set.
At C:\Program Files\NetApp\WFA\PoSH\Modules\WFAWrapper\WFAWrapper.psm1:1396 char:5
+     throw $msg
+     ~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Failed to conne...ne was not set.:String) [], RuntimeException
    + FullyQualifiedErrorId : Failed to connect to cluster node: na-******.
Execution URI input line was not set.

PS C:\Program Files\NetApp\WFA\PoSH> New-NcNetInterface -Name $LogicalInterfaceName -Vserver $VserverName -Node $Node -Port $FCPAdapter -Role "data" -DataProtocols "fcp" -ErrorAction Stop
New-NcNetInterface : Value cannot be null.
Parameter name: Controller parameter neither specified nor set in $global:CurrentNcController
At line:1 char:1
+ New-NcNetInterface -Name $LogicalInterfaceName -Vserver $VserverName ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [New-NcNetInterface], ArgumentNullException
+ FullyQualifiedErrorId : ControllerNotSpecified,DataONTAP.C.PowerShell.SDK.Cmdlets.Net.NewNcNetInterface

 

Apparently the module needs to run inside of WFA due to the credentials.

sinhaa
4,604 Views

@EricBecker

 

Running a WFA command outside of WFA i.e. from a Powershell ISE needs some work. I'll post it today.

 

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Public