<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Powershell NDU Invoke-NcClusterHaTakeover -AllowVersionMismatch not working as expected in ONTAP Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-NDU-Invoke-NcClusterHaTakeover-AllowVersionMismatch-not-working-as/m-p/137283#M30278</link>
    <description>&lt;P&gt;Thanks for the quick reply Matt!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I should have mentioned in the first place I was using the Powershell Toolkit 4.3 and the issue was previously present in 4.0 -- I will see if 4.5 fixes the issue and report back when our next set of controllers comes up for upgrades (it will be a few weeks).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not terribly familiar with the ZAPI but I came up with the following block - I won't be able to test&amp;nbsp;on an HA cluster for a few weeks:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$Request = @"
&amp;lt;cf-takeover&amp;gt;
&amp;lt;node&amp;gt;$controllerBNode&amp;lt;/node&amp;gt;
&amp;lt;version-mismatch-ok&amp;gt;true&amp;lt;/version-mismatch-ok&amp;gt;
&amp;lt;/cf-takeover&amp;gt;
"@
Invoke-NcSystemApi -Controller $connectedController -Request $Request&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does that&amp;nbsp;look&amp;nbsp;reasonable?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, Invoke-NcSsh isn't the best solution at the moment as it appears cDot 9.3 may affected by the same bug as 7mode 8.2.5 as discussed here here:&amp;nbsp;&lt;A href="http://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/Invoke-NaSsh-not-working-anymore-with-DOT-8-2-5-7-mode/m-p/135824/highlight/false#M5558" target="_blank"&gt;http://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/Invoke-NaSsh-not-working-anymore-with-DOT-8-2-5-7-mode/m-p/135824/highlight/false#M5558&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(I replied to the Netapp empoyee mentioning the bug about this detail in case the bug should be expanded to include cDot - I upgraded to PSTK 4.5 and the issue persists)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The upgrade script we built uses Invoke-Ssh at the start and end to invoke autosupport and disable autogiveback.&amp;nbsp; Immediately after upgrading to 9.3, Invoke-NcSsh started returning:&lt;/P&gt;&lt;P&gt;Invoke-NcSsh : An established connection was aborted by the software in your host machine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;n&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jan 2018 02:50:29 GMT</pubDate>
    <dc:creator>nathane</dc:creator>
    <dc:date>2018-01-15T02:50:29Z</dc:date>
    <item>
      <title>Powershell NDU Invoke-NcClusterHaTakeover -AllowVersionMismatch not working as expected</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-NDU-Invoke-NcClusterHaTakeover-AllowVersionMismatch-not-working-as/m-p/137270#M30268</link>
      <description>&lt;P&gt;When upgrading OnTap minor release versions (P1 -&amp;gt; P5), the following cmdlet works as expected:&lt;/P&gt;&lt;PRE&gt;Invoke-NcClusterHaTakeover -Controller $connectedController -Node $controllerBNode&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When upgrading OnTap major release versions (9.2 -&amp;gt; 9.3), the following cmdlet produces the following error message:&lt;/P&gt;&lt;PRE&gt;Failed to initiate takeover. Reason: version mismatch. Note: If you are performing a Data ONTAP non-disruptive upgrade or downgrade, use the (privilege: advanced) 
"-option allow-version-mismatch" parameter. &lt;/PRE&gt;&lt;P&gt;This is all well and good and so I add AllowVersionMismatch switch parameter&amp;nbsp;as follows:&lt;/P&gt;&lt;PRE&gt;Invoke-NcClusterHaTakeover -Controller $connectedController -Node $controllerBNode -AllowVersionMismatch&lt;/PRE&gt;&lt;P&gt;But receive the same error message:&lt;/P&gt;&lt;PRE&gt;Failed to initiate takeover. Reason: version mismatch. Note: If you are performing a Data ONTAP non-disruptive upgrade or downgrade, use the (privilege: advanced) 
"-option allow-version-mismatch" parameter. &lt;/PRE&gt;&lt;P&gt;I'm hoping it is obvious what I missing and/or how I elevate to "set -privilege advanced" from the Netapp Powershell CLI.&amp;nbsp; I have considered performing this takeover step with Invoke-NcSSH, but I am hoping there is a more elegant way and that I am just missing a step or something obvious.&amp;nbsp; (Invoke-NcSsh option mentioned here:&amp;nbsp;&lt;A href="https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Do-we-have-any-DataONTAP-powershell-toolkit-cmdlet-to-set-privilege-level-for/td-p/116795" target="_blank"&gt;https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Do-we-have-any-DataONTAP-powershell-toolkit-cmdlet-to-set-privilege-level-for/td-p/116795&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The parameter help talks about&amp;nbsp;cleanly halting the node to be taken over&amp;nbsp;but this doesn't quite make sense to me - is it a clue to someone else?&amp;nbsp; I am not familiar with proatively halting a node during a NDU:&lt;/P&gt;&lt;PRE&gt;    -AllowVersionMismatch
        If specified, allow takeover if the partner was running an incompatible operating system version and was cleanly halted.  This option is used for non-disruptive upgrade (NDU).&lt;/PRE&gt;&lt;P&gt;Thanks in advance for your insight!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 14:09:04 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-NDU-Invoke-NcClusterHaTakeover-AllowVersionMismatch-not-working-as/m-p/137270#M30268</guid>
      <dc:creator>nathane</dc:creator>
      <dc:date>2025-06-04T14:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell NDU Invoke-NcClusterHaTakeover -AllowVersionMismatch not working as expected</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-NDU-Invoke-NcClusterHaTakeover-AllowVersionMismatch-not-working-as/m-p/137281#M30277</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you try using "Invoke-NcSystemApi" using the "cf-failover" ZAPI?&lt;/P&gt;&lt;P&gt;Alternately you could use Invoke-NcSsh and pass mulitple commands using ampersand...EG:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[String]$command = "set -privilege advanced`;storage failover takeover -ofnode cluster1-02"
