Hello community,

here is the log from the commit of package qclib for openSUSE:Leap:15.2 checked 
in at 2020-02-04 17:53:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/qclib (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.qclib.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "qclib"

Tue Feb  4 17:53:45 2020 rev:24 rq:766283 version:2.0.1

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/qclib/qclib.changes    2020-01-15 
15:54:58.803650752 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.qclib.new.26092/qclib.changes 2020-02-04 
17:54:06.984738291 +0100
@@ -1,0 +2,12 @@
+Tue Jan 21 18:28:32 UTC 2020 - Mark Post <[email protected]>
+
+- Upgraded to version 2.0.1 (bsc#1160745)
+  Changes:
+  - Retry up to three times when a live guest migration is detected
+  Bug fixes:
+  - Attribute qc_num_ziip_threads in CEC layer was not correctly set.
+  - Do not account zIIPs in layer QC_LAYER_TYPE_ZOS_ZCX_SERVER for
+    qc_num_cpu_* attributes.
+  - qc_dump: Handle non-writable /tmp
+
+-------------------------------------------------------------------

Old:
----
  qclib-2.0.0.tgz

New:
----
  qclib-2.0.1.tgz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ qclib.spec ++++++
--- /var/tmp/diff_new_pack.6OyaB3/_old  2020-02-04 17:54:07.536738624 +0100
+++ /var/tmp/diff_new_pack.6OyaB3/_new  2020-02-04 17:54:07.540738627 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package qclib
 #
-# Copyright (c) 2017-2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017-2020 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           qclib
-Version:        2.0.0
+Version:        2.0.1
 Release:        0
 Summary:        Query Capacity library
 License:        BSD-3-Clause

++++++ qclib-2.0.0.tgz -> qclib-2.0.1.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.0.0/Makefile new/qclib-2.0.1/Makefile
--- old/qclib-2.0.0/Makefile    2019-11-15 09:00:05.000000000 +0100
+++ new/qclib-2.0.1/Makefile    2020-01-08 22:26:50.000000000 +0100
@@ -4,7 +4,7 @@
 #     major : Backwards compatible changes to the API
 #     minor : Additions leaving the API unmodified
 #     bugfix: Bugfixes only
-VERSION = 2.0.0
+VERSION = 2.0.1
 VERM    = $(shell echo $(VERSION) | cut -d '.' -f 1)
 CFLAGS ?= -g -Wall -O2
 CFILES  = query_capacity.c query_capacity_data.c query_capacity_sysinfo.c 
query_capacity_ocf.c \
@@ -12,6 +12,9 @@
 OBJECTS = $(patsubst %.c,%.o,$(CFILES))
 .SUFFIXES: .o .c
 
+LEVEL := $(shell git log --pretty=format:'%h' -n 1)
+DATE  := $(shell git log --pretty=format:'%ai' -n 1)
+
 ifneq ("${V}","1")
         MAKEFLAGS += --quiet
        cmd = echo $1$2;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.0.0/README new/qclib-2.0.1/README
--- old/qclib-2.0.0/README      2019-11-15 09:00:05.000000000 +0100
+++ new/qclib-2.0.1/README      2020-01-08 22:26:50.000000000 +0100
@@ -93,13 +93,24 @@
 Release History:
 ================
 
+2.0.1
+    Changes:
+    - Retry up to three times when a live guest migration is detected
+
+    Bug fixes:
+    - Attribute qc_num_ziip_threads in CEC layer was not correctly set.
+    - Do not account zIIPs in layer QC_LAYER_TYPE_ZOS_ZCX_SERVER for
+      qc_num_cpu_* attributes.
+    - qc_dump: Handle non-writable /tmp
+
 2.0.0
     Changes:
+    - Add support for z/OS Container Extensions (zCX)
     - New attributes in layer CEC:
          * qc_type_name
          * qc_type_family
          * qc_lic_identifier
-    - qc_test: Reworked output for subtle consistency improvements
+    - qc_test: Reworked output for subtle consistency improvements.
     - Replaced attribute qc_hardlimit_consumption with
       qc_limithard_consumption. Use CONFIG_V1_COMPATIBILITY for previous
       version.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.0.0/hcpinfbk.h new/qclib-2.0.1/hcpinfbk.h
--- old/qclib-2.0.0/hcpinfbk.h  2019-11-15 09:00:05.000000000 +0100
+++ new/qclib-2.0.1/hcpinfbk.h  2020-01-08 22:26:50.000000000 +0100
@@ -317,7 +317,7 @@
 #define infgpuccp  0x00                /* General Purpose (CP)              
@VRLDWDN */
 #define infgpucifl 0x03                /* Integrated Fac for Linux (IFL).   
@VRLDWDN */
 #define infgpuczip 0x05                /* zSeries Integrated Information       
      */
-#define infgpucspl 0xFF                /* May be dispatched on zIIP and CP     
      */
+#define infgpuczcp 0xFF                /* May be dispatched on zIIP and CP     
      */
 /* Values for field "infgpflg" */
 #define infgpclh   0x80                /* Resource Pool's CP virtual type      
      */
 #define infgpcpc   0x40                /* Resource Pool's CP virtual type      
      */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.0.0/qc_dump new/qclib-2.0.1/qc_dump
--- old/qclib-2.0.0/qc_dump     2019-11-15 09:00:05.000000000 +0100
+++ new/qclib-2.0.1/qc_dump     2020-01-08 22:26:50.000000000 +0100
@@ -32,7 +32,11 @@
 
 echo "Adding further content...";
 cd /tmp
-dump="`ls -rtd qclib-??????.dump-1 | tail -1`";
+dump="`ls -rtd qclib-??????.dump-1 2>/dev/null | tail -1`";
+if [ "$dump" == "" ]; then
+       echo "Error: No dump data found, sorry";
+       exit 3;
+fi
 mv ref_result.txt $dump;
 lscpu -e                       > $dump/lscpu.output;
 hostname                       > $dump/hostname.output;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.0.0/qc_test.c new/qclib-2.0.1/qc_test.c
--- old/qclib-2.0.0/qc_test.c   2019-11-15 09:00:05.000000000 +0100
+++ new/qclib-2.0.1/qc_test.c   2020-01-08 22:26:50.000000000 +0100
@@ -93,16 +93,16 @@
        case qc_num_core_dedicated: return "qc_num_core_dedicated";
        case qc_num_core_shared: return "qc_num_core_shared";
        case qc_ziip_absolute_capping: return "qc_ziip_absolute_capping";
-        case qc_ziip_capacity_cap: return "qc_ziip_capacity_cap";
-        case qc_ziip_capped_capacity: return "qc_ziip_capped_capacity";
-        case qc_ziip_dispatch_limithard: return "qc_ziip_dispatch_limithard";
-        case qc_ziip_dispatch_type: return "qc_ziip_dispatch_type";
-        case qc_ziip_limithard_cap: return "qc_ziip_limithard_cap";
-        case qc_ziip_weight_capping: return "qc_ziip_weight_capping";
-        case qc_num_ziip_dedicated: return "qc_num_ziip_dedicated";
+       case qc_ziip_capacity_cap: return "qc_ziip_capacity_cap";
+       case qc_ziip_capped_capacity: return "qc_ziip_capped_capacity";
+       case qc_ziip_dispatch_limithard: return "qc_ziip_dispatch_limithard";
+       case qc_ziip_dispatch_type: return "qc_ziip_dispatch_type";
+       case qc_ziip_limithard_cap: return "qc_ziip_limithard_cap";
+       case qc_ziip_weight_capping: return "qc_ziip_weight_capping";
+       case qc_num_ziip_dedicated: return "qc_num_ziip_dedicated";
        case qc_num_ziip_shared: return "qc_num_ziip_shared";
        case qc_num_ziip_total: return "qc_num_ziip_total";
-        case qc_num_ziip_threads: return "qc_num_ziip_threads";
+       case qc_num_ziip_threads: return "qc_num_ziip_threads";
 
        default: break;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.0.0/query_capacity.c 
new/qclib-2.0.1/query_capacity.c
--- old/qclib-2.0.0/query_capacity.c    2019-11-15 09:00:05.000000000 +0100
+++ new/qclib-2.0.1/query_capacity.c    2020-01-08 22:26:50.000000000 +0100
@@ -111,7 +111,7 @@
                                goto out_err;
                        }
                }
