ibm-mas / ansible-devops

Ansible collection supporting devops for IBM Maximo Application Suite
https://ibm-mas.github.io/ansible-devops/
Eclipse Public License 2.0
49 stars 89 forks source link

The server bundle settings were not updated after applying the pod template. #1498

Open isarere opened 1 month ago

isarere commented 1 month ago

Collection version

23.0.1

Environment information

ansible [core 2.16.7]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.10/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.14 (main, Mar 25 2024, 22:19:19) [GCC 12.2.1 20220924] (/usr/local/bin/python)
  jinja version = 3.1.4
  libyaml = True
Python 3.10.14
Package                           Version
--------------------------------- -----------
adal                              1.2.7
ansible                           9.6.0
ansible-core                      2.16.7
applicationinsights               0.11.10
argcomplete                       1.12.3
azure-cli-core                    2.34.0
azure-cli-telemetry               1.0.6
azure-common                      1.1.11
azure-containerregistry           1.1.0
azure-core                        1.28.0
azure-graphrbac                   0.61.1
azure-identity                    1.7.0
azure-iot-hub                     2.6.1
azure-keyvault                    4.2.0
azure-keyvault-certificates       4.7.0
azure-keyvault-keys               4.8.0
azure-keyvault-secrets            4.7.0
azure-mgmt-apimanagement          3.0.0
azure-mgmt-authorization          2.0.0
azure-mgmt-automation             1.0.0
azure-mgmt-batch                  16.2.0
azure-mgmt-cdn                    11.0.0
azure-mgmt-compute                26.1.0
azure-mgmt-containerinstance      9.0.0
azure-mgmt-containerregistry      9.1.0
azure-mgmt-containerservice       20.0.0
azure-mgmt-core                   1.3.0
azure-mgmt-cosmosdb               6.4.0
azure-mgmt-datafactory            2.0.0
azure-mgmt-datalake-store         1.0.0
azure-mgmt-devtestlabs            9.0.0
azure-mgmt-dns                    8.0.0
azure-mgmt-eventhub               10.1.0
azure-mgmt-hdinsight              9.0.0
azure-mgmt-iothub                 2.2.0
azure-mgmt-keyvault               10.0.0
azure-mgmt-loganalytics           12.0.0
azure-mgmt-managedservices        6.0.0
azure-mgmt-managementgroups       1.0.0
azure-mgmt-marketplaceordering    1.1.0
azure-mgmt-monitor                3.0.0
azure-mgmt-network                19.1.0
azure-mgmt-notificationhubs       7.0.0
azure-mgmt-nspkg                  2.0.0
azure-mgmt-privatedns             1.0.0
azure-mgmt-rdbms                  10.0.0
azure-mgmt-recoveryservices       2.0.0
azure-mgmt-recoveryservicesbackup 3.0.0
azure-mgmt-redis                  13.0.0
azure-mgmt-resource               21.1.0
azure-mgmt-search                 8.0.0
azure-mgmt-servicebus             7.1.0
azure-mgmt-sql                    3.0.1
azure-mgmt-storage                19.0.0
azure-mgmt-trafficmanager         1.0.0b1
azure-mgmt-web                    6.1.0
azure-nspkg                       2.0.0
azure-storage-blob                12.11.0
backports.tarfile                 1.2.0
bcrypt                            4.1.3
beautifulsoup4                    4.12.3
boto3                             1.34.116
botocore                          1.34.116
bs4                               0.0.2
certifi                           2024.2.2
cffi                              1.16.0
charset-normalizer                3.3.2
cryptography                      36.0.2
datadog                           0.49.1
dnspython                         2.6.1
humanfriendly                     10.0
hvac                              2.2.0
idna                              3.7
importlib_metadata                7.1.0
isodate                           0.6.1
jaraco.classes                    3.4.0
jaraco.context                    5.3.0
jaraco.functools                  4.0.1
jeepney                           0.8.0
Jinja2                            3.1.4
jmespath                          1.0.1
keyring                           25.2.1
kubernetes                        12.0.1
knack                             0.9.0
lxml                              5.2.2
MarkupSafe                        2.1.5
more-itertools                    10.2.0
msal                              1.23.0
msal-extensions                   0.3.1
msrest                            0.7.1
msrestazure                       0.6.4
oauthlib                          3.2.2
openshift                         0.12.1
packaging                         21.3
paramiko                          2.12.0
pip                               24.0
pkginfo                           1.10.0
portalocker                       1.7.1
psutil                            5.9.8
psycopg2                          2.9.9
pyasn1                            0.6.0
pycparser                         2.22
pycrypto                          2.6.1
Pygments                          2.18.0
PyJWT                             2.8.0
pymssql                           2.3.0
PyNaCl                            1.5.0
pyOpenSSL                         22.0.0
pyparsing                         3.1.2
PySocks                           1.7.1
pyspnego                          0.10.2
python-dateutil                   2.9.0.post0
pywinrm                           0.4.3
PyYAML                            6.0.1
requests                          2.32.3
requests-credssp                  1.3.1
requests-ntlm                     1.2.0
requests-oauthlib                 2.0.0
resolvelib                        1.0.1
s3transfer                        0.10.1
SecretStorage                     3.3.3
setuptools                        65.5.1
six                               1.16.0
soupsieve                         2.5
tabulate                          0.9.0
typing_extensions                 4.12.0
uamqp                             1.6.9
urllib3                           2.2.1
wheel                             0.43.0
xmltodict                         0.13.0
zipp                              3.19.0

