IBM / ibm-licensing-operator

Operator for IBM License Service
Other
24 stars 27 forks source link

Report does not appear to find installed software #671

Closed psdally closed 2 years ago

psdally commented 2 years ago

When using IBM License Service 1.16.3 installed as per https://www.ibm.com/docs/en/cpfs?topic=software-offline-installation, no products appear to be found after multiple data imports.

IBM Software is running in containers on this cluster, however. IBM License Metric Tool agents that are running on the worker Nodes of this cluster are finding that software.

The logs from the service instance Pod look like this:

2022-09-13 16:32:20.261 [scheduling-1] INFO  Starting data import with datacollector data source
2022-09-13 16:32:20.261 [scheduling-1] INFO  Using namespace ibm-common-services
2022-09-13 16:32:22.619 [scheduling-1] INFO  Starting data snapshots processing
2022-09-13 16:32:22.620 [scheduling-1] INFO  Processing data snapshot from 2022-09-13T16:32:22.568329Z
2022-09-13 16:32:22.620 [scheduling-1] INFO  No products processed during this import
2022-09-13 16:32:22.620 [scheduling-1] INFO  Data import with datacollector data source finished
2022-09-13 16:33:05.745 [qtp1196982797-19] INFO  Api Request: GET - /
2022-09-13 16:34:05.744 [qtp1196982797-16] INFO  Api Request: GET - /
2022-09-13 16:35:05.744 [qtp1196982797-13] INFO  Api Request: GET - /
2022-09-13 16:35:31.954 [qtp1196982797-17] INFO  Api Request: GET - /
2022-09-13 16:36:05.744 [qtp1196982797-13] INFO  Api Request: GET - /
2022-09-13 16:37:05.744 [qtp1196982797-19] INFO  Api Request: GET - /
2022-09-13 16:37:20.261 [scheduling-1] INFO  Starting data import with datacollector data source
2022-09-13 16:37:20.261 [scheduling-1] INFO  Using namespace ibm-common-services
2022-09-13 16:37:23.208 [scheduling-1] INFO  Starting data snapshots processing
2022-09-13 16:37:23.208 [scheduling-1] INFO  Processing data snapshot from 2022-09-13T16:37:23.043093Z
2022-09-13 16:37:23.208 [scheduling-1] INFO  No products processed during this import
2022-09-13 16:37:23.208 [scheduling-1] INFO  Data import with datacollector data source finished
<snip>

Accessing the status endpoint through an ingress shows the status page, but products, bundled products, nodes and pods are all empty. Downloading a report works, but the contents of the zip file appear to mostly be empty other than the header rows.

psdally commented 2 years ago

In doing further research, it appears that a possible explanation may be that the Pods need to be annotated before IBM License Service will process them?

Similar to the process described here? https://www.ibm.com/docs/en/app-connect/12.0?topic=lr-installing-license-service-adding-annotations-app-connect-enterprise-containers or https://www.ibm.com/docs/en/app-connect/containers_cd?topic=SSTTDS_contcd/com.ibm.ace.icp.doc/certc_install_licenseannotationsaceserver.html

If this is correct, it would be ideal if this was documented more prominently... as well as potentially providing some instructions on how to determine the productname, productid for a particular product.

Do we need to open a support case for that product to get this information?

psdally commented 2 years ago

I've confirmed that the annotations are required, and successfully validated this by adding the following annotations to a sample Pod:

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
  name: my-deployment
  namespace: dev-demo-debugnetworkpolicy-ns
spec:
  template:
    metadata:
      annotations:
        cloudpakId: 6358611af04743f99f42dadcd6e39d52
        cloudpakName: IBM WebSphere Hybrid Edition
        productChargedContainers: All
        productCloudpakRatio: "4:1"
        productID: e7daacc46bbe4e2dacd2af49145a4723
        productMetric: VIRTUAL_PROCESSOR_CORE
        productName: IBM WebSphere Application Server
      labels:
        app.kubernetes.io/name: my-deployment
    spec:
      containers:
      <snip>
pgodowski commented 2 years ago

Hi, can you please clarify which IBM product needs to be tracked for license usage? It it expected that IBM products are shipped with the required annotations along with the documentation. I would recommend opening a Support Case in the specific IBM product which is missing annotations or instructions. Thank you.