Try{
   Invoke-NcSsh -Command $command -Credential $credentials -ErrorAction Stop
   Write-Host "Executed Command`: $command"
}Catch{
   Write-Warning -Message $("Failed Executing Command`: $command. Error " + $_.Exception.Message)
   Break;
}&lt;/PRE&gt;&lt;P&gt;Whilst that might be a workaround it's not really a solution and it does sound like a bug to me. I'll raise the issue with our developers for you. Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2018 23:50:22 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-NDU-Invoke-NcClusterHaTakeover-AllowVersionMismatch-not-working-as/m-p/137281#M30277</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2018-01-14T23:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell NDU Invoke-NcClusterHaTakeover -AllowVersionMismatch not working as expected</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-NDU-Invoke-NcClusterHaTakeover-AllowVersionMismatch-not-working-as/m-p/137283#M30278</link>
      <description>&lt;P&gt;Thanks for the quick reply Matt!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I should have mentioned in the first place I was using the Powershell Toolkit 4.3 and the issue was previously present in 4.0 -- I will see if 4.5 fixes the issue and report back when our next set of controllers comes up for upgrades (it will be a few weeks).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not terribly familiar with the ZAPI but I came up with the following block - I won't be able to test&amp;nbsp;on an HA cluster for a few weeks:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$Request = @"
&amp;lt;cf-takeover&amp;gt;
&amp;lt;node&amp;gt;$controllerBNode&amp;lt;/node&amp;gt;
&amp;lt;version-mismatch-ok&amp;gt;true&amp;lt;/version-mismatch-ok&amp;gt;
&amp;lt;/cf-takeover&amp;gt;
"@
Invoke-NcSystemApi -Controller $connectedController -Request $Request&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does that&amp;nbsp;look&amp;nbsp;reasonable?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, Invoke-NcSsh isn't the best solution at the moment as it appears cDot 9.3 may affected by the same bug as 7mode 8.2.5 as discussed here here:&amp;nbsp;&lt;A href="http://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/Invoke-NaSsh-not-working-anymore-with-DOT-8-2-5-7-mode/m-p/135824/highlight/false#M5558" target="_blank"&gt;http://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/Invoke-NaSsh-not-working-anymore-with-DOT-8-2-5-7-mode/m-p/135824/highlight/false#M5558&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(I replied to the Netapp empoyee mentioning the bug about this detail in case the bug should be expanded to include cDot - I upgraded to PSTK 4.5 and the issue persists)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The upgrade script we built uses Invoke-Ssh at the start and end to invoke autosupport and disable autogiveback.&amp;nbsp; Immediately after upgrading to 9.3, Invoke-NcSsh started returning:&lt;/P&gt;&lt;P&gt;Invoke-NcSsh : An established connection was aborted by the software in your host machine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;n&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2018 02:50:29 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-NDU-Invoke-NcClusterHaTakeover-AllowVersionMismatch-not-working-as/m-p/137283#M30278</guid>
      <dc:creator>nathane</dc:creator>
      <dc:date>2018-01-15T02:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell NDU Invoke-NcClusterHaTakeover -AllowVersionMismatch not working as expected</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-NDU-Invoke-NcClusterHaTakeover-AllowVersionMismatch-not-working-as/m-p/139060#M30690</link>
      <description>&lt;P&gt;A quick follow-up to this issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I finally have the zapi call workarounds in place to get around the broken cmdlets/broken support on ONTAP.&amp;nbsp; Included below are the various zapi blocks I have to workaround broken Invoke-NcSSH, and broken Invoke-NcClusterHATakeover cmdlets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Disable AutoGiveback as suggested during an OnTAP NDU&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$disableAutoGiveBackANodeApiCall = @"
                &amp;lt;cf-modify-iter&amp;gt;
                &amp;lt;query&amp;gt;
                &amp;lt;options-related-info-modify&amp;gt;
                &amp;lt;node&amp;gt;$controllerANode&amp;lt;/node&amp;gt;
                &amp;lt;/options-related-info-modify&amp;gt;
                &amp;lt;/query&amp;gt;
                &amp;lt;attributes&amp;gt;
                &amp;lt;options-related-info-modify&amp;gt;
                &amp;lt;auto-giveback-enabled&amp;gt;false&amp;lt;/auto-giveback-enabled&amp;gt;
                &amp;lt;/options-related-info-modify&amp;gt;
                &amp;lt;/attributes&amp;gt;
                &amp;lt;/cf-modify-iter&amp;gt;
