Active IQ Unified Manager Discussions

Workflow for increasing inodes failing but reporting as "Completed" in WFA

kofchur
4,312 Views

Hi folks.

I'm running WFA

2.0.1.23.8.  In executing a workflow that has the following command/code, if the volume inode limit is exceeded, WFA will not report that the command has failed.  Here is the command:

#########################################

param (
  [parameter(Mandatory=$true, HelpMessage="Cluster IP Address")]
  [string]$Cluster,

  [parameter(Mandatory=$true, HelpMessage="Volume name")]
  [string]$VolumeName,
 
  [parameter(Mandatory=$true, HelpMessage="Vserver name")]
  [string]$VserverName,

  [parameter(Mandatory=$true, HelpMessage="Percent to increase FilesTotal")]
  [int]$IncreasePct
)

# connect to controller
Connect-WfaCluster $Cluster

$vol = Get-NcVol -Name $VolumeName -Vserver $VserverName -ErrorAction SilentlyContinue
if(!$vol)
{
    throw "No Volume named '" + $VolumeName + "' was found"
}

Get-WFALogger -Info -message $("Increase CM Vol FilesTotal: '"+ $VolumeName + "' on VServer '" +$VserverName + "' by: "+$IncreasePct+"%")

$q = Get-Ncvol -Template
Initialize-NcObjectProperty $q VolumeIdAttributes
$q.VolumeIdAttributes.Name = $VolumeName
$q.VolumeIdAttributes.OwningVserverName = $VerserName
           
$IncreaseFactor = ($IncreasePct * .01) + 1

$v = Get-Ncvol -Query $q
Get-WFALogger -Info -message $("Increase CM Vol FilesTotal: '"+ $VolumeName + "' on VServer '" +$VserverName + "' Current: "+$v.FilesTotal)

[int]$newfilestotal = $v.FilesTotal * $IncreaseFactor

Get-WFALogger -Info -message $("Increase CM Vol FilesTotal: '"+ $VolumeName + "' on VServer '" +$VserverName + "' New: "+$newfilestotal)
Set-NcVolTotalFiles  -name $VolumeName -totalfiles $newfilestotal -vserver $VserverName -ErrorAction SilentlyContinue

###############################################################

Here is the ouput of the some of the logs:

12:37:15.205 INFO  [null] ***** Workflow Execution Started *****

12:37:15.283 INFO  [Increase CM Vol FilesTotal] ### Command 'Increase CM Vol FilesTotal' ###

12:37:17.170 INFO  [Increase CM Vol FilesTotal] Executing command: ./Increase_CM_Vol_FilesTotal2449562786458417931.ps1 -Cluster 10.4.81.1 -IncreasePct 10 -VolumeName wfa_opsmart_test1 -VserverName vsnfsbbl

12:37:17.202 INFO  [Increase CM Vol FilesTotal] Get-NaCredentials -Host 10.4.81.1

12:37:17.233 INFO  [Increase CM Vol FilesTotal] Credentials successfully provided for '10.4.81.1'

12:37:17.264 INFO  [Increase CM Vol FilesTotal] Connect-NcController (with credentials) -Name 10.4.81.1

12:37:19.167 INFO  [Increase CM Vol FilesTotal] Connected to cluster node

12:37:20.634 INFO  [Increase CM Vol FilesTotal] Increase CM Vol FilesTotal: 'wfa_opsmart_test1' on VServer 'vsnfsbbl' by: 10%

12:37:20.805 INFO  [Increase CM Vol FilesTotal] Increase CM Vol FilesTotal: 'wfa_opsmart_test1' on VServer 'vsnfsbbl' Current: 1712109

12:37:20.821 INFO  [Increase CM Vol FilesTotal] Increase CM Vol FilesTotal: 'wfa_opsmart_test1' on VServer 'vsnfsbbl' New: 1883320

12:37:22.006 INFO  [Increase CM Vol FilesTotal] Command completed, took 6723 milliseconds

12:37:22.022 INFO  [null] ***** Workflow Execution Completed *****

2013-09-24 12:34:16,944 UTC INFO  [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-68) [Increase CM Vol FilesTotal]   Increase CM Vol FilesTotal: 'wfa_opsmart_test1' on VServer 'vsnfsbbl' by: 10%

2013-09-24 12:34:17,115 UTC INFO  [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-59) [Increase CM Vol FilesTotal]   Increase CM Vol FilesTotal: 'wfa_opsmart_test1' on VServer 'vsnfsbbl' Current: 1712109

2013-09-24 12:34:17,131 UTC INFO  [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-66) [Increase CM Vol FilesTotal]   Increase CM Vol FilesTotal: 'wfa_opsmart_test1' on VServer 'vsnfsbbl' New: 1883320

