Monitors Scripts are Not Updated after NetScaler Upgrade

Monitors Scripts are Not Updated after NetScaler Upgrade

book

Article ID: CTX139332

calendar_today

Updated On:

Description

When NetScaler is upgraded from version 9.3_x to 10.x builds, the Monitor scripts in the path “/nsconfig/monitor” are not updated. The Monitors depending on the updated scripts may fail.

There are two types of Monitors available on the NetScaler Application Switch:

  • Default customer or Kernel Monitors like ping, http, tcp, http-ecv, ftp, https that provide basic monitoring functionality for a single request or response.
  • Advanced Monitors, also called as User Monitors or Scriptable Monitors are custom scripts that run in a user memory space on the NetScaler Application Switch. Sample scripts are released with the NetScaler Application Switch in the path /nsconfig/monitors/ that can extend the NetScaler Application Switch default Monitors.

Resolution

The nsfsyncd process synchronizes the files that are in /monitor, /ssl directories under /nsconfig directory.

As a workaround, to restrict the /nsconfig/monitor from synchronization, complete the following steps before upgrading the NetScaler appliance on HA pair:
  1. On Secondary node, prior to upgrade, go to the Shell prompt and comment out the nsfsyncd line in the /etc/crontab using the vi editor.
    > shell
    Copyright (c) 1992-2008 The FreeBSD Project.
    Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
            The Regents of the University of California. All rights reserved.
    root@ns# vi /etc/crontab

    root@ns# vi /etc/crontab

    SHELL=/bin/sh
    PATH=/netscaler:/etc:/bin:/sbin:/usr/bin:/usr/sbin
    HOME=/var/log
    #minute hour    mday    month   wday    who     command
    0       *       *       *       *       root    newsyslog
    #
    # time zone change adjustment for wall cmos clock,
    # does nothing, if you have UTC cmos clock.
    # See adjkerntz(8) for details.
    1,31    0-5     *       *       *       root    adjkerntz -a
    # *       *       *       *       *       root    nsfsyncd -p

    root nsfsyncd -p

  2. To persist the changes across reboots, copy the modified /etc/crontab to /var/tmp folder using the following commands:
    cp /etc/crontab /var/tmp/crontab.modified
    echo cp /var/tmp/crontab.modified /etc/crontab >>/nsconfig/rc.netscaler

    echo cp /var/tmp/crontab.modified /etc/crontab >>/nsconfig/rc.netscaler
  3. Create an rc.netscaler file in the /nsconfig directory with the command cp /var/tmp/crontab.modified /etc/crontab.

    This enables the Secondary node to stop synchronizing the Monitors from the current primary node on the old build.
  4. After Secondary node is upgraded, the Monitor scripts are not synchronized. So, force failover and upgrade the other NetScaler.

  5. After the upgrade is performed successfully on the HA pair, the files under /nsconfig/monitor should be updated with the current build version date.

  6. To enable the file synchronization process, remove the command added to the rc.netscaler and revert the changes to /etc/crontab.

    The following are the processes responsible for synchronizing files:

  • [syncer] - Default bsd process

  • nsfsyncd - This process is responsible to sync the files when executing commands “sync ha files”

  • nscfsyncd - Cluster config sync

  • nsclfsyncd - Cluster file sync

  • nssync - NetScaler configuration sync 


Problem Cause

The Monitor scripts in the path /nsconfig/monitor are synchronized with the old primary to secondary NetScaler in the latest build. Because of KAS.pm module update from 10.x builds, Monitor scripts are not updated to the build installed on the Secondary High Availability pair.

Issue/Introduction

This article provides workaround when monitors scripted are not updated after NeScaler upgrade.