Active IQ Unified Manager Discussions

Some workflows stopped working after WFA upgrade

Zoltan_Somogyvari
11,624 Views

Hi All,

 

I've a problem with a workflow after I've updated WFA version from 4.1 to 5.0.1.  An user input query which select a snapshot drops an error when I wanted to modify/save the workflow:

 

1.JPG2.JPG

 

Addionally I have a Acquire data source" and “Wait for data source acquisition” fail error, but I will try this souliton suggested here: https://kb.netapp.com/app/answers/answer_view/a_id/1087616

 

But right now I'm not able to save it because of the above mentioned error.

What do you Guys suggest?

 

Many Thanks

Zoltan

 

 

 

 

1 ACCEPTED SOLUTION

mbeattie
11,449 Views

Hi Zoli

 

Okay the WFA snapshot pack installed on WFA5 and your query works successfully as root. What's the output of:

 

SHOW GRANTS FOR 'restricted'@'localhost';

Is it possible the "restricted" database user does not have appropriate permissions the "cm_storage_smsv" database???

If the result is that the user does not have to permission connect to MySQL as root and  grant permissions:

 

GRANT ALL PRIVILEGES ON cm_storage_smsv.* TO 'restricted'@'localhost';

 

Note: The above command will grant full control to the database, that might not be appropriate for your environment.

Assuming you limit access to the "restricted" user (IE SELECT read-only) then...

 

GRANT SELECT ON cm_storage_smsv.* TO 'restricted'@'localhost';

Does that fix the problem?

 

/Matt

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

View solution in original post

10 REPLIES 10

mbeattie
11,449 Views

Hi Zoltan,

 

On your WFA5 server do you have the pack\datasource configured for the "cm_storage_smsv" schema? Can you run the query externally to WFA? EG via something like HeidiSQL https://www.heidisql.com/download.php download the 64 bit .exe and copy it to your MySQL lib directory then connect as the default read-only WFA database user (Usr: wfa. Pwd: Wfa123).

 

Is it possible you need to install the "Manage SnapMirror-SnapVault Cascade Relationship - Version 1.0.0" Pack on your WFA5 server? https://automationstore.netapp.com/pack-detail.shtml?packUuid=ba11fac4-9710-4f2b-90ed-a7efbd4e723a&packVersion=1.0.0 

 

Also additionally you might want to check there are no issues with snapshot timestamps and timezones in your environment:

 

https://kb.netapp.com/app/answers/answer_view/a_id/1084443/~/the-key-timestamp-for-dictionary-snapshot-is-in-utc-time%2C-instead-of-the 

 

Hope that helps? Please let me know if you have any questions?

 

/Matt

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

Zoltan_Somogyvari
11,365 Views

Hi Matt,

 

Thanks for suggesting HeidiSQL, I've just wanted to get some sql tool to test. With this I was able to  run the query, (only with root user, wfa read olny user drops access denied)

 

So I am able to ask snap from db with this tool with sql root user:

 

kezzel ment.JPG

 

But Wfa drops error when try to test it:

 

wfabol nem.JPG

 

I've checked sql user table and this is what i have:

 

users.JPG

 

Is this looks ok?  wfa user does not have any right. 

I also cheked on a fresh clean install of wfa 5.0.1, and the user table is same ase here.

What do you think?

 

Thanks

Zoli

 

mbeattie
11,450 Views

Hi Zoli

 

Okay the WFA snapshot pack installed on WFA5 and your query works successfully as root. What's the output of:

 

SHOW GRANTS FOR 'restricted'@'localhost';

Is it possible the "restricted" database user does not have appropriate permissions the "cm_storage_smsv" database???

If the result is that the user does not have to permission connect to MySQL as root and  grant permissions:

 

GRANT ALL PRIVILEGES ON cm_storage_smsv.* TO 'restricted'@'localhost';

 

Note: The above command will grant full control to the database, that might not be appropriate for your environment.

Assuming you limit access to the "restricted" user (IE SELECT read-only) then...

 

GRANT SELECT ON cm_storage_smsv.* TO 'restricted'@'localhost';

Does that fix the problem?

 

/Matt

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

moep
11,293 Views

Hi,

 

for the "Acquire data source" issue there is a better solution than the workaround mentioned in the KB. NetApp released an update of the "WFA pack with common entities" in the Automation Store.

