Smarts IP/SAM: DMCTL "get class:instance" command returns incorrect error code.
search cancel

Smarts IP/SAM: DMCTL "get class:instance" command returns incorrect error code.

book

Article ID: 331689

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

Symptoms:


Although the visible output is correct the command still returns an error code 1. This is a problem when running scripts that rely on error codes
 
An example of this issue where the dmctl get class:instance command returns incorrect error code:
 
[root@ngnd2-s1 script]# /opt/InCharge9/SAM/smarts/bin/dmctl -s "localhost:426/dmbroker" getInstances  DomainManager
CPN
EU-MPLS-AM1
EU-MPLS-OI1
EU-MPLS-TRAP1
IC1-TE
INCHARGE-MBIM
UK-MPLS-AM1
UK-MPLS-OI1
UK-MPLS-TRAP1
 
[root@ngnd2-s1 script]# echo $?
0
[root@ngnd2-s1 script]# /opt/InCharge9/SAM/smarts/bin/dmctl -s "localhost:426/dmbroker" get  DomainManager::CPN
 
Properties of DomainManager::CPN:
    CreationClassName = DomainManager
                 Name = CPN
             ServedBy = {  }
               Serves = {  }
          ServiceName =
      certificateName =
             hostName = 63.130.127.162
          hostNameStr = ngnd2-s1
              msgPort = 0
                 port = 39799
            processId = 2012
            publicKey =
           socketPort = 39799
                state = 0
         stateChgTime = 1385455024
             usingTLS = TRUE
           v6hostName =
        v6hostNameStr =
               v6port = 0
              v6state = 2
       v6stateChgTime = 1385455024
 
[root@ngnd2-s1 script]# echo $?
1


Environment

VMware Smart Assurance - SMARTS

Cause

This is a known issue for this DMCTL command used in previously supported versions of Smarts and happens across all supported OS versions.

Resolution

This issue is no longer seen in all supported versions of VMware Smart Assurance suite.