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

No xsd available for AMQ 7.11 (artemis-configuration-7.11.xsd) #71

Closed
RobertFloor opened this issue May 22, 2023 · 7 comments · Fixed by #73 or #74
Closed

No xsd available for AMQ 7.11 (artemis-configuration-7.11.xsd) #71

RobertFloor opened this issue May 22, 2023 · 7 comments · Fixed by #73 or #74
Labels
bugfixes Fixes that resolve issues. SHOULD not be used for minor enhancements

Comments

@RobertFloor
Copy link

SUMMARY

XSD missing for AMQ version 7.11. I am trying to install AMQ version 7.11 but I am missing the latest xsd for this version.

ISSUE TYPE
  • Bug Report
ANSIBLE VERSION
 ansible --version
ansible [core 2.12.2]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.8/site-packages/ansible
  ansible collection location = /home/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.8.13 (default, Jun 14 2022, 17:49:07) [GCC 8.5.0 20210514 (Red Hat 8.5.0-13)]
  jinja version = 2.11.3
  libyaml = True
COLLECTION VERSION
ansible-galaxy collection list

# /.ansible/collections/ansible_collections
Collection                                Version
----------------------------------------- -------
ansible.posix                             1.5.2
community.general                         6.0.1
middleware_automation.amq                 1.3.3
middleware_automation.common              1.1.0
middleware_automation.redhat_csp_download 1.2.2

# /usr/lib/python3.8/site-packages/ansible_collections
Collection                    Version
----------------------------- -------
amazon.aws                    2.1.0
ansible.netcommon             2.5.1
ansible.posix                 1.3.0
ansible.utils                 2.5.0
ansible.windows               1.9.0
arista.eos                    3.1.0
awx.awx                       19.4.0
azure.azcollection            1.11.0
check_point.mgmt              2.2.2
chocolatey.chocolatey         1.2.0
cisco.aci                     2.1.0
cisco.asa                     2.1.0
cisco.intersight              1.0.18
cisco.ios                     2.7.1
cisco.iosxr                   2.7.0
cisco.ise                     1.2.1
cisco.meraki                  2.6.0
cisco.mso                     1.3.0
cisco.nso                     1.0.3
cisco.nxos                    2.9.0
cisco.ucs                     1.6.0
cloud.common                  2.1.0
cloudscale_ch.cloud           2.2.0
community.aws                 2.3.0
community.azure               1.1.0
community.ciscosmb            1.0.4
community.crypto              2.2.2
community.digitalocean        1.15.1
community.dns                 2.0.7
community.docker              2.2.0
community.fortios             1.0.0
community.general             4.5.0
community.google              1.0.0
community.grafana             1.3.2
community.hashi_vault         2.3.0
community.hrobot              1.2.2
community.kubernetes          2.0.1
community.kubevirt            1.0.0
community.libvirt             1.0.2
community.mongodb             1.3.2
community.mysql               2.3.4
community.network             3.0.0
community.okd                 2.1.0
community.postgresql          1.7.0
community.proxysql            1.3.1
community.rabbitmq            1.1.0
community.routeros            2.0.0
community.skydive             1.0.0
community.sops                1.2.0
community.vmware              1.17.1
community.windows             1.9.0
community.zabbix              1.5.1
containers.podman             1.9.1
cyberark.conjur               1.1.0
cyberark.pas                  1.0.13
dellemc.enterprise_sonic      1.1.0
dellemc.openmanage            4.4.0
dellemc.os10                  1.1.1
dellemc.os6                   1.0.7
dellemc.os9                   1.0.4
f5networks.f5_modules         1.14.0
fortinet.fortimanager         2.1.4
fortinet.fortios              2.1.4
frr.frr                       1.0.3
gluster.gluster               1.0.2
google.cloud                  1.0.2
hetzner.hcloud                1.6.0
hpe.nimble                    1.1.4
ibm.qradar                    1.0.3
infinidat.infinibox           1.3.3
infoblox.nios_modules         1.2.1
inspur.sm                     1.3.0
junipernetworks.junos         2.9.0
kubernetes.core               2.2.3
mellanox.onyx                 1.0.0
netapp.aws                    21.7.0
netapp.azure                  21.10.0
netapp.cloudmanager           21.14.0
netapp.elementsw              21
STEPS TO REPRODUCE

Deploy via the default playbook