Zoltan_Somogyvari
11,282 Views

HI Guys,

 

@mbeattie  sql command solved the permission problem for snapshots. Thanks!

@moep  thank you for suggestion, imported DAR!

 

Many thanks again, I think WF now will be ok, I'll get back to you when we are executing it next time!

 

BR

Zoli

Zoltan_Somogyvari
11,126 Views

Hi Guys,

 

Unfortunatelly I still have some problem with data aquisition.

 

I get the following error when the Refresh Environment wf running:

 

03:37:04.127 ERROR [Wait for data source acquisition] Wait Command failed for Workflow 'Refresh Environment' with error : could not find ParserDetails.ini in C:/Perl64/site/lib/XML/SAX

 

Do you have any suggestion what to check?

 

Many Thanks

Zoli

mbeattie
11,100 Views

Hi Zoli,

 

I hit the same issue for a customer. The solution i chose was not to use PERL and instead rewrite the commands to acquire the datasource and wait for datasource acquisition via the REST API using PowerShell. Here is the command code i used:

 

acquire_wfa_datasource:

 

Param(
   [Parameter(Mandatory=$False, HelpMessage="The Protocol name")]
   [ValidateSet("https","http")]
   [String]$Protocol="https",
   [Parameter(Mandatory=$True, HelpMessage="The WFA Server hostname, FQDN or IP Address")]
   [String]$WfaServer,
   [Parameter(Mandatory=$True, HelpMessage="The WFA Datasource name")]
   [String]$DataSourceName
)
#'------------------------------------------------------------------------------
#'Set the certificate policy and TLS version.
#'------------------------------------------------------------------------------
Add-Type @"
   using System.Net;
   using System.Security.Cryptography.X509Certificates;
   public class TrustAllCertsPolicy : ICertificatePolicy {
   public bool CheckValidationResult(
   ServicePoint srvPoint, X509Certificate certificate,
   WebRequest request, int certificateProblem) {
      return true;
   }
}
"@
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls12'
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
#'------------------------------------------------------------------------------
#'Acquire the WFA datasource
#'------------------------------------------------------------------------------
$credentials = Get-WFACredentials $WfaServer
[String]$uri = "$Protocol`://$WfaServer/rest/data_sources/$DataSourceName/jobs"
Try{
   [xml]$result = Invoke-RestMethod -Uri $uri -Method "POST" -ContentType "Application/JSON" -Credential $credentials
   Get-WFALogger -Info -Message "Acquired Datasource ""$DataSourceName"" using URI ""$uri"""
}Catch{
   Write-Warning -Message $("Failed acquiring Datasource ""$DataSourceName"" using URI ""$uri"". Error " + $_.Exception.Message)
}
#'------------------------------------------------------------------------------
#'Enumerate the VMWare session ID from the response and add it as a return paramater..
#'------------------------------------------------------------------------------
[String]$jobId = $result.acquisitionJob.jobId
If(-Not([String]::IsNullOrEmpty($jobId))){
   Add-WfaWorkflowParameter -Name "data_source_acquisition_job_id" -Value $jobId -AddAsReturnParameter $True
   Get-WFALogger -Info -Message "Added WFA datasource acquisition Job ID ""$jobId"" as a return paramater"
}Else{
   Throw "Failed acquiring WFA datasource ""$DataSourceName"""
}
#'------------------------------------------------------------------------------

wait_wfa_datasource:

 