2013-09-24 12:34:18,223 UTC INFO  [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (WorkManager(2)-62) [Increase CM Vol FilesTotal]   Command completed, took 6615 milliseconds

2013-09-24 12:34:18,238 UTC INFO  [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (WorkManager(2)-62) ***** Workflow Execution Completed *****

2013-09-24 12:34:18,270 UTC INFO  [com.netapp.wfa.job.backend.JobsExecutionInterceptor] (WorkManager(2)-62) Job WorkflowJob{workflowId=53, workflowName='BB_Increase_Vol_Max_Files', userInputs={$VserverName=MapValueWrapper{value='vsnfsbbl'}, $CRNumber=MapValueWrapper{value='null'}, $IncreasePct=MapValueWrapper{value='10'}, $ClusterName=MapValueWrapper{value='bbcs1va3'}, $VolumeName=MapValueWrapper{value='wfa_opsmart_test1'}}, executionComment=Opsmart Inode AutoGrow call through API} JobConfiguration{id=860, jobScheduleInfo=JobScheduleInfo{id=860}, created=2013-09-24 12:34:06.0} finished successfully

2013-09-24 12:36:20,917 UTC INFO  [com.netapp.wfa.job.backend.JobsExecutionInterceptor] (WorkManager(2)-64) Job CacheJob{, dataSourceId=DataSourceInfo{id=2, name='Initial DFM', connectionDetails=ConnectionDetails{id=2, ip='10.10.0.1', port=2638, userName='wfa', password='******'}, dataProviderType=DataProviderType{id=6, productType='OnCommand Unified Manager (DFM)', productVersion='5.1.X,5.2 Cluster-Mode', driverType='SYBASE'}}, schemeId=Scheme{id=4, name='cm_storage'}, dataSourceName='Initial DFM', schemeName='cm_storage'} started

2013-09-24 12:36:28,124 UTC INFO  [com.netapp.wfa.job.backend.JobsExecutionInterceptor] (WorkManager(2)-64) Job CacheJob{, dataSourceId=DataSourceInfo{id=2, name='Initial DFM', connectionDetails=ConnectionDetails{id=2, ip='10.10.0.1', port=2638, userName='wfa', password='******'}, dataProviderType=DataProviderType{id=6, productType='OnCommand Unified Manager (DFM)', productVersion='5.1.X,5.2 Cluster-Mode', driverType='SYBASE'}}, schemeId=Scheme{id=4, name='cm_storage'}, dataSourceName='Initial DFM', schemeName='cm_storage'} finished successfully

2013-09-24 12:37:09,979 UTC INFO  [com.netapp.wfa.ws.WorkflowServiceImpl] (http-0.0.0.0-443-6) Could not find WorkflowExecution result for jobId: 8261 returning empty RetrunParameter[]

2013-09-24 12:37:10,244 UTC INFO  [com.netapp.wfa.ws.WorkflowServiceImpl] (http-0.0.0.0-443-6) Could not find WorkflowExecution result for jobId: 8261 returning empty RetrunParameter[]

So basically, I'm looking at the last two lines about "returning empty  ReturnParameter".  It seems that the code is not handling errors correctly.  Here is what happens if you want increase the same volume with the same percentage on the cluster:

bbcs1va3::> vol modify -vserver vsnfsbbl -volume wfa_opsmart_test1 -files 1883319
  (volume modify)

Error: command failed: Unable to set volume attributes for volume "wfa_opsmart_test1" on Vserver "vsnfsbbl". Reason: Unable to set attribute
       files-total for volume. Reason: current value (1712109) is over the maximum allowable limit (595827) and cannot
       be increased. Maxfiles remains at 1712109.

Thanks in advanced.

Todd

1 ACCEPTED SOLUTION

kandati
4,312 Views

Hi Todd,

Try the last cmd-let  with "-ErrroAction stop" instead of "-ErrorAction SilentlyContinue"

Set-NcVolTotalFiles  -name $VolumeName -totalfiles $newfilestotal -vserver $VserverName -ErrorAction stop

Warm Regards

Sivaprasad K

View solution in original post

4 REPLIES 4

kandati
4,313 Views

Hi Todd,

Try the last cmd-let  with "-ErrroAction stop" instead of "-ErrorAction SilentlyContinue"

Set-NcVolTotalFiles  -name $VolumeName -totalfiles $newfilestotal -vserver $VserverName -ErrorAction stop

Warm Regards

Sivaprasad K

kofchur
4,312 Views

That did it.  Thanks.

-todd

Trinh
3,910 Views

Do you mind sharing this WFA work flow?  I am looking for a similiar workflow.

geringer
3,892 Views

I noticed you are looking for a Increase Inode workflow.  I have attached one for clustered Data OnTap.

 

Mike

Public