"@
Invoke-NcSystemApi -Controller $connectedController -Request $disableAutoGiveBackANodeApiCall -ErrorAction Stop | Out-Null

$disableAutoGiveBackBNodeApiCall = @"
                &amp;lt;cf-modify-iter&amp;gt;
                &amp;lt;query&amp;gt;
                &amp;lt;options-related-info-modify&amp;gt;
                &amp;lt;node&amp;gt;$controllerBNode&amp;lt;/node&amp;gt;
                &amp;lt;/options-related-info-modify&amp;gt;
                &amp;lt;/query&amp;gt;
                &amp;lt;attributes&amp;gt;
                &amp;lt;options-related-info-modify&amp;gt;
                &amp;lt;auto-giveback-enabled&amp;gt;false&amp;lt;/auto-giveback-enabled&amp;gt;
                &amp;lt;/options-related-info-modify&amp;gt;
                &amp;lt;/attributes&amp;gt;
                &amp;lt;/cf-modify-iter&amp;gt;
"@

Invoke-NcSystemApi -Controller $connectedController -Request $disableAutoGiveBackBNodeApiCall -ErrorAction Stop | Out-Null&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Invoke Takeover during an NDU with version mismatch&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$Request = @"
                &amp;lt;cf-takeover&amp;gt;
                &amp;lt;node&amp;gt;$controllerBNode&amp;lt;/node&amp;gt;
                &amp;lt;version-mismatch-ok&amp;gt;true&amp;lt;/version-mismatch-ok&amp;gt;
                &amp;lt;/cf-takeover&amp;gt;
"@
Invoke-NcSystemApi -Controller $connectedController -Request $Request -ErrorAction Stop | Out-Null
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Revert LIFs not at home after an NDU&lt;/P&gt;
&lt;PRE&gt;        ForEach ( $vServer in $vServers ) {

            $lifsNotHome = Get-NcNetInterface -Controller $connectedController -Vserver $vServer.Vserver | Where-Object { $_.IsHome -eq $FALSE } | Select-Object -ExpandProperty InterfaceName

            ForEach ( $lif in $lifsNotHome ) {

                $revertLifApiCall = @"
                    &amp;lt;net-interface-revert&amp;gt;
                    &amp;lt;vserver&amp;gt;$($vServer.Vserver)&amp;lt;/vserver&amp;gt;
                    &amp;lt;interface-name&amp;gt;$lif&amp;lt;/interface-name&amp;gt;
                    &amp;lt;/net-interface-revert&amp;gt;
"@
                try {
                    if ( $vServer.VserverType -like "admin" ) {
                        Invoke-NcSystemApi -Controller $connectedController -Request $revertLifApiCall -ErrorAction SilentlyContinue | Out-Null
                    }
                    else {
                        Invoke-NcSystemApi -Controller $connectedController -Request $revertLifApiCall -ErrorAction Stop | Out-Null
                    }
                }
                catch {
                    Write-Warning "$controller`: LIF revert was not successful"
                }
            }
        }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps out my fellow Netapp wrangers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;n&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 15:54:26 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-NDU-Invoke-NcClusterHaTakeover-AllowVersionMismatch-not-working-as/m-p/139060#M30690</guid>
      <dc:creator>nathane</dc:creator>
      <dc:date>2018-03-22T15:54:26Z</dc:date>
    </item>
  </channel>
</rss>

