Subscribe

WFA autotest controller/cluster credentials

Gentlemen,

 

Many times admin/root passwords on controllers/cluster change and suddenly part of a workflow fails for that specific controller/cluster.

 

Would like to know if there is a way for WFA to autotest it's own credentials ( for existence and also to validate the credentials ) so we can callback BAO and open a ticket to fix, all running in the background, to minimize workflow failing because of lack of credentials or admin/root pwd change.

 

Thanks in advance.

Re: WFA autotest controller/cluster credentials

Hi:

 

That is a good suggestion.

There can be couple of ways in which it can be done:

1. The best way will be to do in OCUM 6.4 or 7.0. In OCUM, check if an event can be generated and an email can be sent.

2. In WFA a workflow can be recurringly scheduled to check the status of the clusters. A mail can be sent in case a filer is down.

However this will introduce another monitoring engine on top of OCUM. So the best way will be do it via OCUM since

OCUM already runs a monitoring engine.

 

Regards

Abhi

Re: WFA autotest controller/cluster credentials

Thanks for the update, will need to include OCUM as well.

 

For WFA credential test, tried the following with POSH ( try/catch/finally, so it does not fail in a way that can stop the workflow row iteration ):

 

function check_credential ( $array, $file )
{

$cred = ""
$cred = Get-WfaCredentials -HostName $array -errorAction SilentlyContinue

If ( $cred )
{ #1
$could_not_connect = 0

$resu = ""
try
{
if ($array -match "nas" )
{
Get-WFALogger -Info -message $("Trying connection to 7mode controller $array !! " )
$resu = Connect-WfaController -Array $array
Get-WFALogger -Info -message $("Connected to array $array !! " )
}
elseif ($array -match "ncs" ) #cdot!
{
Get-WFALogger -Info -message $("Trying connection to cdot cluster $array !! " )
$resu = Connect-WfaCluster $array
Get-WFALogger -Info -message $("Connected to cluster $array !! " )
}
}
catch
{
$could_not_connect = 1
Get-WFALogger -Info -message $("Could not connect to array $array . " )
}
finally
{
if ( $could_not_connect )
{
Get-WFALogger -Info -message $("Valid cred.Confirmed.Could not connect to array $array ." )
$liner = "WFA found credentials for $array but could not connect. l |Expected Value:Please connect to WFA as admin and update credentials for $array ( in case root/admin credentials changed please also update them in OCUM/OCPM ) |" + "`n"
Add-Content ".\$file" "$liner"
Exit
}
else
{
Get-WFALogger -Info -message $("Valid cred.Confirmed.Could connect to array $array ." )
}
} # end finally

} #end if cred
else
{
Get-WFALogger -Info -message $("WFA could not find valid credentials for $array. " )
$liner = "WFA could not find credentials for $array |Expected Value:Please connect to WFA as admin and add root/admin credentials for $array|" + "`n"
Add-Content ".\$file" "$liner"
Exit
}

} # end check credential function