2014-06-11 04:17 PM
I can't find a way to make this workflow work. We have a workflow that create QSM relationships and then this one which removes QSM relationships. The "Break QSM" Certified command has "destination interface" as a mandatory parameter. This environment is not use separate interfaces for snapmirror and we're just trying to get the simple case working where the destination interface is the same as what resolves for it's hostname or FQDN. So for "dest interface" I pass "secArray.name". However, that gives a FQDN such as hostname.acme.com. The WF returns an error saying Destination filer 'hostname.acme.com' does not match hostname 'hostname' which secArray.name is passed. This matches what snapmirror status shows:
dr-stor-7m-2> snapmirror status
Snapmirror is on.
Source Destination State Lag Status
hq-stor-7m-1.acme.com:/vol/alpha/dev_aaaaa_ddddd dr-stor-7m-2:/vol/gamma/sm_dev_aaaaa_ddddd Snapmirrored 00:18:42 Idle
hq-stor-7m-1.acme.com:beta dr-stor-7m-2:sm_beta Snapmirrored 05:06:56 Idle
192.168.126.185:prd_ms_prd_pdc_01_ds23 dr-stor-7m-2:sm_prd_ms_prd_pdc_01_ds23 Snapmirrored 1002:51:21 Idle
So thinking I need "dest interface" to just be the simple name I changed the parameter for dest interface to:
to split out just the simple name in front of the first dot.
But with this change the commands reports that no 'dest interface' has been passed at all and fails. Any ideas to get out of this?
Screen shot of errors follows and workflow itself is attached
Solved! SEE THE SOLUTION
2014-06-12 09:06 AM
Passing the destination interface as just the hostname instead of the FQDN should work for you and splitByDelimiter() is a good tool for getting the hostname from the FQDN.
However, the delimiter argument in splitByDelimiter(secArray.name, ".", 0) is actually a regular expression because MVEL delegates split() to String.split(). The dot character has special meaning in regular expressions and therefore we must escape it. The following syntax with "\\" as the escape sequence should work.
2014-06-12 01:33 PM
That fixed the workflow and tested successfully!
This community site is awesome! I was working another issue the other day where I thought I needed to escape a "." and I was only single-back-slashing "\." ... so thanks again.