Infoscale Operations Manager at_migration.pl script does not work for Managed Host versions (VRTSsfmh/xprtld) higher than 7.x.

book

Article ID: 100053349

calendar_today

Updated On:

Description

Error Message

Using the "getvitals" utility to communicate from the VIOM Central Management Server (CMS) to the managed host, we can see the XPRTLD version return as 8.0.0:

VIOM CMS: viomcms.example.com (192.168.10.110)
Managed Host: viommh.example.com (192.168.10.101)

[root@viomcms ~]# /opt/VRTSsfmh/bin/xprtlc -l https://192.168.10.101:5634/world/getvitals -u nobody
{
"XPRTLD_VERSION" :  "8.0.0.0000",
"LOCAL_NAME" : "viommh",
"LOCAL_ADDR" : "192.168.10.101",
"PEER_NAME" : "viomcms.example.com",
"PEER_ADDR" : "192.168.10.110",
"LOCAL_TIME" : "1655996464",
"LOCALE" : "en_US.UTF-8",
"DOMAIN_MODE" : "FALSE",
"QUIESCE_MODE" : "RUNNING",
"OSNAME" : "SunOS",
"OSRELEASE" : "5.11",
"CPUTYPE" : "sparc",
"OSUUID" : "{00020014-4ff8-d967-0000-000084fb2444}",
"DOMAINS" : {
    "sfm://viomcms.example.com:5634/" : {
        "primary_broker" : "vxss://viomcms.example.com:14545/sfm_agent/sfm_domain/vx"
        }
    }
}


In the VIOM 8.0 Installation and Configuration guide, the following link details the procedure to migrate hosts to a 2048-bit certificate for security updates:
IOM Installation and Configuration guide


In the example below, there are only two hosts registered the VIOM CMS - "viommh" with Infoscale/sfmh version 8.0, and the VIOM CMS with version 8.0, however running the at_migration.pl script incorrectly returns their xprtld version values as "older than 7.0":


[root@viomcms ~]# /opt/VRTSsfmh/util/at_migration.pl --migrate

Number of hosts with 7.0 managed host version and reachable from Management Server : 0
Number of hosts with older managed host version : 2
Number of hosts not reachable from Management Server : 0


ERROR : Migration aborted as there are hosts that are either not running managed host version 7.0
or they are not reachable from Management Server.

You need to upgrade the older managed hosts to 7.0 and make sure
that Management Server is able to communicate to all the managed hosts.
Run the AT Migration script once again after fixing the above mentioned issues.

 

Cause

 

The logic inside the at_migration.pl script is looking for xprtld versions 7.x only, and does not account for the newer 8.0 version.  

Line 515 of at_migration.pl shows the syntax that requires an update:

 513             else {
 514                 my $obj = from_json($out);
 515                 if ($obj->{XPRTLD_VERSION} =~ /^7\.*/){
 516                     VRTS::Logger::log('info',"getvitals passed for host $hostdata->{hostname} ");
 517                     $eligible++;
 518                     print $e "$hostdata->{hostname} \n";
 519                 }

 

Resolution

 

To resolve this logic error, we can simply edit the values to accept 7.x and 8.x xprtld versions as valid:

1. Copy the file to a backup before editing the script:

# cp /opt/VRTSsfmh/util/at_migration.pl /opt/VRTSsfmh/util/at_migration.pl.backup

 

2. Edit line 515 to allow 7.x or 8.x versions as valid input for the script:

# vi /opt/VRTSsfmh/util/at_migration.pl

// edit line 515 from:
>                 if ($obj->{XPRTLD_VERSION} =~ /^7\.*/){
update to
<                 if ($obj->{XPRTLD_VERSION} =~ /^[7-8]\.*/){


The script should now effectively list the hosts that are on 7.x or 8.x versions.  The script output will still show

Number of hosts with 7.0 managed host version and reachable from Management Server

but this logic will work for 8.x hosts as well.

 

Note:
If following the steps to migrate your affected hosts (step #4 of the above URL in the VIOM Installation/Configuration guide), the .xml file will be generated on the CMS at the following path:

/var/opt/VRTSsfmh/tmp/mh_cred.xml

Issue/Introduction

Infoscale Operations Manager at_migration.pl script does not account for Managed Host versions (VRTSsfmh/xprtld) higher than 7.x.