Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Updating Network Monitoring After Upgrading the Junos Space Network Management Platform

    Overview

    After upgrading the Junos Space Network Management Platform, the Network Monitoring configuration files might not contain the configuration file changes for the latest version. During the Junos Space Network Management upgrade process, the Software Install Status window displays a message if there are any configuration files in conflict. You can also access the /var/log/install.log file to view any files that have conflicts. To manually merge files that contain conflicts, you must perform all of the following steps. When the upgrade process encounters no files in conflict, the files are auto-merged and you do not need to perform the following steps.

    Step 1: Monitoring the Software Install Status Window for File Conflicts

    Check for the following message in the Software Install Status window during the upgrade of the Junos Space Network Management Platform:

    WARNING: Conflict observed during OpenNMS git-merge so please merge the changes manually:
    Please go to folder /opt/opennms/etc, and merge the *.old.bak files to current running files.

    When logged in from the Junos Space Network Management Platform command-line interface (CLI), you can also check for file conflicts from the /var/log/install.log file. The following example message from the install.log file shows three files with conflicts that you will need to manually merge to resolve:

    opennms-post.pl 62: Error while running git merge opennms-auto-upgrade/pristine: merge -Xpatience
    -Xignore-space-change -Xignore-all-space -Xrenormalize opennms-auto-upgrade/pristine:
    command returned error: 1 at /usr/lib/perl5/site_perl/5.8.8/Error.pm line 343.
    opennms-post.pl 63: The following files are in conflict:opennms-post.pl 65: eventconf.xmlopennms-post.pl 65: events/ncs-component.events.xmlopennms-post.pl 65: linkd-configuration.xml

    Note: If no files with conflicts are found during the upgrade process, the files are automatically merged, and you do not need to perform any additional steps. Otherwise, you must complete each of the following steps.

    Step 2: Identifying Files with Conflicts

    If you discovered one or more files with conflicts during the previous step, perform the following steps to identify the files with conflicts:

    1. Log in to the virtual IP (VIP) fabric node.
    2. Stop the Network Monitoring service from the Junos Space Network Management Platform user interface:
      1. Select Network Management Platform > Administration > Applications.

        The Applications page appears.

      2. Right-click Network Management Platform and click Manage Services. (Alternatively, you can select Network Management Platform and click Manage Services from the Actions menu.)

        The Manage Services page is displayed.

      3. Select the Network Monitoring service and click the Stop Service icon.

        The Confirm Stop SNMP Agent dialog box is displayed.

      4. Click Yes.

        A status dialog box with a message indicating that the service has stopped is displayed.

      5. Click OK.

        A dialog box is displayed confirming that the service has successfully stopped.

      6. Click OK.

        You are taken to the Manage Services page.

    3. From the Junos Space Network Management Platform CLI, check the status of the Network Monitoring service by executing the following command:
      # su - opennms -c '/sbin/service opennms status'

      Junos Space displays the message opennms is stopped.

    4. To re-merge the Network Monitoring configuration files:

      1. From the Junos Space CLI, execute the following command:
        # /opt/opennms/bin/config-tools/conflict-remerge.pl

        Junos Space displays output similar to the following:

        conflict-remerge.pl 19: Resetting tree to 'opennms-auto-upgrade/tags/runtime/pre-1.13.0-0.20131227.1'
      2. Navigate to the /opt/opennms/etc directory and execute the following command:
        # git status

        Most of the files are auto-merged. If any files remain, the status of each file in conflict is displayed under the section “Unmerged paths” and is marked "both modified", as shown in the following example:

        Unmerged paths:# (use "git add/rm ..." as appropriate to mark resolution)# both modified: eventconf.xml# both modified: events/ncs-component.events.xml# both modified: linkd-configuration.xml

        For each remaining conflicted file (listed under Unmerged paths) changes that were made to the file are identified with the opening statement "<<<<<< HEAD" and closing statement ">>>>>>> opennms-auto-upgrade/pristine". For example, in the ncs-component.events.xml file shown above, the file changes are marked as follows:

        <<<<<<< HEAD<alarm-data-reduction key="%uei%:%parm[componentType]%:%parm[componentForeignSource]%
        :%parm[componentForeignId]%" alarm-type="2"
        clear-key="uei.opennms.org/internal/ncs/componentImpacted:%parm[componentType]%
        :%parm[componentForeignSource]%:%parm[componentForeignId]%" auto-clean="false"/>
        ======<alarm-data-reduction-key="%uei%:%parm[componentType]%:%parm[componentForeignSource]%
        :%parm[componentForeignId]%:%parm[nodeid]%" alarm-type="2"
        clear-ei.opennms.org/internal/ncs/componentImpacted:%parm[componentType]%
        :%parm[componentForeignSource]%:%parm[componentFo
        ]%:%parm[nodeid]%"auto-clean="false"/>>>>>>>> opennms-auto-upgrade/pristine

    Step 3: Merging Files with Conflicts

    After identifying the files with conflicts, you must perform the following steps to manually merge each of the files and resolve all conflicts:

    1. From a VI editor, open the file with conflicts.
    2. Search for the statement "HEAD".
    3. Identify the differences between the two configurations which are contained between the lines <<<<< HEAD and >>>>> opennms-auto-upgrade/pristine.
      1. The configuration for the file before the upgrade is contained between the lines <<<<< HEAD and ========.
      2. The configuration for the file after the upgrade is contained between the lines ======== and >>>>> opennms-auto-upgrade/pristine.
    4. Save the configuration of the file after the upgrade, and then update it with any user-modified values from the configuration file before the upgrade.
    5. After manually merging configuration file changes, remove each of the following lines from the file:
      <<<<<<< HEAD============>>>>>>> opennms-auto-upgrade/pristine
    6. Save the configuration file.
    7. Repeat steps 2 through 6 for each configuration file with conflicts until all file conflicts in all files are merged.

      After all the file conflicts are merged, there should be no occurrence of the following lines:

      <<<<<<< HEAD============>>>>>>> opennms-auto-upgrade/pristine

    Step 4: Verifying the Manual Merge Status of Configuration Files

    From the Junos Space CLI, execute the following commands to verify that the configuration file changes are merged correctly:

    /opt/opennms/bin/config-tools/conflict-resolve.plgit status

    If the file changes were merged correctly, Junos Space displays the following message:

    nothing to commit (working directory clean)

    Step 5: Final Steps After Upgrading Network Monitoring

    Perform the following steps after upgrading Network Monitoring:

    1. Update permissions of the /opt/opennms directory to 774:
      # chmod -R 774 /opt/opennms
    2. Run the following command to change the ownership of the /opt/opennms directory to opennms:space:
      #chown -R opennms:space /opt/opennms
    3. Verify that the opennms.conf file includes the line RUNAS="opennms":
      # more opennms.confSTART_TIMEOUT=0ADDITIONAL_MANAGER_OPTIONS="-Djava.io.tmpdir=/opt/opennms/tmp -d64 -XX:MaxPermSize=512m -XX:HeapDumpPath=/var/opennms/java_pid <pid>.hprof -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCTimeStamps -XX:+PrintGCDetails"JAVA_HEAP_SIZE=2048RUNAS="opennms" #######Verify that this line exists
    4. The password of the user “postgres” in the opennms-datasources.xml file will be empty. Set the password to postgres:
      <jdbc-data-source name="opennms-admin"database-name="template1"class-name="org.postgresql.Driver"url="jdbc:postgresql://localhost:5432/template1"user-name="postgres"password="postgres" /> #######Password is set here
    5. Start the Network Monitoring service from the Junos Space user interface:

      1. Select Network Management Platform > Administration > Fabric.

        The Fabric page appears.

      2. Select the check box for each fabric node on which you want to start SNMP monitoring.
      3. From the Actions menu, select SNMP Start.

        The Confirm Start SNMP Agent dialog box is displayed.

      4. Click Yes.

        Junos Space starts SNMP monitoring on the selected fabric nodes.

    6. If your fabric is running in a multi-node setup, execute the following command to verify that all the modified configuration files are synchronized across the standby node:
      # /opt/opennms/contrib/failover/scripts/sync.sh

    Modified: 2015-08-14