What happened?

Hello We are using a pod template to adjust the replica count and resource limitations through the suite_app_config role. Apparently, the pod template was applied without any issues. The ReplicaSet was updated accordingly, and the pod count matches our pod template definition. Unfortunately, the replica count wasn't reflected in the MAS Core admin console (number of bundle stays unchanged). From the manageworkspace YAML, we can see that the spec.podTemplates was configured the same as the file provided from our pod template directory, but the spec.settings.deployment.serverBundles.replica wasn't updated accordingly.

Could you please check wether this is an issue in your code? Thanks

Relevant log output

apiVersion: apps.mas.ibm.com/v1
kind: ManageWorkspace
metadata:
  resourceVersion: '308926825'
  name: dev2-mas
  uid: 2b5ed2fd-72aa-42e7-9522-3f26aa11236d
  creationTimestamp: '2024-10-01T16:01:44Z'
  generation: 2
  namespace: mas-dev2-manage
  finalizers:
    - manageworkspace.apps.mas.ibm.com/finalizer
  labels:
    mas.ibm.com/applicationId: manage
    mas.ibm.com/instanceId: dev2
    mas.ibm.com/workspaceId: mas
spec:
  bindings:
    jdbc: workspace-application
  components:
    aviation:
      version: 9.0.8
    base:
      version: 9.0.53
    transportation:
      version: 9.0.1
  podTemplates:
    - containers:
        - name: all
          resources:
            limits:
              cpu: 6
              memory: 10Gi
            requests:
              cpu: 0.5
              memory: 2Gi
        - name: monitoragent
          resources:
            limits:
              cpu: 1
              memory: 512Mi
            requests:
              cpu: 0.1
              memory: 256Mi
      name: all
      replicas: 2
    - containers:
        - name: jms
          resources:
            limits:
              cpu: 6
              memory: 10Gi
            requests:
              cpu: 500m
              memory: 2Gi
      name: jms
  settings:
    aio:
      install: true
    customizationList: []
    db:
      dbSchema: maximodev02
      maxinst:
        bypassUpgradeVersionCheck: false
        db2Vargraphic: true
        demodata: false
        indexSpace: MAXINDEXDEV2
        tableSpace: MAXDATADEV2
    deployment:
      buildTag: latest
      defaultJMS: true
      mode: up
      persistentVolumes:
        - accessModes:
            - ReadWriteMany
          mountPath: /DOCLINKS
          pvcName: manage-doclinks
          size: 20Gi
          storageClassName: efs
        - accessModes:
            - ReadWriteMany
          mountPath: /bim
          pvcName: manage-bim
          size: 20Gi
          storageClassName: efs
        - accessModes:
            - ReadWriteMany
          mountPath: /jms
          pvcName: manage-jms
          size: 20Gi
          storageClassName: efs
      serverBundles:
        - isUserSyncTarget: true
          name: all
          additionalServerConfig:
            secretName: mas-manage-d--sb0--asc--sn
          bundleLevelProperties: |-
            mxe.doclink.doctypes.topLevelPaths=/DOCLINKS
            mxe.doclink.doctypes.defpath=/DOCLINKS/default
            mxe.doclink.path01=/DOCLINKS=https://xxxxx/maximo/oslc/doclinks
            mxe.doclink.securedAttachment=true
            mxe.report.AttachDoc.validateURL=0
            mxe.attachmentstorage=null
          isDefault: true
          replica: 1
          routeSubDomain: all
          bundleType: all
          isMobileTarget: true
        - isUserSyncTarget: false
          name: jms
          additionalServerConfig:
            secretName: mas-manage-d--sb1--asc--sn
          bundleLevelProperties: |-
            mxe.doclink.doctypes.topLevelPaths=/DOCLINKS
            mxe.doclink.doctypes.defpath=/DOCLINKS/default
            mxe.doclink.path01=/DOCLINKS=https://xxxxx/maximo/oslc/doclinks
            mxe.doclink.securedAttachment=true
            mxe.report.AttachDoc.validateURL=0
            mxe.attachmentstorage=null
          isDefault: false
          replica: 1
          routeSubDomain: jms
          bundleType: standalonejms
          isMobileTarget: false
      serverTimezone: GMT
    languages:
      baseLang: EN
      secondaryLangs:
        - FR
isarere commented 2 weeks ago

Hello there, Any update on this issue :-) ? Thanks for your support!

Best regards