Svm Dr : before svm dr was embedded in ontap, we created our own scripts. Then the embedded svm dr popped up and the scripts faded away. But with fabricpool and MCC, svm dr is not supported. In the background Olivier Masson continued the svm dr script of Jerome Blanchet. And I had 2 customers having the need for it, so I jumped on the train...
Monday, November 19, 2018
Wfa workflows & Powershell script for SVM Dr
Tuesday, November 13, 2018
Wfa Setup Workflow Generator
If you create advanced workflows, you might have the need to upload you own files. Typically modules, or some config files. Modules need to be copied tot the \posh\modules directory. Other files you might want to copy to the WFA root directoy or maybe just a custom directory. That means that you need to create a setup manual saying where the customer should copy the files you provide.
But why not just create a workflow that does this for you. it can be done, if the content is limited in size (Max 2MB).
But why not just create a workflow that does this for you. it can be done, if the content is limited in size (Max 2MB).
Friday, November 9, 2018
Workflow encrypt all volumes
New workflow added to github that will encrypt all volumes that are not yet encrypted.
Requires cdot & ocum 9.3 and cdot pack 1.5.2 (don't use 1.5.1 => has a bug in vol move command)
download at : www.github.com/wfaguy
Requires cdot & ocum 9.3 and cdot pack 1.5.2 (don't use 1.5.1 => has a bug in vol move command)
download at : www.github.com/wfaguy
Sunday, October 21, 2018
Autotiering with WFA
Autotiering in NetApp is no longer unknown. With FlashPool and FabricPool we have actual autotiering where hot blocks get moved to a faster medium (FlashPool) or cold blocks get moved to an S3 bucket (FabricPool).
But that's about it. I'm not saying its not awesome, because it is. I'm just saying, there can be more.
If you just think about it, NetApp already has a Cluster concept (Cdot) which allow different tiers (For example mixing an AFF with a FAS) and we already have the capability to move volumes between those tiers (vol move).
But that's about it. I'm not saying its not awesome, because it is. I'm just saying, there can be more.
If you just think about it, NetApp already has a Cluster concept (Cdot) which allow different tiers (For example mixing an AFF with a FAS) and we already have the capability to move volumes between those tiers (vol move).
Labels:
autotiering
,
ocum
,
performance
,
wfa
Thursday, July 26, 2018
Powershell Rest Calls (invoke-restapi) fail with latest versions - Force TLS
If you start experiencing Rest-call failures in PowerShell (Invoke-RestApi, Invoke-WebRequest, ...), you should realize that NetApp has dropped SSL support.
So you must force TLS now.
This is done by adding this code at the beginning :
So you must force TLS now.
This is done by adding this code at the beginning :
# Force TLS [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Wednesday, July 25, 2018
Tuning WFA 4.2
My collegue José is working on one of the largest WFA installs I know of and he told me this after migrating from 4.0 to 4.2 :
After a migration from WFA 4.0 to a different server on WFA 4.2 we started to see slowness up to the point where the application was unusable.
The execution log was taking minutes to populate, and when it was populating for one user, the rest could do nothing, get timeout errors and messages about "server busy".
After a migration from WFA 4.0 to a different server on WFA 4.2 we started to see slowness up to the point where the application was unusable.
The execution log was taking minutes to populate, and when it was populating for one user, the rest could do nothing, get timeout errors and messages about "server busy".
Tuesday, July 24, 2018
Grab WFA execution log with powershell
For logging purposes, you might want the need to grab a WFA execution log. I initially wrote this to dump those in an OCI database, but for this post, I narrowed it down to just dumping them in CSV-files (jobinfo, input parameters & return parameters). The original script also updates statuses (for example, when a jobstatus changes from failed => resume => completed), but that compare is only possible when we dump in a database and i can query it again, so for this csv-output method, an update won't work (but I kept the code in comment).
I did make the script incremental. Job logs can take a while to grab, so I allow a timeout. I keep the last jobid in a simple text-file. Original, obviously, I stored this in the database. I you are interested in the the database version, give me a ping.
I did make the script incremental. Job logs can take a while to grab, so I allow a timeout. I keep the last jobid in a simple text-file. Original, obviously, I stored this in the database. I you are interested in the the database version, give me a ping.
Friday, July 20, 2018
Get rid of Get-WfaLogger and override Write-Host
A customer recently asked if it's possible to override write-host, avoiding Get-WfaLogger and thus be able to convert existing PowerShell scripts to Wfa-commands by a simple copy-paste.
I tried it, and yes it's possible. Well, you would still need to add 2-lines of code, and this doesn't necessarily mean that you can just copy paste any piece of code in there (for example the parameters of your script must be strong-typed and must match the support parameters, there are other native wfa cmdlets like "connect-wfacluster", ...)
I tried it, and yes it's possible. Well, you would still need to add 2-lines of code, and this doesn't necessarily mean that you can just copy paste any piece of code in there (for example the parameters of your script must be strong-typed and must match the support parameters, there are other native wfa cmdlets like "connect-wfacluster", ...)
Wednesday, June 20, 2018
How to calculate a sum in a repeat row in WFA
Ever needed to add a repeat row and calculate a sum on the fly ?
This is built into wfa already.
For example, you want a user input table, where you add qtrees and their sizes, but you would need a sum at some point so create the volume (where the size is the sum of the qtrees).
This is built into wfa already.
For example, you want a user input table, where you add qtrees and their sizes, but you would need a sum at some point so create the volume (where the size is the sum of the qtrees).
Monday, June 18, 2018
Wfa Invoke-NcSsh broken
In WFA4.2 you might have noticed Invoke-NcSsh doesn't work as it used to. You need putty, and even then there seems to be a memory leak.
WFA has a custom cmdlet called "Invoke-WfaClusterCli", which is
doing the same thing, assuming you wanted to SSH to a Netapp Cluster ofcourse :)
I posted the code below, just for reference. Obviously in WFA you can just call it, as it's embedded in the WFAWrapper module.
WFA has a custom cmdlet called "Invoke-WfaClusterCli", which is
doing the same thing, assuming you wanted to SSH to a Netapp Cluster ofcourse :)
I posted the code below, just for reference. Obviously in WFA you can just call it, as it's embedded in the WFAWrapper module.
Tuesday, June 5, 2018
Powershell - move ontap cluster lifs between interfacegroups
For a headswap procedure, I had to move lifs from 3 interface groups to 2 interface groups.
So before we had :
a0a, a0b & a0c
After we have :
a0a, a0b
This means all lifs on a0c need to move to a similar vlan port on another interface group. here is a powershell script to do it automatically
So before we had :
a0a, a0b & a0c
After we have :
a0a, a0b
This means all lifs on a0c need to move to a similar vlan port on another interface group. here is a powershell script to do it automatically
Labels:
ifgrp
,
lif
,
move
,
powershell
,
vlan
Monday, June 4, 2018
WFA advanced incremental naming
In a previous post, I already explained how incremental naming works. (http://www.wfaguy.com/2016/12/incremental-naming.html#more)
However, sometimes you need something a bit more advanced.
For example you need this incremental functionality
- myvol50xx
- myvol51yy
- myvol52zz
However, sometimes you need something a bit more advanced.
For example you need this incremental functionality
- myvol50xx
- myvol51yy
- myvol52zz
Labels:
advanced
,
functions
,
incremental naming
,
mvel
,
wfa
Wednesday, May 30, 2018
WFA Fixes for vmware 6.5
The Vmware 6.0/6.5 packs from the automation store are unfortunately not 100% failsafe, I discovered today.
These are the fixes I added to make it work with Vmware 6.5.
I have NOT tested it with 6.0, maybe the fix is only needed for 6.5.
I also talked to engineering, if they adapt my fixes, I'll update this post to not add any confusion.
These are the fixes I added to make it work with Vmware 6.5.
I have NOT tested it with 6.0, maybe the fix is only needed for 6.5.
I also talked to engineering, if they adapt my fixes, I'll update this post to not add any confusion.
Labels:
bugs
,
fix
,
vcenter
,
vmware 6.5
,
wfa
Thursday, May 17, 2018
Invoke WFA workflow with PowerShell
It was brought to my attention that I never really posted the Powershell code to invoke a workflow. It seemed so elementary, and I tend to use it in many scripts, that I simply forgot.
So here are 2 simple functions to list workflows and to invoke a workflow.
So here are 2 simple functions to list workflows and to invoke a workflow.
Wednesday, March 28, 2018
WFA sub-workflow runner template (parallel workflows)
Invoking a workflow in a workflow. It's been done before. Of course we can have subworkflows (1 level deep).
But I'm talking about invoking a loop-back (localhost) rest-call.
When done in the traditional way, usually for something simple like the default "acquire datasource" workflow, it's something like : invoke-rest - wait - check result.
Maybe even with a repeat-row, like Tim Kleingeld did with his lun migrations a few years back.
If we mean serious business, we need something more solid, more thought-through.
But I'm talking about invoking a loop-back (localhost) rest-call.
When done in the traditional way, usually for something simple like the default "acquire datasource" workflow, it's something like : invoke-rest - wait - check result.
Maybe even with a repeat-row, like Tim Kleingeld did with his lun migrations a few years back.
If we mean serious business, we need something more solid, more thought-through.
WFA handling passwords as userinput
Although WFA has a credential repository, sometimes it is still needed to prompt an operator for a password.
In that case, it's best it is protected and no-where to be found in the logs.
WFA has this feature and here is a step-by-step tutorial on how it works.
In that case, it's best it is protected and no-where to be found in the logs.
WFA has this feature and here is a step-by-step tutorial on how it works.
Monday, March 26, 2018
Run PowerShell scripts in parallel
PowerShell is awesome, and you can do many things with it. But a PowerShell script is run synchronously. That means that it will just execute one line after the other. For many purposes, that's just fine. However, if you want to process thousands of objects, latency issue might kick in.
For example : you want to collect information from a 1000 servers and the script runs for 2 minutes per server, then your script will run for more than a day.
If we could however process multiple servers at the same time, that would drastically reduce the overall process time.
In this example I'm processing and merging more than a 1000 csv files into 1 csv-file (All that in a few seconds, and I have manually added a fake latency of half a second per csv-file !
For example : you want to collect information from a 1000 servers and the script runs for 2 minutes per server, then your script will run for more than a day.
If we could however process multiple servers at the same time, that would drastically reduce the overall process time.
In this example I'm processing and merging more than a 1000 csv files into 1 csv-file (All that in a few seconds, and I have manually added a fake latency of half a second per csv-file !
Labels:
parallel
,
powershell
,
runspace
,
threads
Thursday, March 15, 2018
Error : Parameter Type 'ActionPreference' is not supported.
If you create a new command and you press the button "discover parameters", you might get the error "Parameter Type 'ActionPreference' is not supported".
Don't panic, there is an easy fix.
Thursday, March 1, 2018
Convert ALL snapmirror DP relations to XDP with WFA
I was asked to automate the conversion of all snapmirror relations from DP to XDP.
So here is a workflow (version 4.1) that should work as an example.
It asks for the new mirror-vault snapmirror policy name and lists your snapmirror relations (all of them)
Labels:
convert
,
dp
,
snapmirror
,
wfa
,
xdp
Tuesday, February 27, 2018
WFA 4.2 has gone GA
OnCommand Workflow Automation 4.2 GA has been posted to the NSS Site.
Workflow Automation 4.2GA includes the following features and enhancements:Tuesday, February 13, 2018
WFA - Replace the SSL Certificate
In WFA you probably use https, and if you are a good sysadmin, you replace the SSL certificate.
I took me quite some time to replace my certificate with my "wildcard certificate" I use in my lab-environment.
Here is how I did it.
I took me quite some time to replace my certificate with my "wildcard certificate" I use in my lab-environment.
Here is how I did it.
Saturday, February 10, 2018
Wfa - Execute MySql NonQuery PowerShell function
You may or may not know that WFA, when coding in PowerShell, comes with the CmdLet "Invoke-MySqlQuery" (aliased as imysql for the gurus).
The cmdlet comes in handy very often but is built for "QueryCommands".
What I mean by that is that it assumes that your Query will return "Records".
But what if you want to execute an insert, update or delete statement ?
The cmdlet comes in handy very often but is built for "QueryCommands".
What I mean by that is that it assumes that your Query will return "Records".
But what if you want to execute an insert, update or delete statement ?
Thursday, January 25, 2018
Advanced SQL queries in WFA Filters
[Article from Christian Bauernfeind]
In a workflow we built recently, we needed to know the combined size of all LUNs in a given volume. The SQL to calculate that number is fairly straightforward:
However, how can we return this information. And why would this even be a big deal ?
To answer this question in detail, you should first understand how WFA filters work.
In a workflow we built recently, we needed to know the combined size of all LUNs in a given volume. The SQL to calculate that number is fairly straightforward:
SELECT volume.name,SUM (lun.size_mb) FROM cm_storage.volume JOIN cm_storage.lun ON lun.volume_id = volume.id GROUP BY lun.volume_id
However, how can we return this information. And why would this even be a big deal ?
To answer this question in detail, you should first understand how WFA filters work.
How to protect all categories in bulk
WFA comes with a Cdot pack that contains a bunch of demo workflows. You can hide them in the portal by going to "administration - WFA configuration - Advanced - show workflows" and then uncheck the packs you don't want to see.
However, from the rest API, these workflows are still visible. If you truly want to hide them, you should add every workflow to a category and then restrict every category.
However, from the rest API, these workflows are still visible. If you truly want to hide them, you should add every workflow to a category and then restrict every category.
Wednesday, January 17, 2018
WFA No snap-ins have been registered for Windows PowerShell version 5
This is around for a while, but still not fixed apparently.
Problem :
if you want Vcenter integration with WFA and you installed the latest Vmware PowerCLI. You will get the error "No snap-ins have been registered for Windows PowerShell version 5".
Explanation :
Vmware (finally) changed their PowerCli names to "module" instead of the old "snapin". In WFA however, we are still looking for "snapin".
Easy fix :
Just goto the WFA install folder, under /posh/ you will find a WFAWrapper.ps1. Do a search replace of the word "snapin" with "module" and the problem will be fixed.
Problem :
if you want Vcenter integration with WFA and you installed the latest Vmware PowerCLI. You will get the error "No snap-ins have been registered for Windows PowerShell version 5".
Explanation :
Vmware (finally) changed their PowerCli names to "module" instead of the old "snapin". In WFA however, we are still looking for "snapin".
Easy fix :
Just goto the WFA install folder, under /posh/ you will find a WFAWrapper.ps1. Do a search replace of the word "snapin" with "module" and the problem will be fixed.
Subscribe to:
Posts
(
Atom
)