Skip to content

Commit

Permalink
Skip adding entry filter package if the DS LS release is not "core". …
Browse files Browse the repository at this point in the history
…"Base" and "all" versions of releases already include the entry filter package
  • Loading branch information
yabinmeng committed Sep 22, 2022
1 parent 3ba4bd2 commit 1b4c56f
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
9 changes: 8 additions & 1 deletion 02.deploy_pulsarCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
# - "keep_newer_files: yes" means not to overwrite existing Pulsar files
- { role: pulsar/common/pulsar_instBinary, keep_newer_files: yes, when: deploy_status=="add" }


##
# This step is not needed when DS LS release option is base or all.
# - pulsarLS_bin_opt: "" or "all"
# This step is needed when DS LS release option is core
# - pulsarLS_bin_opt: "core"
- hosts: broker
any_errors_fatal: true
become: "{{ sudo_needed }}"
Expand All @@ -45,7 +51,8 @@
- name: Copy the nar file needed for broker side message filtering
include_role:
name: pulsar/broker/_deploy_msg_filter_package
when: deploy_status=="add" and enable_srvside_msg_filtering|bool
when: deploy_status=="add" and enable_srvside_msg_filtering|bool and
pulsarLS_bin_opt=="core"


#########################
Expand Down
4 changes: 1 addition & 3 deletions group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ install_jdk: false
openjdk_ver: 11

# - DataStax LunaStreaming release
# pulsarLS_ver_main: "2.8.3"
# pulsarLS_ver_secondary: "1.0.14"
pulsarLS_ver_main: "2.10"
pulsarLS_ver_secondary: "1.5"
pulsarLS_ver_secondary: "1.7"
pulsarLS_ver_signifant: "{{ pulsarLS_ver_main.split('.')[0] }}.{{ pulsarLS_ver_main.split('.')[1] }}"
pulsarLS_ver: "{{ pulsarLS_ver_main }}.{{ pulsarLS_ver_secondary }}"
# valid luna streaming binary options: "core" (Pulsar core), "" (base), "all (including all packages, I/O conenctors and message filters)"
Expand Down
2 changes: 1 addition & 1 deletion group_vars/broker/all
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ enable_transaction: true
enable_srvside_msg_filtering: true
tgt_msg_filter_package_dir: "{{ tgt_pulsar_inst_dir }}/filters"

msg_filter_package_version: 2.4.3
msg_filter_package_version: 2.4.11
msg_filter_package_name: "pulsar-jms-{{ msg_filter_package_version }}-nar.nar"

msg_filter_pkg_download_url_base: "https://github.com/datastax/pulsar-jms/releases/download"
Expand Down
3 changes: 1 addition & 2 deletions roles/pulsar/common/pulsar_chkCurVer/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
- name: Check the existing Pulsar version
shell: |
{% if sudo_needed|bool %}sudo -u {{ pulsar_user }} {% endif %}{{ tgt_pulsar_inst_dir }}/bin/pulsar version
shell: "{% if sudo_needed|bool %}sudo -u {{ pulsar_user }} {% endif %}{{ common_jvm_settings|trim|replace('\n',' ') }} {{ tgt_pulsar_inst_dir }}/bin/pulsar version"
register: pulsar_ver_output

- name: Set existing Pulsar version in a variable
Expand Down
8 changes: 8 additions & 0 deletions roles/pulsar/common/pulsar_resetBinaryNoData/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
---
- name: Make sure Pulsar binary files (including subfolders) are under the correct ownership
file:
path: "{{ tgt_pulsar_inst_dir }}"
state: directory
owner: "{{ pulsar_user }}"
group: "{{ pulsar_user_group }}"
recurse: yes

- name: Delete all Pulsar binary files (including subfolders), but excluding data subdirectory if so
shell: |
cd {{ tgt_pulsar_inst_dir }}
Expand Down
2 changes: 1 addition & 1 deletion update_pulsarCluster_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
(update_component is not defined or update_component==srv_component) }
# Copy the nar file needed for broker side message filtering
- { role: pulsar/broker/_deploy_msg_filter_package,
when: enable_srvside_msg_filtering|bool and
when: enable_srvside_msg_filtering|bool and pulsarLS_bin_opt=="core" and
(update_component is not defined or update_component==srv_component) }
# Set up the configuration files of the target Pulsar version
- { role: pulsar/broker/brkr_config,
Expand Down

0 comments on commit 1b4c56f

Please sign in to comment.