$ cat AMQ-acc-cluster.yml
all:
  children:
    amq:
      children:
        ha1:
          hosts: 1
          vars:
            artemis: 1
            node0:  2
        ha2:
          hosts: 2
          vars:
            artemis: 2
            node0:  1
      vars:
        activemq_configure_firewalld: True
        activemq_prometheus_enabled: True
        amq_broker_enable: True
        activemq_cors_strict_checking: False
        activemq_disable_hornetq_protocol: true
        activemq_disable_mqtt_protocol: true
        activemq_ha_enabled: true
        activemq_shared_storage: true
        activemq_shared_storage_path: /amq_nfs
        ansible_user: 
        activemq_offline_install: True
        activemq_version: 7.11.0
        activemq_dest: /opt/amq
        activemq_archive: "amq-broker-{{ activemq_version }}-bin.zip"
        activemq_installdir: "{{ activemq_dest }}/amq-broker-{{ activemq_version }}"
        activemq_shared_storage_mounted: true
        activemq_port: 61616
        activemq_instance_username: amq-admin
        activemq_sa_password: "amq-sa-password"
        activemq_testers_password: "amq-testers-password"
       
EXPECTED RESULTS

Ansible should install AMQ 7.11.

ACTUAL RESULTS

Ansible playbook did not install successfully. It is missing the artemis-configuration-7.11.xsd.

TASK [middleware_automation.amq.activemq : Make collection xsd available for validation] ***********************************************************************************************************************************************************************************************************************************************
task path: .ansible/collections/ansible_collections/middleware_automation/amq/roles/activemq/tasks/prereqs.yml:68
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: If you are using a module and expect the file to exist on the remote, see the remote_src option
fatal: [1] -> localhost]: FAILED! => changed=false
  msg: |-
    Could not find or access 'artemis-configuration-7.11.xsd'
    Searched in:
            /.ansible/collections/ansible_collections/middleware_automation/amq/roles/activemq/files/artemis-configuration-7.11.xsd
           /.ansible/collections/ansible_collections/middleware_automation/amq/roles/activemq/artemis-configuration-7.11.xsd
           /.ansible/collections/ansible_collections/middleware_automation/amq/roles/activemq/tasks/files/artemis-configuration-7.11.xsd
            /.ansible/collections/ansible_collections/middleware_automation/amq/roles/activemq/tasks/artemis-configuration-7.11.xsd
            /code/ansible-configuration/playbooks/files/artemis-configuration-7.11.xsd
           /code/ansible-configuration/playbooks/artemis-configuration-7.11.xsd on the Ansible Controller.
    If you are using a module and expect the file to exist on the remote, see the remote_src option