-               qc_debug(NULL, "This is qclib v2.0.0, level bb687ff             
                        , date 2019-11-10 10:16:30 +0100                        
                \n");
+               qc_debug(NULL, "This is qclib v2.0.1, level 831726bb, date 
2020-01-07 20:45:22 +0100\n");
        }
 
        return 0;
@@ -315,6 +315,28 @@
        }
 }
 
+/** Verifies that either a and (b or c), or none are set. I.e. if only one of 
the attributes is set, then that's an error */
+static int qc_verify_capped_capacity(struct qc_handle *hdl, enum qc_attr_id a, 
enum qc_attr_id b, enum qc_attr_id c) {
+       int *val_a, *val_b, *val_c;
+
+       // We assume that non-presence of a value is due to...non-presence, as 
opposed to an error (since that would have been reported previously)
+       val_a = qc_get_attr_value_int(hdl, a);
+       val_b = qc_get_attr_value_int(hdl, b);
+       val_c = qc_get_attr_value_int(hdl, c);
+       if (!val_a && !val_b && !val_c)
+               return 0;
+
+       if ((*val_a && !*val_b && !*val_c) || (!*val_a && (*val_b || *val_c))) {
+               qc_debug(hdl, "Warning: Consistency check (\"capped capacity\") 
for '%s && (%s || %s)' failed at layer %d (%s/%s): %d && (%d || %d)\n",
+                       qc_attr_id_to_char(hdl, a), qc_attr_id_to_char(hdl, b), 
qc_attr_id_to_char(hdl, c),
+                       hdl->layer_no, qc_get_attr_value_string(hdl, 
qc_layer_type), qc_get_attr_value_string(hdl, qc_layer_category),
+                       *val_a, *val_b, *val_c);
+               return 1;
+       }
+
+       return 0;
+}
+
 #define ATTR_UNDEF     qc_layer_name
 /** Verifies that a + (b (+ c)) <= d (b and c are optional, where b being 
unset (==ATTR_UNDEF) implies c being unset, too)
  *  for the respective int-attributes holds true.
@@ -406,6 +428,13 @@
                            (rc = qc_verify(hdl, qc_num_ziip_dedicated, 
qc_num_ziip_shared,     ATTR_UNDEF, qc_num_ziip_total,    1)))
                                goto out;
                        break;
+               case QC_LAYER_TYPE_ZVM_CPU_POOL:
+               case QC_LAYER_TYPE_ZOS_TENANT_RESOURCE_GROUP:
+                       if ((rc = qc_verify_capped_capacity(hdl, 
qc_cp_capped_capacity, qc_cp_capacity_cap, qc_cp_limithard_cap)) ||
+                           (rc = qc_verify_capped_capacity(hdl, 
qc_ifl_capped_capacity, qc_ifl_capacity_cap, qc_ifl_limithard_cap)) ||
+                           (rc = qc_verify_capped_capacity(hdl, 
qc_ziip_capped_capacity, qc_ziip_capacity_cap, qc_ziip_limithard_cap)))
+                               goto out;
+                       break;
                case QC_LAYER_TYPE_ZVM_GUEST:
                        if ((rc = qc_verify(hdl, qc_num_cpu_dedicated,  
qc_num_cpu_shared,      ATTR_UNDEF,             qc_num_cpu_total,       1)) ||
                            (rc = qc_verify(hdl, qc_num_cpu_configured, 
qc_num_cpu_reserved,    qc_num_cpu_standby,     qc_num_cpu_total,       1)) ||
@@ -437,6 +466,8 @@
        }
 
 out:
+       if (rc)
+               qc_debug(hdl, "Warning: Consistency check failed\n");
        qc_debug_indent_dec();
 
        return rc;
@@ -505,16 +536,14 @@
 }
 
 static int qc_post_process_CEC(struct qc_handle *hdl) {
-       int cpuid, rc = 0, family = QC_TYPE_FAMILY_IBMZ;
+       int cpuid, rc = -1, family = QC_TYPE_FAMILY_IBMZ;
        struct qc_mtype *type;
        char *str;
 
        qc_debug(hdl, "Fill CEC layer\n");
        qc_debug_indent_inc();
-       if ((str = qc_get_attr_value_string(hdl, qc_type)) == NULL) {
-               rc = -1;
+       if ((str = qc_get_attr_value_string(hdl, qc_type)) == NULL)
                goto out;
-       }
        cpuid = atoi(str);
        for (type = mtypes; type->type; ++type) {
                if (cpuid == type->type) {
@@ -527,10 +556,13 @@
                                str = type->zname;
                        if (qc_set_attr_string(hdl, qc_type_name, str, 
ATTR_SRC_POSTPROC) ||
                            qc_set_attr_int(hdl, qc_type_family, family, 
ATTR_SRC_POSTPROC))
-                               rc = -1;
-                       goto out;
+                               goto out;
+                       break;
                }
        }
+       if (qc_post_process_ziip_thrds(hdl))
+               goto out;
+       rc = 0;
 
 out:
        qc_debug_indent_dec();
@@ -805,16 +837,17 @@
         * giving up. */
        for (i = 0; i < 3; ++i) {
                if (i > 0) {
-                       qc_debug(hdl, "Warning: Consistency check failed, retry 
%d\n", i);
+                       qc_debug(hdl, "Warning: Gathering data failed, retry 
%d\n", i);
                        qc_hdl_reinit(hdl);
                }
                hdl = _qc_open(hdl, rc);
-               if (*rc || ((*rc = qc_consistency_check(hdl)) <= 0))
+               if (*rc > 0)
+                       continue;
+               if (*rc < 0 || ((*rc = qc_consistency_check(hdl)) <= 0))
                        break;
        }
-       if (*rc > 0) {
-               qc_debug(hdl, "Warning: Unable to retrieve consistent data, 
giving up\n");
-       }
+       if (*rc > 0)
+               qc_debug(hdl, "Error: Unable to retrieve consistent data, 
giving up\n");
        if (*rc == 0)
                *rc = qc_register_hdl(hdl);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.0.0/query_capacity.h 
new/qclib-2.0.1/query_capacity.h
--- old/qclib-2.0.0/query_capacity.h    2019-11-15 09:00:05.000000000 +0100
+++ new/qclib-2.0.1/query_capacity.h    2020-01-08 22:26:50.000000000 +0100
@@ -459,7 +459,9 @@
        qc_cp_absolute_capping = 8,
        /** 1 if pool's CP virtual type has capped capacity<BR> 0 if not<br>See 
\c DEFINE \c CPUPOOL command in [3] */
        qc_cp_capacity_cap = 9,
-       /** Guest current capped capacity for shared virtual CPs -- scaled 
value where 0x10000 equals to one core, or 0 if no capping set */
+       /** Guest current capped capacity for shared virtual CPs -- scaled 
value where 0x10000 equals to one core,
+           or 0 if no capping set. While this field displays the capacity, 
either #qc_cp_capacity_cap or
+           #qc_cp_limithard_cap must is set to indicate the kind of limit. */
        qc_cp_capped_capacity = 10,
        /** 1 if guest CP dispatch type has LIMITHARD capping,<BR> 0 if 
not<br>See \c SET \c SRM command in [3] */
        qc_cp_dispatch_limithard = 11,
@@ -481,7 +483,9 @@
        qc_ifl_absolute_capping = 17,
        /** 1 if pool's IFL virtual type has capped capacity<BR> 0 if 
not<br>See \c DEFINE \c CPUPOOL command in [3] */
        qc_ifl_capacity_cap = 18,
-       /** Guest current capped capacity for shared virtual IFLs -- scaled 
value where 0x10000 equals to one core, or 0 if no capping set */
+       /** Guest current capped capacity for shared virtual IFLs -- scaled 
value where 0x10000 equals to one core,
+           or 0 if no capping set. While this field displays the capacity, 
either #qc_ifl_capacity_cap or
+           #qc_ifl_limithard_cap must is set to indicate the kind of limit. */
        qc_ifl_capped_capacity = 19,
        /** 1 if guest IFL dispatch type has LIMITHARD capping,<BR> 0 if 
not<br>See \c SET \c SRM command in [3] */
        qc_ifl_dispatch_limithard = 20,
@@ -495,7 +499,9 @@
        qc_ziip_absolute_capping = 66,
        /** 1 if pool's zIIP virtual type has capped capacity<BR> 0 if 
not<br>See \c DEFINE \c CPUPOOL command in [3] */
        qc_ziip_capacity_cap = 67,
-       /** Guest current capped capacity for shared virtual zIIPs -- scaled 
value where 0x10000 equals to one core, or 0 if no capping set */
+       /** Guest current capped capacity for shared virtual zIIPs -- scaled 
value where 0x10000 equals to one core,
+           or 0 if no capping set. While this field displays the capacity, 
either #qc_ziip_capacity_cap or
+           #qc_ziip_limithard_cap must is set to indicate the kind of limit. */
        qc_ziip_capped_capacity = 68,
        /** 1 if guest zIIP dispatch type has LIMITHARD capping,<BR> 0 if 
not<br>See \c SET \c SRM command in [3] */
        qc_ziip_dispatch_limithard = 69,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.0.0/query_capacity_data.c 
new/qclib-2.0.1/query_capacity_data.c
--- old/qclib-2.0.0/query_capacity_data.c       2019-11-15 09:00:05.000000000 
+0100
+++ new/qclib-2.0.1/query_capacity_data.c       2020-01-08 22:26:50.000000000 
+0100
@@ -46,7 +46,7 @@
                case qc_plant: return QC_LEN_PLANT;
                case qc_sequence_code: return QC_LEN_SEQUENCE_CODE;
                case qc_type: return QC_LEN_TYPE;
-                case qc_type_name: return QC_LEN_TYPE_NAME;
+               case qc_type_name: return QC_LEN_TYPE_NAME;
                default: break;
        }
 
@@ -65,7 +65,7 @@
        char model_capacity[QC_LEN_MODEL_CAPACITY];
        char model[QC_LEN_MODEL];
        char type_name[QC_LEN_TYPE_NAME];
-        int type_family;
+       int type_family;
        char sequence_code[QC_LEN_SEQUENCE_CODE];
        char lic_identifier[QC_LEN_LIC_IDENTIFIER];
        char plant[QC_LEN_PLANT];
@@ -81,12 +81,12 @@
        int num_ifl_total;
        int num_ifl_dedicated;
        int num_ifl_shared;
-        int num_ziip_total;
+       int num_ziip_total;
        int num_ziip_dedicated;
        int num_ziip_shared;
        int num_cp_threads;
        int num_ifl_threads;
-        int num_ziip_threads;
+       int num_ziip_threads;
        float capability;
        float secondary_capability;
        int capacity_adjustment_indication;
@@ -104,7 +104,7 @@
        char layer_name[QC_LEN_LAYER_NAME];
        int cp_absolute_capping;
        int ifl_absolute_capping;
-        int ziip_absolute_capping;
+       int ziip_absolute_capping;
 };
 
 /*
@@ -134,18 +134,18 @@
        int num_ifl_total;
        int num_ifl_dedicated;
        int num_ifl_shared;
-        int num_ziip_total;
+       int num_ziip_total;
        int num_ziip_dedicated;
        int num_ziip_shared;
        int num_cp_threads;
        int num_ifl_threads;
-        int num_ziip_threads;
+       int num_ziip_threads;
        int cp_absolute_capping;
        int ifl_absolute_capping;
-        int ziip_absolute_capping;
+       int ziip_absolute_capping;
        int cp_weight_capping;
        int ifl_weight_capping;
-        int ziip_weight_capping;
+       int ziip_weight_capping;
 };
 
 struct qc_zvm_pool {
@@ -158,11 +158,11 @@
        int cp_capacity_cap;
        int ifl_limithard_cap;
        int ifl_capacity_cap;
-        int ziip_limithard_cap;
+       int ziip_limithard_cap;
        int ziip_capacity_cap;
        int cp_capped_capacity;
        int ifl_capped_capacity;
-        int ziip_capped_capacity;
+       int ziip_capped_capacity;
 };
 
 struct qc_zvm_hypervisor {
@@ -185,12 +185,12 @@
        int num_ifl_total;
        int num_ifl_dedicated;
        int num_ifl_shared;
-        int num_ziip_total;
+       int num_ziip_total;
        int num_ziip_dedicated;
        int num_ziip_shared;
        int num_cp_threads;
        int num_ifl_threads;
-        int num_ziip_threads;
+       int num_ziip_threads;
 };
 
 struct qc_zvm_guest {
@@ -210,10 +210,10 @@
        int num_cp_total;
        int num_cp_dedicated;
        int num_cp_shared;
-        int num_ifl_total;
+       int num_ifl_total;
        int num_ifl_dedicated;
        int num_ifl_shared;
-        int num_ziip_total;
+       int num_ziip_total;
        int num_ziip_dedicated;
        int num_ziip_shared;
        int mobility_enabled;
@@ -224,18 +224,18 @@
        int ifl_dispatch_limithard;
        int ifl_dispatch_type;
        int ifl_capped_capacity;
-        int ziip_dispatch_limithard;
+       int ziip_dispatch_limithard;
        int ziip_dispatch_type;
        int ziip_capped_capacity;
 };
 
 struct qc_zos_hypervisor {
-        int layer_type_num;
+       int layer_type_num;
        int layer_category_num;
        char layer_type[QC_LEN_LAYER_TYPE];
        char layer_category[QC_LEN_LAYER_CATEGORY];
        char layer_name[QC_LEN_LAYER_NAME];
-        char cluster_name[QC_LEN_CLUSTER_NAME];
+       char cluster_name[QC_LEN_CLUSTER_NAME];
        char control_program_id[QC_LEN_CONTROL_PROGRAM_ID];
        int adjustment;
        int num_core_total;
@@ -252,14 +252,14 @@
 };
 
 struct qc_zos_tenant_resource_group {
-        int layer_type_num;
+       int layer_type_num;
        int layer_category_num;
        char layer_type[QC_LEN_LAYER_TYPE];
        char layer_category[QC_LEN_LAYER_CATEGORY];
        char layer_name[QC_LEN_LAYER_NAME];
        int cp_limithard_cap;
        int cp_capacity_cap;
-        int cp_capped_capacity;
+       int cp_capped_capacity;
        int ziip_limithard_cap;
        int ziip_capacity_cap;
        int ziip_capped_capacity;
@@ -282,14 +282,14 @@
        int num_cp_total;
        int num_cp_dedicated;
        int num_cp_shared;
-        int num_ziip_total;
+       int num_ziip_total;
        int num_ziip_dedicated;
        int num_ziip_shared;
        int has_multiple_cpu_types;
        int cp_dispatch_limithard;
        int cp_dispatch_type;
        int cp_capped_capacity;
-        int ziip_dispatch_limithard;
+       int ziip_dispatch_limithard;
        int ziip_dispatch_type;
        int ziip_capped_capacity;
 };
@@ -355,7 +355,7 @@
        {qc_model_capacity, string, offsetof(struct qc_cec, model_capacity)},
        {qc_model, string, offsetof(struct qc_cec, model)},
        {qc_type_name, string, offsetof(struct qc_cec, type_name)},
-        {qc_type_family, integer, offsetof(struct qc_cec, type_family)},
+       {qc_type_family, integer, offsetof(struct qc_cec, type_family)},
        {qc_sequence_code, string, offsetof(struct qc_cec, sequence_code)},
        {qc_lic_identifier, string, offsetof(struct qc_cec, lic_identifier)},
        {qc_plant, string, offsetof(struct qc_cec, plant)},
@@ -371,12 +371,12 @@
        {qc_num_ifl_total, integer, offsetof(struct qc_cec, num_ifl_total)},
        {qc_num_ifl_dedicated, integer, offsetof(struct qc_cec, 
num_ifl_dedicated)},
        {qc_num_ifl_shared, integer, offsetof(struct qc_cec, num_ifl_shared)},
-        {qc_num_ziip_total, integer, offsetof(struct qc_cec, num_ziip_total)},
+       {qc_num_ziip_total, integer, offsetof(struct qc_cec, num_ziip_total)},
        {qc_num_ziip_dedicated, integer, offsetof(struct qc_cec, 
num_ziip_dedicated)},
        {qc_num_ziip_shared, integer, offsetof(struct qc_cec, num_ziip_shared)},
        {qc_num_cp_threads, integer, offsetof(struct qc_cec, num_cp_threads)},
        {qc_num_ifl_threads, integer, offsetof(struct qc_cec, num_ifl_threads)},
-        {qc_num_ziip_threads, integer, offsetof(struct qc_cec, 
num_ziip_threads)},
+       {qc_num_ziip_threads, integer, offsetof(struct qc_cec, 
num_ziip_threads)},
        {qc_capability, floatingpoint, offsetof(struct qc_cec, capability)},
        {qc_secondary_capability, floatingpoint, offsetof(struct qc_cec, 
secondary_capability)},
        {qc_capacity_adjustment_indication, integer, offsetof(struct qc_cec, 
capacity_adjustment_indication)},
@@ -392,7 +392,7 @@
        {qc_layer_name, string, offsetof(struct qc_lpar_group, layer_name)},
        {qc_cp_absolute_capping, integer, offsetof(struct qc_lpar_group, 
cp_absolute_capping)},
        {qc_ifl_absolute_capping, integer, offsetof(struct qc_lpar_group, 
ifl_absolute_capping)},
-        {qc_ziip_absolute_capping, integer, offsetof(struct qc_lpar_group, 
ziip_absolute_capping)},
+       {qc_ziip_absolute_capping, integer, offsetof(struct qc_lpar_group, 
ziip_absolute_capping)},
        {-1, string, -1}
 };
 
@@ -420,18 +420,18 @@
        {qc_num_ifl_total, integer, offsetof(struct qc_lpar, num_ifl_total)},
        {qc_num_ifl_dedicated, integer, offsetof(struct qc_lpar, 
num_ifl_dedicated)},
        {qc_num_ifl_shared, integer, offsetof(struct qc_lpar, num_ifl_shared)},
-        {qc_num_ziip_total, integer, offsetof(struct qc_lpar, num_ziip_total)},
+       {qc_num_ziip_total, integer, offsetof(struct qc_lpar, num_ziip_total)},
        {qc_num_ziip_dedicated, integer, offsetof(struct qc_lpar, 
num_ziip_dedicated)},
        {qc_num_ziip_shared, integer, offsetof(struct qc_lpar, 
num_ziip_shared)},
        {qc_num_cp_threads, integer, offsetof(struct qc_lpar, num_cp_threads)},
        {qc_num_ifl_threads, integer, offsetof(struct qc_lpar, 
num_ifl_threads)},
-        {qc_num_ziip_threads, integer, offsetof(struct qc_lpar, 
num_ziip_threads)},
+       {qc_num_ziip_threads, integer, offsetof(struct qc_lpar, 
num_ziip_threads)},
        {qc_cp_absolute_capping, integer, offsetof(struct qc_lpar, 
cp_absolute_capping)},
        {qc_ifl_absolute_capping, integer, offsetof(struct qc_lpar, 
ifl_absolute_capping)},
-        {qc_ziip_absolute_capping, integer, offsetof(struct qc_lpar, 
ziip_absolute_capping)},
+       {qc_ziip_absolute_capping, integer, offsetof(struct qc_lpar, 
ziip_absolute_capping)},
        {qc_cp_weight_capping, integer, offsetof(struct qc_lpar, 
cp_weight_capping)},
        {qc_ifl_weight_capping, integer, offsetof(struct qc_lpar, 
ifl_weight_capping)},
-        {qc_ziip_weight_capping, integer, offsetof(struct qc_lpar, 
ziip_weight_capping)},
+       {qc_ziip_weight_capping, integer, offsetof(struct qc_lpar, 
ziip_weight_capping)},
        {-1, string, -1}
 };
 
@@ -452,15 +452,15 @@
        {qc_num_cp_total, integer, offsetof(struct qc_zvm_hypervisor, 
num_cp_total)},
        {qc_num_cp_dedicated, integer, offsetof(struct qc_zvm_hypervisor, 
num_cp_dedicated)},
        {qc_num_cp_shared, integer, offsetof(struct qc_zvm_hypervisor, 
num_cp_shared)},
-        {qc_num_ifl_total, integer, offsetof(struct qc_zvm_hypervisor, 
num_ifl_total)},
+       {qc_num_ifl_total, integer, offsetof(struct qc_zvm_hypervisor, 
num_ifl_total)},
        {qc_num_ifl_dedicated, integer, offsetof(struct qc_zvm_hypervisor, 
num_ifl_dedicated)},
        {qc_num_ifl_shared, integer, offsetof(struct qc_zvm_hypervisor, 
num_ifl_shared)},
-        {qc_num_ziip_total, integer, offsetof(struct qc_zvm_hypervisor, 
num_ziip_total)},
+       {qc_num_ziip_total, integer, offsetof(struct qc_zvm_hypervisor, 
num_ziip_total)},
        {qc_num_ziip_dedicated, integer, offsetof(struct qc_zvm_hypervisor, 
num_ziip_dedicated)},
        {qc_num_ziip_shared, integer, offsetof(struct qc_zvm_hypervisor, 
num_ziip_shared)},
        {qc_num_cp_threads, integer, offsetof(struct qc_zvm_hypervisor, 
num_cp_threads)},
-        {qc_num_ifl_threads, integer, offsetof(struct qc_zvm_hypervisor, 
num_ifl_threads)},
-        {qc_num_ziip_threads, integer, offsetof(struct qc_zvm_hypervisor, 
num_ziip_threads)},
+       {qc_num_ifl_threads, integer, offsetof(struct qc_zvm_hypervisor, 
num_ifl_threads)},
+       {qc_num_ziip_threads, integer, offsetof(struct qc_zvm_hypervisor, 
num_ziip_threads)},
        {-1, string, -1}
 };
 
@@ -529,13 +529,13 @@
        {qc_layer_name, string, offsetof(struct qc_zvm_pool, layer_name)},
        {qc_cp_limithard_cap, integer, offsetof(struct qc_zvm_pool, 
cp_limithard_cap)},
        {qc_cp_capacity_cap, integer, offsetof(struct qc_zvm_pool, 
cp_capacity_cap)},
-        {qc_ifl_limithard_cap, integer, offsetof(struct qc_zvm_pool, 
ifl_limithard_cap)},
+       {qc_ifl_limithard_cap, integer, offsetof(struct qc_zvm_pool, 
ifl_limithard_cap)},
        {qc_ifl_capacity_cap, integer, offsetof(struct qc_zvm_pool, 
ifl_capacity_cap)},
-        {qc_ziip_limithard_cap, integer, offsetof(struct qc_zvm_pool, 
ziip_limithard_cap)},
+       {qc_ziip_limithard_cap, integer, offsetof(struct qc_zvm_pool, 
ziip_limithard_cap)},
        {qc_ziip_capacity_cap, integer, offsetof(struct qc_zvm_pool, 
ziip_capacity_cap)},
        {qc_cp_capped_capacity, integer, offsetof(struct qc_zvm_pool, 
cp_capped_capacity)},
        {qc_ifl_capped_capacity, integer, offsetof(struct qc_zvm_pool, 
ifl_capped_capacity)},
-        {qc_ziip_capped_capacity, integer, offsetof(struct qc_zvm_pool, 
ziip_capped_capacity)},
+       {qc_ziip_capped_capacity, integer, offsetof(struct qc_zvm_pool, 
ziip_capped_capacity)},
        {-1, string, -1}
 };
 
@@ -559,7 +559,7 @@
        {qc_num_ifl_total, integer, offsetof(struct qc_zvm_guest, 
num_ifl_total)},
        {qc_num_ifl_dedicated, integer, offsetof(struct qc_zvm_guest, 
num_ifl_dedicated)},
        {qc_num_ifl_shared, integer, offsetof(struct qc_zvm_guest, 
num_ifl_shared)},
-        {qc_num_ziip_total, integer, offsetof(struct qc_zvm_guest, 
num_ziip_total)},
+       {qc_num_ziip_total, integer, offsetof(struct qc_zvm_guest, 
num_ziip_total)},
        {qc_num_ziip_dedicated, integer, offsetof(struct qc_zvm_guest, 
num_ziip_dedicated)},
        {qc_num_ziip_shared, integer, offsetof(struct qc_zvm_guest, 
num_ziip_shared)},
        {qc_mobility_enabled, integer, offsetof(struct qc_zvm_guest, 
mobility_enabled)},
@@ -568,11 +568,11 @@
        {qc_cp_capped_capacity, integer, offsetof(struct qc_zvm_guest, 
cp_capped_capacity)},
        {qc_ifl_dispatch_limithard, integer, offsetof(struct qc_zvm_guest, 
ifl_dispatch_limithard)},
        {qc_ifl_capped_capacity, integer, offsetof(struct qc_zvm_guest, 
ifl_capped_capacity)},
-        {qc_ziip_dispatch_limithard, integer, offsetof(struct qc_zvm_guest, 
ziip_dispatch_limithard)},
+       {qc_ziip_dispatch_limithard, integer, offsetof(struct qc_zvm_guest, 
ziip_dispatch_limithard)},
        {qc_ziip_capped_capacity, integer, offsetof(struct qc_zvm_guest, 
ziip_capped_capacity)},
        {qc_cp_dispatch_type, integer, offsetof(struct qc_zvm_guest, 
cp_dispatch_type)},
-        {qc_ifl_dispatch_type, integer, offsetof(struct qc_zvm_guest, 
ifl_dispatch_type)},
-        {qc_ziip_dispatch_type, integer, offsetof(struct qc_zvm_guest, 
ziip_dispatch_type)},
+       {qc_ifl_dispatch_type, integer, offsetof(struct qc_zvm_guest, 
ifl_dispatch_type)},
+       {qc_ziip_dispatch_type, integer, offsetof(struct qc_zvm_guest, 
ziip_dispatch_type)},
        {-1, string, -1}
 };
 
@@ -593,16 +593,16 @@
        {qc_num_cp_total, integer, offsetof(struct qc_zos_zcx_server, 
num_cp_total)},
        {qc_num_cp_dedicated, integer, offsetof(struct qc_zos_zcx_server, 
num_cp_dedicated)},
        {qc_num_cp_shared, integer, offsetof(struct qc_zos_zcx_server, 
num_cp_shared)},
-        {qc_num_ziip_total, integer, offsetof(struct qc_zos_zcx_server, 
num_ziip_total)},
+       {qc_num_ziip_total, integer, offsetof(struct qc_zos_zcx_server, 
num_ziip_total)},
        {qc_num_ziip_dedicated, integer, offsetof(struct qc_zos_zcx_server, 
num_ziip_dedicated)},
        {qc_num_ziip_shared, integer, offsetof(struct qc_zos_zcx_server, 
num_ziip_shared)},
        {qc_has_multiple_cpu_types, integer, offsetof(struct qc_zos_zcx_server, 
has_multiple_cpu_types)},
        {qc_cp_dispatch_limithard, integer, offsetof(struct qc_zos_zcx_server, 
cp_dispatch_limithard)},
        {qc_cp_capped_capacity, integer, offsetof(struct qc_zos_zcx_server, 
cp_capped_capacity)},
-        {qc_ziip_dispatch_limithard, integer, offsetof(struct 
qc_zos_zcx_server, ziip_dispatch_limithard)},
+       {qc_ziip_dispatch_limithard, integer, offsetof(struct 
qc_zos_zcx_server, ziip_dispatch_limithard)},
        {qc_ziip_capped_capacity, integer, offsetof(struct qc_zos_zcx_server, 
ziip_capped_capacity)},
        {qc_cp_dispatch_type, integer, offsetof(struct qc_zos_zcx_server, 
cp_dispatch_type)},
-        {qc_ziip_dispatch_type, integer, offsetof(struct qc_zos_zcx_server, 
ziip_dispatch_type)},
+       {qc_ziip_dispatch_type, integer, offsetof(struct qc_zos_zcx_server, 
ziip_dispatch_type)},
        {-1, string, -1}
 };
 
@@ -641,7 +641,7 @@
        case qc_manufacturer: return "manufacturer";
        case qc_type: return "type";
        case qc_model_capacity: return "model_capacity";
-        case qc_type_family: return "type_family";
+       case qc_type_family: return "type_family";
        case qc_model: return "model";
        case qc_type_name: return "type_name";
        case qc_sequence_code: return "sequence_code";
@@ -696,17 +696,17 @@
        case qc_num_core_reserved: return "num_core_reserved";
        case qc_num_core_dedicated: return "num_core_dedicated";
        case qc_num_core_shared: return "num_core_shared";
-        case qc_ziip_absolute_capping: return "qc_ziip_absolute_capping";
-        case qc_ziip_capacity_cap: return "qc_ziip_capacity_cap";
-        case qc_ziip_capped_capacity: return "qc_ziip_capped_capacity";
-        case qc_ziip_dispatch_limithard: return "qc_ziip_dispatch_limithard";
-        case qc_ziip_dispatch_type: return "qc_ziip_dispatch_type";
-        case qc_ziip_limithard_cap: return "qc_ziip_limithard_cap";
-        case qc_ziip_weight_capping: return "qc_ziip_weight_capping";
-        case qc_num_ziip_dedicated: return "qc_num_ziip_dedicated";
+       case qc_ziip_absolute_capping: return "qc_ziip_absolute_capping";
+       case qc_ziip_capacity_cap: return "qc_ziip_capacity_cap";
+       case qc_ziip_capped_capacity: return "qc_ziip_capped_capacity";
+       case qc_ziip_dispatch_limithard: return "qc_ziip_dispatch_limithard";
+       case qc_ziip_dispatch_type: return "qc_ziip_dispatch_type";
+       case qc_ziip_limithard_cap: return "qc_ziip_limithard_cap";
+       case qc_ziip_weight_capping: return "qc_ziip_weight_capping";
+       case qc_num_ziip_dedicated: return "qc_num_ziip_dedicated";
        case qc_num_ziip_shared: return "qc_num_ziip_shared";
        case qc_num_ziip_total: return "qc_num_ziip_total";
-        case qc_num_ziip_threads: return "qc_num_ziip_threads";
+       case qc_num_ziip_threads: return "qc_num_ziip_threads";
        default: break;
        }
        qc_debug(hdl, "Error: Cannot convert unknown attribute '%d' to 
char*\n", id);
@@ -769,20 +769,20 @@
                layer_category = "GUEST";
                layer_type = "z/VM-guest";
                break;
-        case QC_LAYER_TYPE_ZOS_HYPERVISOR:
-                layer_sz = sizeof(struct qc_zos_hypervisor);
-                attrs = zos_hv_attrs;
-                layer_category_num = QC_LAYER_CAT_HOST;
-                layer_category = "HOST";
-                layer_type = "z/OS-hypervisor";
-                break;
-        case QC_LAYER_TYPE_ZOS_TENANT_RESOURCE_GROUP:
-                layer_sz = sizeof(struct qc_zos_tenant_resource_group);
-                attrs = zos_tenant_resgroup_attrs;
-                layer_category_num = QC_LAYER_CAT_POOL;
-                layer_category = "POOL";
-                layer_type = "z/OS-tenant-resource-group";
-                break;
+               case QC_LAYER_TYPE_ZOS_HYPERVISOR:
+               layer_sz = sizeof(struct qc_zos_hypervisor);
+               attrs = zos_hv_attrs;
+               layer_category_num = QC_LAYER_CAT_HOST;
+               layer_category = "HOST";
+               layer_type = "z/OS-hypervisor";
+               break;
+               case QC_LAYER_TYPE_ZOS_TENANT_RESOURCE_GROUP:
+               layer_sz = sizeof(struct qc_zos_tenant_resource_group);
+               attrs = zos_tenant_resgroup_attrs;
+               layer_category_num = QC_LAYER_CAT_POOL;
+               layer_category = "POOL";
+               layer_type = "z/OS-tenant-resource-group";
+               break;
        case QC_LAYER_TYPE_KVM_HYPERVISOR:
                layer_sz = sizeof(struct qc_kvm_hypervisor);
                attrs = kvm_hv_attrs;
@@ -797,7 +797,7 @@
                layer_category = "GUEST";
                layer_type =  "KVM-guest";
                break;
-        case QC_LAYER_TYPE_ZOS_ZCX_SERVER:
+       case QC_LAYER_TYPE_ZOS_ZCX_SERVER:
                layer_sz = sizeof(struct qc_zos_zcx_server);
                attrs = zos_zcx_server_attrs;
                layer_category_num = QC_LAYER_CAT_GUEST;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.0.0/query_capacity_sthyi.c 
new/qclib-2.0.1/query_capacity_sthyi.c
--- old/qclib-2.0.0/query_capacity_sthyi.c      2019-11-15 09:00:05.000000000 
+0100
+++ new/qclib-2.0.1/query_capacity_sthyi.c      2020-01-08 22:26:50.000000000 
+0100
@@ -366,7 +366,7 @@
        } else if (guest->infgval1 & infgziipv) {   // *ltype == 
QC_LAYER_TYPE_ZOS_ZCX_SERVER
                if (qc_set_attr_int(gst, qc_cp_capped_capacity, 
htobe32(guest->infgziipcc), ATTR_SRC_STHYI))
                        goto err;
-               if ((guest->infgsziip > 0 /*|| guest->infgdziip > 0*/) &&
+               if ((guest->infgsziip > 0) &&
                    qc_set_attr_int(gst, qc_ziip_dispatch_type, 
guest->infgziipdt, ATTR_SRC_STHYI))
                        goto err;
                if (qc_set_attr_int(gst, qc_ziip_dispatch_limithard, 
(guest->infgflg1 & infgziiph) ? 1 : 0, ATTR_SRC_STHYI))
@@ -386,10 +386,29 @@
        }
 
        total = htobe16(guest->infgscps) + htobe16(guest->infgdcps) + 
