ACME Packet SBC 3800/4500: Name restrictions for manipulation rules Helper script for 6.2+ upgrades
ACME Packet / Oracle SBC releases 6.2 (and higher) introduce new restrictions applied to manipulation rules:
Manipulation rule names must match the expression “^[[alpha:]][[:alnum:]_]+$” and contain at least one lower case letter. In other words, the name must:
• Start with a letter, and then it can contain any number of letters, numbers, or underscores
• Contain at least one lower case letter
When upgrading a system running release 6.1 (or lower) with numerous existing rules, case warnings are generated. An example warning:
WARNING: element-rule [CLI] name contains invalid characters. Use characters that match the expression ^[[:alpha:]][[:alnum:]_]+$
Existing rules continue working fine, but in order to maintain a clean system they should be corrected.
Manually fixing the names for hundreds of rules from the ACLI can be a tedious, intensive task. This brutal script attempts to simplify this operation by performing corrections against a configuration backup extracted from the session border controller and utilizing the exact warnings generated by the SBC itself (no guesswork/assumptions).
NOTE: The approach is best suited for preparation on a lab/spare system to generate the fixed configuration.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
TLDR; USE AT YOUR OWN RISK!
- Copy the script from the archive to a directory your local system (ie: /opt/acme)
- Add execution permissions to the script:
# chmod +x ./acmeclean.sh
- Backup your initial SBC configuration and store safely for rollbacks (ie: backup_pre_upgrade.gz)
-
Restore the backup to a Lab SBC running version 6.1 (suggested) or on your standby node.
-
Upgrade your standby SBC node to version 6.2 (or higher) then execute command 'verify config'
WARNING: element-rule [CLI] name contains invalid characters. Use characters that match the expression ^[[:alpha:]][[:alnum:]_]+$
WARNING: element-rule [FROM_URI_HOST] name contains invalid characters. Use characters that match the expression ^[[:alpha:]][[:alnum:]_]+$
WARNING: element-rule [FROM_URI_USER] name contains invalid characters. Use characters that match the expression ^[[:alpha:]][[:alnum:]_]+$
* Copy-Paste all shown WARNING: lines from command output and save to a local file _(ie: warnings.txt)_
#### Script execution using Warnings + Backup
* Backup your SBC configuration post upgrade _(ie: backup_post_upgrade.gz)_ and copy locally via FTP/SFTP
* Execute the script with the proper parameters:
The script will produce a new “clean” configuration file _(backup_post_upgrade_mod.gz)_
#### Restore Patched Backup to SBC
* Copy the newly generated backup_mod to your SBC filesystem via FTP/SFTP
* Restore the newly generated backup archive on your SBC then execute command _“verify-config”_
#### **You're done!**
* If there are no more warnings, congratulations - you just saved yourself a ton of hours.
* If there are warnings and/or other issues, bad luck! Restore the original backup and proceed by feet.
##### Test Cases:
* SCX 6.1 -> SCX 6.2.x
* SCX 6.1 -> SCX 6.3.x
* SCX 6.1 -> SCX 6.4.x
* SCX 6.1 -> SCX 6.4.x -> SCZ 7.2.x
##### References:
https://docs.oracle.com/cd/E52358_01/doc/sbc_scx620_releasenotes.pdf