Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am working on a custom workflow for a customer and I am using much of the 0-day cluster setup from the automation store page. However, most of those commands are generating this error, when I try to run them;
13:38:17.172 ERROR [Rename Root Aggregate] Failed executing command. Exception: No definition for typedef inofile-version found at /opt/netapp/wfa/perl/nmsdk/OntapClusterAPI.pm line 79836, <STDIN> line 1.
I can't figure out what this is. I have simply created new commands for some of the simpler ones, but I was hoping to use some of them.
Can anyone tell me what this is and whats causing it?
Solved! See The Solution
1 ACCEPTED SOLUTION
dblackwe has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As a workaround can you disable bindings validation using: $server->set_bindings_validation(0) and check if your has command has executed successfully.
9 REPLIES 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You might be having older version of NMSDK. What is the version of WFA?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using the most current RC of 4.x on linux.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is the code that is causing the error.
use strict; use Getopt::Long; use NaServer; use WFAUtil; my $cluster; GetOptions( "Cluster=s" => \$cluster ) or die 'Illegal command parameters\n'; my $wfaUtil = WFAUtil->new(); $wfaUtil->sendLog('INFO',"Connecting to cluster"); my $server = $wfaUtil->connect($cluster); $wfaUtil->sendLog('INFO',"Rename root aggregate "); my @aggrList = aggrGetInfo(); foreach my $aggrDetails (@aggrList) { my ($aggregate, $aggregateOwner, $aggrDiskCount, $aggrIsRoot) = split (/,/,$aggrDetails); my $newAggrName = $aggregateOwner . "_root"; if ($aggrIsRoot =~ m/true/) { if ($aggregate =~ m/$newAggrName/) { $wfaUtil->sendLog('INFO',"Root aggregate for $aggregateOwner is named correctly.\n"); } else { #Rename aggregate $newAggrName=~s/-/_/g; $wfaUtil->sendLog('INFO', "Rename of aggregate $aggregate to $newAggrName "); $server->aggr_rename('aggregate', $aggregate,'new-aggregate-name',$newAggrName); $wfaUtil->sendLog('INFO', 'Rename of a aggregate operation completed successfully.'); } #Fix root aggregate diskcount if ($aggrDiskCount < 5 ) { my $addDisks = 5 - $aggrDiskCount,; $server->aggr_add('aggregate', $newAggrName,'disk-count',$addDisks); $wfaUtil->sendLog('INFO', 'Rename of a aggregate operation completed successfully.'); } } } sub aggrGetInfo { # Initialize variables my @aggrs; my $aggrOwner; my $in = $server->aggr_get_iter(); # Proccess the attributes foreach my $aggrInfo (@{$in->{'attributes-list'}->{'aggr-attributes'}}) { my $aggrName = $aggrInfo->{'aggregate-name'}; if (my $aggrOwnerAttrs = $aggrInfo->{'aggr-ownership-attributes'}) { $aggrOwner = $aggrOwnerAttrs->{'owner-name'}; } if (my $aggrRaidAttrs = $aggrInfo->{'aggr-raid-attributes'}) { my $aggrIsRoot = $aggrRaidAttrs->{'has-local-root'}; my $aggrDiskCount = $aggrRaidAttrs->{'disk-count'}; my $aggrNameAndOwner = "$aggrName,$aggrOwner,$aggrDiskCount,$aggrIsRoot"; push (@aggrs, $aggrNameAndOwner); } } return (@aggrs); }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you post what is the ONTAP version you are using?
sinhaa
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
NetApp Release 9.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't fix my problem yet, but I know what is causing the error. It's any command that does a data pull to get information from the cluster. Take the following example;
use Getopt::Long; use NaServer; use WFAUtil; use strict; my $cluster; my $node; GetOptions( "Cluster=s" => \$cluster, "Node=s" => \$node, ) or die 'Illegal command parameters\n'; my $wfaUtil = WFAUtil->new(); $wfaUtil->sendLog('INFO', "Connecting to the cluster: $cluster" ); my $server = $wfaUtil->connect($cluster); my $oldAggr = aggrGetInfo(); my $newAggrName = $node . "_root"; $wfaUtil->sendLog('INFO',"Rename aggregate $oldAggr "); eval { $server->aggr_rename('aggregate', $oldAggr, 'new-aggregate-name', $newAggrName); $wfaUtil->sendLog('INFO', 'Rename of aggregate operation completed successfully.'); }; if($@) { die "Failed to rename the Aggregate" . $@; } sub aggrGetInfo { # Initialize variables my @aggrs; my $aggrOwner; my $aggrName; my $in = $server->aggr_get_iter(); # Proccess the attributes foreach my $aggrInfo (@{$in->{'attributes-list'}->{'aggr-attributes'}}) { my $aggrOwnerAttrs = $aggrInfo->{'aggr-ownership-attributes'}; $aggrOwner = $aggrOwnerAttrs->{'owner-name'}; if (my $aggrOwner eq $node) { $aggrName = $aggrInfo->{'aggregate-name'}; } } return ($aggrName); }
Before I added the aggrGetInfo section and just used hard coded entries, it worked fine. After adding the section to pull information, I get the error.
dblackwe has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As a workaround can you disable bindings validation using: $server->set_bindings_validation(0) and check if your has command has executed successfully.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That fixed it, but can you explain why?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Probably you need right content version. Check if downloading and importing pack from http://automationstore.netapp.com/pack-detail.shtml?packUuid=WFA_pack_for_managing_Clustered_Data_ONTAP&packVersion=1.1.0 will help