htobe16(guest->infgsifl) + htobe16(guest->infgdifl);
-       if (guest->infgval1 & infgziipv)
-               total += htobe16(guest->infgsziip) /*+ 
htobe16(guest->infgdziip)*/;
-       if (qc_set_attr_int(gst, qc_num_cpu_total, total, ATTR_SRC_STHYI))
-               goto err;
+       if (!total && *ltype == QC_LAYER_TYPE_ZOS_ZCX_SERVER) {
+               int oldval = qc_consistency_check_requested;
+               /* WARNING: A zCX Server running on zIIPs exclusively will 
report those zIIPs in /proc/sysinfo, and
+                           qc_num_cpu_total will get set accordingly (and we 
won't know at that point, as /proc/sysinfo
+                           does not report the CPU type).
+                           However, in here we omit the zIIPs, so we would 
replace that value with a different one - in
+                           which case our consistency check will cry foul!
+                           Plus now we know that all values from /proc/sysinfo 
were for zIIPs - so we reset all values now. */
+               qc_debug(gst, "Detected zCX server running on zIIPs 
exclusively\n");
+               qc_consistency_check_requested = 0;
+               qc_debug(gst, "Consistency check disabled, adjusting all values 
from STSI to 0\n");
+               if (qc_set_attr_int(gst, qc_num_cpu_total, 0, ATTR_SRC_STHYI) ||
+                   qc_set_attr_int(gst, qc_num_cpu_configured, 0, 
ATTR_SRC_STHYI) ||
+                   qc_set_attr_int(gst, qc_num_cpu_standby, 0, ATTR_SRC_STHYI) 
||
+                   qc_set_attr_int(gst, qc_num_cpu_reserved, 0, 
ATTR_SRC_STHYI) ||
+                   qc_set_attr_int(gst, qc_num_cpu_dedicated, 0, 
ATTR_SRC_STHYI) ||
+                   qc_set_attr_int(gst, qc_num_cpu_shared, 0, ATTR_SRC_STHYI))
+                       goto err;
+               qc_consistency_check_requested = oldval;
+       } else {
+               if (qc_set_attr_int(gst, qc_num_cpu_total, total, 
ATTR_SRC_STHYI))
+                       goto err;
+       }
 
        /* if pool name is empty then we're done */
        if (qc_is_nonempty_ebcdic((__u64*)guest->infgpnam)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.0.0/query_capacity_sysinfo.c 
new/qclib-2.0.1/query_capacity_sysinfo.c
--- old/qclib-2.0.0/query_capacity_sysinfo.c    2019-11-15 09:00:05.000000000 
+0100
+++ new/qclib-2.0.1/query_capacity_sysinfo.c    2020-01-08 22:26:50.000000000 
+0100
@@ -124,12 +124,12 @@
        qc_debug_indent_inc();
        if (qc_sysinfo_open(hdl, &lsysinfo)) {
                qc_debug(hdl, "Error: Failed to open /proc/sysinfo\n");
-               rc = 1;
+               rc = -1;
                goto out;
        }
        if (strcmp(lsysinfo, sysinfo)) {
-               qc_debug(hdl, "/proc/sysinfo content changed, LGM took 
place\n");
-               rc = 2;
+               qc_debug(hdl, "/proc/sysinfo content changed, LGM took 
place!\n");
+               rc = 1;
                goto out;
        }
        qc_debug(hdl, "/proc/sysinfo still consistent, no LGM detected\n");


Reply via email to