Param(
   [Parameter(Mandatory=$False, HelpMessage="The Protocol name")]
   [ValidateSet("https","http")]
   [String]$Protocol="https",
   [Parameter(Mandatory=$True, HelpMessage="The WFA Server hostname, FQDN or IP Address")]
   [String]$WfaServer,
   [Parameter(Mandatory=$True, HelpMessage="The WFA Datasource name")]
   [String]$DataSourceName,
   [Parameter(Mandatory=$False, HelpMessage="The WFA Datasource aquisition Job ID")]
   [Int]$JobId,
   [Parameter(Mandatory=$False, HelpMessage="The WFA Datasource aquisition Job ID")]
   [Int]$TimeOut=60,
   [Parameter(Mandatory=$False, HelpMessage="The WFA Datasource aquisition Job ID")]
   [Int]$WaitInterval=3
)
#'------------------------------------------------------------------------------
#'Set the certificate policy and TLS version.
#'------------------------------------------------------------------------------
Add-Type @"
   using System.Net;
   using System.Security.Cryptography.X509Certificates;
   public class TrustAllCertsPolicy : ICertificatePolicy {
   public bool CheckValidationResult(
   ServicePoint srvPoint, X509Certificate certificate,
  WebRequest request, int certificateProblem) {
      return true;
   }
}
"@
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls12'
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
#'------------------------------------------------------------------------------
#'Enumerate WFA credentials.
#'------------------------------------------------------------------------------
$credentials = Get-WFACredentials $WfaServer
#'------------------------------------------------------------------------------
#'Enumerate the WFA datasource acquisition job ID using a WFA return paramater if not provided.
#'------------------------------------------------------------------------------
[String]$returnParameter = "data_source_acquisition_job_id"
If(-Not($JobId)){
   [Int]$JobId = Get-WfaWorkflowParameter -Name $returnParameter
}
If(-Not([String]::IsNullOrEmpty($JobId))){
   Get-WFALogger -Info -Message "Enumerated  datasource aquisition Job ID ""$jobId"" from WFA return Parameter ""$returnParameter"""
}Else{
   Throw "Failed enumerating WFA Return Parameter ""$returnParameter"""
}
#'------------------------------------------------------------------------------
#'Enumerate the WFA datasource aquisition Job ID status and wait for completion.
#'------------------------------------------------------------------------------
[Int]$acquired = 0
[Int]$waited   = 0
[String]$uri = "$Protocol`://$WfaServer/rest/data_sources/$DataSourceName/jobs/$JobId" Get-WFALogger -Info -Message "Enumerating WFA Datasource aquisition Job ID ""$jobId"" using URI ""$uri""" Do{ Try{ [xml]$result = Invoke-RestMethod -Uri $uri -Method GET -ContentType "Application/JSON" -Credential $credentials [String]$status = $($result.acquisitionJob.JobStatus.status).ToLower(); Get-WFALogger -Info -Message "Enumerated WFA Datasource acquisition Job ID ""$jobId"" status ""$status"" using URI ""$uri""" If($status -ne "completed"){ Start-Sleep -Seconds $WaitInterval [Int]$waited += $WaitInterval }Else{ [Int]$acquired = 1 } }Catch{ Throw $("Failed enumerating WFA Datasource aquisition Job ID ""$jobId"" using URI ""$uri"". Error " + $_.Exception.Message) } }Until(($acquired -eq 1) -Or (($waited -ge $timeOut) -And $timeOut -ge 0)) #'------------------------------------------------------------------------------ #'Ensure an error is raised if the datasource was not aquired within the timeout. #'------------------------------------------------------------------------------ If($acquired -eq 1){ Get-WFALogger -Info -Message "Successfully acquired WFA Datasource ""$DataSourceName"". Waited a total of ""$waited"" seconds" }Else{ Throw "Failed acquiring WFA Datasource ""$DataSourceName"" within a timeout of ""$timeOut"" seconds" } #'------------------------------------------------------------------------------

Hope that helps

 

/Matt

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

mbeattie
11,087 Views

Hi,

 

Also this function might be useful for enumerating the WFA FQDN. Call it with quotes. EG: get_wfa_fqdn('')

 

def get_wfa_fqdn(hostname){
   import java.net.InetAddress;
   InetAddress addr = java.net.InetAddress.getLocalHost().getCanonicalHostName();
   return toLower(addr);
}

You need to ensure that there is a WFA Credential added which has the admin role to authenticate the REST API request to acquire the datasource. EG if your WFA server FQDN is 'wfa.netapp.com' then you need to add a credential using the FQDN 'wfa.netapp.com'.

 

Hope this helps

 

/Matt

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

moep
10,929 Views

You can easily fix the missing ParserDetails.ini error. The file is simply missing from the ActivePerl installation which comes with WFA. Just create the C:\Perl64\lib\XML\SAX\ParserDetails.ini with the following content:

[XML::SAX::PurePerl]
http://xml.org/sax/features/namespaces = 1

Zoltan_Somogyvari
10,235 Views

Thank you Guys, I'll test your suggestions.

 

BR

Zoli

Public