<?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 ASA EEM + failover sync issue in Network Security</title>
    <link>https://community.cisco.com/t5/network-security/asa-eem-failover-sync-issue/m-p/4488741#M1085060</link>
    <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I apologize if this message appears in the wrong category. It's my first post and none of the categories screamed EEM or ASA.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I can't tell if I'm doing something wrong or if I've discovered a bug in the EEM implementation on ASA OSes.&lt;BR /&gt;&lt;BR /&gt;I'm running 9.12.4.26 on a pair of ASA 5555-Xs and I've written a tiny EEM script that allows a python script logged into the Standby unit of an Active/Standby failover pair to enable SCP on the Primary. This script works except for the fact that once the config is saved on the Primary it is not replicated/synced to the Standby unit. In fact, once the command "ssh scopy enable" has been run via EEM and inserted into the Primary's config there is no way to save it to the Standby at all. If I go to the Primary's command line and do a "show run | in scopy" I can see the line the EEM script just added but no amount of "write memory" or "copy running-config startup-config" will cause the new scopy command to be replicated to the Standby. The configs are now out of sync and the only way to get them back in sync is to go into config mode on the Primary, do a "no ssh scopy enable", exit config mode, save the config, then go back into config mode on the Primary, add the "ssh scopy enable" command back, exit config mode and save then config. Now, the "ssh scopy enable" command will appear on the Standby.&lt;BR /&gt;&lt;BR /&gt;I have tried all kinds of variations of the EEM commands to no avail. I have enabled debug mode for both event manager scripts and failover syncing and everything appears as though it has worked but the new config command never shows up on the Standby.&lt;BR /&gt;&lt;BR /&gt;Please believe me when I say I have a good reason for trying to enable SCP this way. My company keeps it disabled by default and only enables it when performing OS upgrades, etc. This isn't my only option. It would however make the external code I have to write a lot simpler.&lt;BR /&gt;&lt;BR /&gt;I also realize that&amp;nbsp;9.12.4.35 is the current ASA OS version as of today (Oct. 19, 2021) - for the 9.12 train anyway -and upgrading to this version is part of the automation we are crafting now. I see nothing in the release notes between our version and the new version that leads me to believe this is a bug that's been solved.&lt;BR /&gt;&lt;BR /&gt;Here's the EEM script saved to the Primary, replicated to and then executed from the Standby:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;event manager applet enable_scopy_eem&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;description enable SCP from failover mate&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;event none&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;output none&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;action 001 cli command "ssh scopy enable"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;action 002 cli command "write memory"&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I've tried inserting "configure terminal" and "enable" or "end" commands where they seemed appropriate but the debugs showed these commands as producing errors so I stripped them out. This small script works to get "ssh scopy enable" into the Primary device's config from the Secondary so it does work.&lt;BR /&gt;&lt;BR /&gt;Enabling debugs on Primary and Standby nodes:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;patty/stby/pri# debug event manager 255&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;patty/stby/pri# debug fover sync&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;patty/act/sec# debug event manager 255&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;patty/act/sec# debug fover sync&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Executing this script from the Standby looks like:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;patty/stby/pri# &lt;STRONG&gt;failover exec mate event manager run enable_scopy_eem&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;patty/stby/pri# fover_parse: parse_thread_helper: Cmd: write memory&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;On the Primary I see this:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;patty/act/sec# Running applet enable_scopy_eem&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;eem: issuing commands&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;eem: executing 'ssh scopy enable' -&amp;gt; 0&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;event manager: frep_write_cmd: Cmd: write memory&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;eem: executing 'write memory' -&amp;gt; 0&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;If I look at the Primary's config now I see this &lt;EM&gt;(trust me, scopy enable wasn't there before)&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;patty/act/sec# sh run | in scopy&lt;/FONT&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;ssh scopy enable&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;event manager applet enable_scopy_eem&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;action 1 cli command "ssh scopy enable"&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;But when I go back to the Standby unit, there's no scopy enable:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;patty/stby/pri# sh run | in scopy&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;event manager applet enable_scopy_eem&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;action 1 cli command "ssh scopy enable"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No errors. Even the Standby acknowledges the write memory command which should trigger a configuration sync.&lt;BR /&gt;If I go back to the Primary and do a gratuitous "write memory" or "copy running-config startup-config" it will not write the new command to the Standby leaving the devices out of sync.&lt;BR /&gt;Either this is a bug or behavior that I can't find any documentation for.&lt;BR /&gt;&lt;BR /&gt;I'm hoping someone with more experience than I can point out the simple mistake I'm probably making.&amp;nbsp;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Oct 2021 18:41:49 GMT</pubDate>
    <dc:creator>Jeffx</dc:creator>
    <dc:date>2021-10-19T18:41:49Z</dc:date>
    <item>
      <title>ASA EEM + failover sync issue</title>
      <link>https://community.cisco.com/t5/network-security/asa-eem-failover-sync-issue/m-p/4488741#M1085060</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I apologize if this message appears in the wrong category. It's my first post and none of the categories screamed EEM or ASA.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I can't tell if I'm doing something wrong or if I've discovered a bug in the EEM implementation on ASA OSes.&lt;BR /&gt;&lt;BR /&gt;I'm running 9.12.4.26 on a pair of ASA 5555-Xs and I've written a tiny EEM script that allows a python script logged into the Standby unit of an Active/Standby failover pair to enable SCP on the Primary. This script works except for the fact that once the config is saved on the Primary it is not replicated/synced to the Standby unit. In fact, once the command "ssh scopy enable" has been run via EEM and inserted into the Primary's config there is no way to save it to the Standby at all. If I go to the Primary's command line and do a "show run | in scopy" I can see the line the EEM script just added but no amount of "write memory" or "copy running-config startup-config" will cause the new scopy command to be replicated to the Standby. The configs are now out of sync and the only way to get them back in sync is to go into config mode on the Primary, do a "no ssh scopy enable", exit config mode, save the config, then go back into config mode on the Primary, add the "ssh scopy enable" command back, exit config mode and save then config. Now, the "ssh scopy enable" command will appear on the Standby.&lt;BR /&gt;&lt;BR /&gt;I have tried all kinds of variations of the EEM commands to no avail. I have enabled debug mode for both event manager scripts and failover syncing and everything appears as though it has worked but the new config command never shows up on the Standby.&lt;BR /&gt;&lt;BR /&gt;Please believe me when I say I have a good reason for trying to enable SCP this way. My company keeps it disabled by default and only enables it when performing OS upgrades, etc. This isn't my only option. It would however make the external code I have to write a lot simpler.&lt;BR /&gt;&lt;BR /&gt;I also realize that&amp;nbsp;9.12.4.35 is the current ASA OS version as of today (Oct. 19, 2021) - for the 9.12 train anyway -and upgrading to this version is part of the automation we are crafting now. I see nothing in the release notes between our version and the new version that leads me to believe this is a bug that's been solved.&lt;BR /&gt;&lt;BR /&gt;Here's the EEM script saved to the Primary, replicated to and then executed from the Standby:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;event manager applet enable_scopy_eem&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;description enable SCP from failover mate&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;event none&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;output none&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;action 001 cli command "ssh scopy enable"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;action 002 cli command "write memory"&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I've tried inserting "configure terminal" and "enable" or "end" commands where they seemed appropriate but the debugs showed these commands as producing errors so I stripped them out. This small script works to get "ssh scopy enable" into the Primary device's config from the Secondary so it does work.&lt;BR /&gt;&lt;BR /&gt;Enabling debugs on Primary and Standby nodes:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;patty/stby/pri# debug event manager 255&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;patty/stby/pri# debug fover sync&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;patty/act/sec# debug event manager 255&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;patty/act/sec# debug fover sync&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Executing this script from the Standby looks like:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;patty/stby/pri# &lt;STRONG&gt;failover exec mate event manager run enable_scopy_eem&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;patty/stby/pri# fover_parse: parse_thread_helper: Cmd: write memory&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;On the Primary I see this:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;patty/act/sec# Running applet enable_scopy_eem&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;eem: issuing commands&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;eem: executing 'ssh scopy enable' -&amp;gt; 0&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;event manager: frep_write_cmd: Cmd: write memory&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;eem: executing 'write memory' -&amp;gt; 0&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;If I look at the Primary's config now I see this &lt;EM&gt;(trust me, scopy enable wasn't there before)&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;patty/act/sec# sh run | in scopy&lt;/FONT&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;ssh scopy enable&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;event manager applet enable_scopy_eem&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;action 1 cli command "ssh scopy enable"&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;But when I go back to the Standby unit, there's no scopy enable:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;patty/stby/pri# sh run | in scopy&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;event manager applet enable_scopy_eem&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;action 1 cli command "ssh scopy enable"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No errors. Even the Standby acknowledges the write memory command which should trigger a configuration sync.&lt;BR /&gt;If I go back to the Primary and do a gratuitous "write memory" or "copy running-config startup-config" it will not write the new command to the Standby leaving the devices out of sync.&lt;BR /&gt;Either this is a bug or behavior that I can't find any documentation for.&lt;BR /&gt;&lt;BR /&gt;I'm hoping someone with more experience than I can point out the simple mistake I'm probably making.&amp;nbsp;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 18:41:49 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/asa-eem-failover-sync-issue/m-p/4488741#M1085060</guid>
      <dc:creator>Jeffx</dc:creator>
      <dc:date>2021-10-19T18:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: ASA EEM + failover sync issue</title>
      <link>https://community.cisco.com/t5/network-security/asa-eem-failover-sync-issue/m-p/4832226#M1100299</link>
      <description>&lt;P&gt;Hi Jeffx,&lt;/P&gt;
&lt;P&gt;I have the same problem with ASDM. When I push some changes, I can see them only in Active Node. When I write the script with CLI it works fine.&lt;/P&gt;
&lt;P&gt;any ideas?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;br&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 22:45:28 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/asa-eem-failover-sync-issue/m-p/4832226#M1100299</guid>
      <dc:creator>Yordan1</dc:creator>
      <dc:date>2023-05-09T22:45:28Z</dc:date>
    </item>
  </channel>
</rss>

