Synchronizing Node Feature List

If you are using the tibcohost.exe command to enable or disable the Feature on the Node, the status of feature is not updated in ActiveMatrix Administrator UI. For example, if you removed the Feature myTestProject.customfeature.id using tibcohost.exe command but in ActiveMatrix Administrator, the Feature status displays as "Installed". In such a scenario, you can invoke syncNodeFeaturesStatus target using ActiveMatrix Administrator CLI to sync ActiveMatrix Administrator UI Node Feature list with runtime Node Feature list.

After enabling or disabling the Feature on a Node using tibcohost.exe command, If you do not synchronize the Node Features, the Administrator UI Node Feature list will not automatically get synchronized with the runtime Node Feature list.

For more information about using the tibcohost.exe command to enable or disable Features on the Node, see Enabling or Disabling the Node Features using the tibcohost.exe command.

Synchronizing Node Features Using ActiveMatrix Administrator CLI

  1. To get the status of Features on the Node, invoke the getNodeFeaturesStatus target of the node_build.xml file located in the samples directory ( CONFIG_HOME\admin\<Enterprise_Name>\samples or TIBCO_HOME\administrator\3.4\samples).
    Target in node_build.xml:
    <target name="getNodeFeaturesStatus">
    <AMXAdminTask action="getNodeFeaturesStatus"
    objectSelector="Environment/Node"
    remote="true"
    propsFile="${instanceProperties}"
    dataFile="${dataFile}" failOnError="false"/>
    </target>
    Sample node_data.xml file located in the samples directory ( CONFIG_HOME\admin\<Enterprise_Name>\samples or TIBCO_HOME\administrator\3.4\samples):
    <Environment xsi:type="amxdata:Environment" name="DevEnvironment" contact="TIBCO"> 
    <Node xsi:type="amxdata:Node" name="Node1" hostName="Host1" contact="TIBCO" 
    enableDebug="true" portNumber="5101" startupMode="Automatic“ />
    </Environment>

    After invoking the target, Node Features status is displayed as 'In-Sync' or 'Out-of-sync' as shown in the following output. For more information about Features sync status, see Features Sync Status.

    Sample Output:

    The following output displays the status of all Features on the Node as 'In-Sync' or 'Out-of-sync' with the runtime Node Feature list.

    [AMXAdminTask] 09 Apr 2018 11:44:34 INFO - ************* NODE FEATURES STATUS ARE *************
    [AMXAdminTask] 09 Apr 2018 11:44:34 INFO - FeatureName: 'jv.helloworld1.soa.customfeature.id', Status: 'In-Sync', runtimeFeatureVersion: '1.0.0.v2018-04-06-1814', dbEnabledFeatureVersion: '1.0.0.v2018-04-06-1814', dbRuntimeFeatureVersion: '1.0.0.v2018-04-06-1814'
    [AMXAdminTask] 09 Apr 2018 11:44:34 INFO - FeatureName: 'com.tibco.amx.platform.product.feature', Status: 'In-Sync', runtimeFeatureVersion: '1.4.0.000', dbEnabledFeatureVersion: '1.4.0.000', dbRuntimeFeatureVersion: '1.4.0.000'
    [AMXAdminTask] 09 Apr 2018 11:44:34 INFO - FeatureName: 'jv.datemanager.soa.customfeature.id', Status: 'In-Sync', runtimeFeatureVersion: '1.0.0.v2017-07-14-1244', dbEnabledFeatureVersion: '1.0.0.v2017-07-14-1244', dbRuntimeFeatureVersion: '1.0.0.v2017-07-14-1244'
    [AMXAdminTask] 09 Apr 2018 11:44:34 INFO - FeatureName: 'jv.helloworld2.soa.customfeature.id', Status: 'Out-Of-Sync', runtimeFeatureVersion: '1.0.0.v2018-04-09-1129', dbEnabledFeatureVersion: '', dbRuntimeFeatureVersion: ''
    [AMXAdminTask] 09 Apr 2018 11:44:34 INFO - FeatureName: 'jv.helloworld2.soa.customfeature.id', Status: 'In-Sync', runtimeFeatureVersion: '1.0.0.v2017-07-14-1244', dbEnabledFeatureVersion: '1.0.0.v2017-07-14-1244', dbRuntimeFeatureVersion: '1.0.0.v2017-07-14-1244'
  2. To synchronize a specific Feature of the Node with runtime, you must specify that <Feature> element in node_data.xml. You can find Feature ID and Feature version from the Feature list in the Infrastructure > Software Management > Features tab of ActiveMatrix Administrator.

    Features tab

    Sample node_data.xml:

    <Environment xsi:type="amxdata:Environment"
    name="DevEnvironment" contact="TIBCO">
    <Node xsi:type="amxdata:Node" name="Node1" hostName="Host1"
    contact="TIBCO" enableDebug="true" portNumber="5101"
    startupMode="Automatic">
    <Feature xsi:type="amxdata_base:FeatureID"
    componentID="jv.helloworld2.soa.customfeature.id" version="1.0.0.v2018-04-09-1129"/>
    </Node>
    </Environment>
    Invoke the syncNodeFeaturesStatus target to synchronize the Node Feature with runtime.

    Target in node_build.xml:

    <target name="syncNodeFeaturesStatus">
    <AMXAdminTask
    action="syncNodeFeaturesStatus"
    objectSelector="Environment/Node"
    remote="true"
    propsFile="${instanceProperties}"
    dataFile="${dataFile}"
    failOnError="false" />
    </target> 

    Sample Output:

    Above target synchronizes the Feature specified in node_data.xml that is jv.helloworld2.soa.customfeature.id:1.0.0.v2018-04-09-1129 with runtime.

    [AMXAdminTask] 09 Apr 2018 11:44:34 INFO - The Feature Id: jv.helloworld1.soa.customfeature.id:1.0.0.v2018-04-06-1814 cannot be Sync, as it is already In-Sync with Runtime
    [AMXAdminTask] 09 Apr 2018 11:44:34 INFO - The Feature Id: com.tibco.amx.platform.product.feature:1.4.0.000 cannot be Sync, as it is already In-Sync with Runtime
    [AMXAdminTask] 09 Apr 2018 11:44:34 INFO - The Feature Id: jv.datemanager.soa.customfeature.id:1.0.0.v2017-07-14-1244 cannot be Sync, as it is already In-Sync with Runtime
    [AMXAdminTask] 09 Apr 2018 11:44:34 INFO - The Feature Id: jv.helloworld2.soa.customfeature.id:1.0.0.v2017-07-14-1244 cannot be Sync, as it is already In-Sync with Runtime
    [AMXAdminTask] 09 Apr 2018 11:44:34 INFO - The Feature Id: jv.helloworld2.soa.customfeature.id:1.0.0.v2018-04-09-1129 added in Admin Database. Now it is In-Sync with Runtime
  3. To synchronize all the Features on the Node with the runtime, use syncAllFeatures option of the syncNodeFeaturesStatus target in the node_build.xml. You do not need to specify the <Feature> element in the node_data.xml.

    Sample node_data.xml:

    <Environment xsi:type="amxdata:Environment"
    name="DevEnvironment" contact="TIBCO">
    <Node xsi:type="amxdata:Node" name="Node1" hostName="Host1"
    contact="TIBCO" enableDebug="true" portNumber="5101"
    startupMode="Automatic">
    </Node>
    </Environment>
    Target in node_build.xml:
    <target name="syncNodeFeaturesStatus">
    <AMXAdminTask
    action="syncNodeFeaturesStatus"
    objectSelector="Environment/Node"
    remote="true"
    propsFile="${instanceProperties}"
    dataFile="${dataFile}"
    failOnError="false" 
    options="syncAllFeatures" />
    </target>  

    Sample Output:

    Above target synchronizes all Features on the Node with runtime. The Feature jv.helloworld2.soa.customfeature.id:1.0.0.v2018-04-09-1129 is removed from Administrator database, as it is not in runtime Feature list.

    [AMXAdminTask] 09 Apr 2018 11:49:39 INFO - The Feature Id: jv.helloworld1.soa.customfeature.id:1.0.0.v2018-04-06-1814 cannot be Sync, as it is already In-Sync with Runtime
    [AMXAdminTask] 09 Apr 2018 11:49:39 INFO - The Feature Id: com.tibco.amx.platform.product.feature:1.4.0.000 cannot be Sync, as it is already In-Sync with Runtime
    [AMXAdminTask] 09 Apr 2018 11:49:39 INFO - The Feature Id: jv.datemanager.soa.customfeature.id:1.0.0.v2017-07-14-1244 cannot be Sync, as it is already In-Sync with Runtime
    [AMXAdminTask] 09 Apr 2018 11:49:39 INFO - The Feature Id: jv.helloworld2.soa.customfeature.id:1.0.0.v2017-07-14-1244 cannot be Sync, as it is already In-Sync with Runtime
    [AMXAdminTask] 09 Apr 2018 11:49:39 INFO - The feature Id: jv.helloworld2.soa.customfeature.id:1.0.0.v2018-04-09-1129 removed from Admin Database, as it is not in Runtime