TASK [middleware_automation.amq.activemq : Fetch artemis configuration xsd schema for requested version] *******************************************************************************************************************************************************************************************************************************
task path: /.ansible/collections/ansible_collections/middleware_automation/amq/roles/activemq/tasks/prereqs.yml:85
failed: [ -> localhost] (item=https://github.com/apache/activemq-artemis/raw/7.11.0/artemis-server/src/main/resources/schema/artemis-configuration.xsd) => changed=false
  ansible_loop_var: item
  dest: /code/ansible-configuration/
  elapsed: 10
  gid: 627600513
  item: https://github.com/apache/activemq-artemis/raw/7.11.0/artemis-server/src/main/resources/schema/artemis-configuration.xsd
  mode: '0755'
  msg: 'Request failed: <urlopen error timed out>'
  secontext: unconfined_u:object_r:user_home_t:s0
  size: 4096
  state: directory
  uid: 627615280
  url: https://github.com/apache/activemq-artemis/raw/7.11.0/artemis-server/src/main/resources/schema/artemis-configuration.xsd
failed:  -> localhost] (item=https://www.w3.org/2001/03/xml.xsd) => changed=false
  ansible_loop_var: item
  dest: l/code/ansible-configuration/
  elapsed: 20
  gid: 627600513
  item: https://www.w3.org/2001/03/xml.xsd
  mode: '0755'
  msg: 'Request failed: <urlopen error [Errno 101] Network is unreachable>'
  secontext: unconfined_u:object_r:user_home_t:s0
  size: 4096
  state: directory
  uid: 627615280
  url: https://www.w3.org/2001/03/xml.xsd
@guidograzioli
Copy link
Member

guidograzioli commented May 22, 2023

Hello Robert, unfortunately that file is found only on the automation hub release of redhat.amq_broker [1]

Question: why not using the certified collection if you install rh amq_broker instead of the community one?

[1] 5800569

Anyway, I think i can do a release on galaxy for this

@RobertFloor
Copy link
Author

Hi thanks for the response, sorry I don't understand what you mean with: Question: why not using the certified collection if you install rh amq_broker instead of the community one?

kind regards,

Robert

@RobertFloor
Copy link
Author

RobertFloor commented May 22, 2023

I installed the latest collection build it from the repo. With version 1.3.4 of the collection I have the xsd but I got another problem. This setup is working correctly with AMQ 7.10.2 but gives a problem with 7.11.0. I switched using our dev hostfile since it is easier to share. The hostfile and logs are attached.
log7102.txt
log711.txt

AMQ-dev-cluster.txt (changed from yaml to text)
In version 7.11 the binary is not extracted and I cannot start the artemis command, while this si working in version 7.10.2
This is the run command: ansible-playbook -e "activemq_version=7.11.0" -i hostfiles/AMQ-dev-cluster.yml playbooks/mount-nfs-install-broker-dev.yml -vv

TASK [middleware_automation.amq.activemq : Create instance amq-broker of activemq] ***
task path: /home/robert/.ansible/collections/ansible_collections/middleware_automation/amq/roles/activemq/tasks/systemd.yml:47
fatal: [amq1]: FAILED! => changed=false 
  cmd: /opt/amq/amq-broker-7.11.0/bin/artemis create /opt/amq/amq-broker --name amq-broker --clustered --cluster-user amq-cluster-user --cluster-password amq-cluster-pass --max-hops 1 --message-load-balancing ON_DEMAND --failover-on-shutdown --staticCluster tcp://10.0.2.15:61616,tcp://10.0.2.15:61616 --require-login --user amq-admin --password '********' --host localhost --http-host 0.0.0.0 --http-port 8161 --no-autocreate --queues queue.in,queue.out --shared-store --data /data/amq-broker/shared/mount --no-hornetq-acceptor --no-mqtt-acceptor
  msg: '[Errno 2] No such file or directory: b''/opt/amq/amq-broker-7.11.0/bin/artemis'': b''/opt/amq/amq-broker-7.11.0/bin/artemis'''
  rc: 2
  stderr: ''
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>
fatal: [amq2]: FAILED! => changed=false 
  cmd: /opt/amq/amq-broker-7.11.0/bin/artemis create /opt/amq/amq-broker --name amq-broker --clustered --cluster-user amq-cluster-user --cluster-password amq-cluster-pass --max-hops 1 --message-load-balancing ON_DEMAND --failover-on-shutdown --staticCluster tcp://10.0.2.15:61616,tcp://10.0.2.15:61616 --require-login --user amq-admin --password '********' --host localhost --http-host 0.0.0.0 --http-port 8161 --no-autocreate --queues queue.in,queue.out --shared-store --data /data/amq-broker/shared/mount --no-hornetq-acceptor --no-mqtt-acceptor
  msg: '[Errno 2] No such file or directory: b''/opt/amq/amq-broker-7.11.0/bin/artemis'': b''/opt/amq/amq-broker-7.11.0/bin/artemis'''
  rc: 2
  stderr: ''
  stderr_lines: <omitted>
  stdout: ''

stdout_lines:

@RobertFloor
Copy link
Author

RobertFloor commented May 22, 2023

Update I believe the zip file
Capture
is not correct, but I downloaded from here: https://access.redhat.com/jbossnetwork/restricted/softwareDetail.html?softwareId=105230&product=jboss.amq.broker&version=7.11.0&downloadType=distributions so I believe there is a problem with the creation of that zip file. It is an official Red Hat Source so perhaps you can inform your colleagues?

See for
Capture7103
comparison the zip of 7.10.3

@guidograzioli
Copy link
Member

This is definitely a bug, I already have the PR open for it #73

@guidograzioli
Copy link
Member

guidograzioli commented May 22, 2023

Hi thanks for the response, sorry I don't understand what you mean with: Question: why not using the certified collection if you install rh amq_broker instead of the community one?

So basically this repository contains the community collection supposedly able to install activemq, and eventually RH amq_broker: that's middleware_automation.amq and is deployed to ansible galaxy. A 'downstream' collection is generated from the same codebase, targeting all defaults to RH amq_broker: that is called redhat.amq_broker, it's in technical preview (partially supported for runtimes subscribers), and is deployed on Ansible Automation Hub.

@guidograzioli guidograzioli added the bugfixes Fixes that resolve issues. SHOULD not be used for minor enhancements label May 22, 2023
@RobertFloor
Copy link
Author

RobertFloor commented May 22, 2023

According to Red Hat Support (case 03518485)

The zip file now contains a different content

------------------
When you extract the AMQ Broker archive on Red Hat Enterprise Linux, the contents of the archive are extracted to a directory called apache-artemis-2.28.0.redhat-00003 in your current directory.
------------------

(1) https://access.redhat.com/documentation/en-us/red_hat_amq_broker/7.11/html-single/release_notes_for_red_hat_amq_broker_7.11/index#enhancements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfixes Fixes that resolve issues. SHOULD not be used for minor enhancements
Projects
None yet
2 participants