Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with Manage attachments (suite_manage_attachments_config role) #1437

Open
SalaryTheft opened this issue Aug 28, 2024 · 2 comments
Open
Labels
Bug Report Something isn't working

Comments

@SalaryTheft
Copy link

SalaryTheft commented Aug 28, 2024

Collection version

18.17.2

Environment information

Python 3.12.1
Ansible 2.12

What happened?

A few months ago, I deployed Maximo Manage 8.7.6 in a customer environment and set up attachments(doclinks) using suite_manage_attachments_config role with MAS_MANAGE_ATTACHMENT_CONFIGURATION_MODE set to cr.

I recently discovered that attchements are not working and getting following error in the server log:

28 Aug 2024 00:54:55:091 [ERROR] [MXServer] [CID-MXOSLC-20321] null
java.lang.ClassNotFoundException: null
	at java.lang.Class.forNameImpl(Native Method) ~[?:?]
	at java.lang.Class.forName(Class.java:347) ~[?:?]
	at com.ibm.tivoli.maximo.oslc.provider.AttachmentStorage.getInstance(AttachmentStorage.java:69) [businessobjects.jar:?]

In ManageWorkspace CR, mxe.attachmentstorage is set to literal string null in server bundle properties.

spec:
    deployment:
      serverBundles:
        - bundleLevelProperties: |-
            mxe.doclink.doctypes.topLevelPaths=/DOCLINKS
            mxe.doclink.doctypes.defpath=/DOCLINKS/default
            mxe.doclink.path01=/DOCLINKS=https://dev.manage.ocp.company.com/maximo/oslc/doclinks
            mxe.doclink.securedAttachment=true
            mxe.report.AttachDoc.validateURL=0
            mxe.attachmentstorage=null

I believe it is defined at following function and havent changed from the version I've used for deployment. (18.17.2)

def setManageFsDoclinksProperties(data, manage_url):

@SalaryTheft SalaryTheft added the Bug Report Something isn't working label Aug 28, 2024
@faangbait
Copy link
Contributor

I suspect you're missing some variables. Here's how we do it:

    - name: Configure Manage Attachment Storage
      include_role: 
        name: ibm.mas_devops.suite_manage_attachments_config
      vars:
        mas_instance_id: "max"
        mas_workspace_id: "{{ workspace_id | default('masdev') | lower }}"
        mas_manage_attachments_provider: aws
        mas_manage_attachment_configuration_mode: cr
        aws_bucket_name: "{{ cluster_name }}-{{ workspace_id | default('masdev') | lower }}-attachments"
        aws_region: us-east-2
        aws_access_point_region: us-east-2

@SalaryTheft
Copy link
Author

I suspect you're missing some variables. Here's how we do it:

    - name: Configure Manage Attachment Storage
      include_role: 
        name: ibm.mas_devops.suite_manage_attachments_config
      vars:
        mas_instance_id: "max"
        mas_workspace_id: "{{ workspace_id | default('masdev') | lower }}"
        mas_manage_attachments_provider: aws
        mas_manage_attachment_configuration_mode: cr
        aws_bucket_name: "{{ cluster_name }}-{{ workspace_id | default('masdev') | lower }}-attachments"
        aws_region: us-east-2
        aws_access_point_region: us-east-2

In the Python script mentioned above, object storage uses different properties compared to the file storage. mxe.attachmentstorage=null is hard coded in the script and Maximo Manage tries to use the class named null.

Removing mxe.attachmentstorage=null from ManageWorkspace CR solves the issue.

Below are the commands I've used to configure the attachments.

export MAS_INSTANCE_ID=masinst1
export MAS_WORKSPACE_ID=dev
export MAS_MANAGE_ATTACHMENT_CONFIGURATION_MODE=cr
export MAS_MANAGE_ATTACHMENTS_PROVIDER=filestorage

ansible localhost -m include_role -a name=ibm.mas_devops.suite_manage_attachments_config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants