diff --git a/VERSIONS b/VERSIONS index 289db65fc..908086ed0 100644 --- a/VERSIONS +++ b/VERSIONS @@ -68,10 +68,10 @@ REPO_VER="1.0-25" PS_INN_LTS_VER="9.2.0-1" PS_INN_LTS_REV="f02c4125" PS_INN_LTS_REPO="ps-9x-innovation" -PXB_INN_LTS_VER="8.3.0-1" +PXB_INN_LTS_VER="9.1.0" PXB_INN_LTS_REV="fcee26ff" PXB_INN_LTS_REPO="pxb-8x-innovation" -PXB_INN_LTS_MAJ_VER="8.3.0" +PXB_INN_LTS_MAJ_VER="9.1.0" PXB_INN_LTS_PKG_VER="1" PXC_INN_LTS_VER="9.2.0-1" PXC_INN_LTS_INNODB="1" diff --git a/molecule/pxb-9x-testing/molecule/ubuntu-jammy/molecule.yml b/molecule/pxb-9x-testing/molecule/ubuntu-jammy/molecule.yml new file mode 100644 index 000000000..1689517d0 --- /dev/null +++ b/molecule/pxb-9x-testing/molecule/ubuntu-jammy/molecule.yml @@ -0,0 +1,38 @@ +--- +dependency: + name: galaxy +driver: + name: ec2 +platforms: + - name: ujammy-${BUILD_NUMBER}-${JOB_NAME}-${PLAYBOOK_VAR} + region: us-west-2 + image: ami-0ee8244746ec5d6d4 + vpc_subnet_id: subnet-03136d8c244f56036 + instance_type: t2.medium + ssh_user: ubuntu + root_device_name: /dev/sda1 + instance_tags: + iit-billing-tag: pxb-9x-testing + job-name: ${JOB_NAME} +provisioner: + name: ansible + log: True + playbooks: + create: ../../playbooks/create_noble.yml +# destroy: ../../playbooks/destroy_noble.yml + prepare: ../../playbooks/prepare.yml + cleanup: ../../playbooks/cleanup.yml + converge: ../../../../playbooks/pxb_9x.yml +scenario: + name: ubuntu-jammy +# destroy_sequence: + # - destroy + cleanup_sequence: + - cleanup + test_sequence: + # - destroy + - create + - prepare + - converge + - cleanup + # - destroy \ No newline at end of file diff --git a/molecule/pxb-9x-testing/playbooks/cleanup.yml b/molecule/pxb-9x-testing/playbooks/cleanup.yml new file mode 100644 index 000000000..8ecae8fc5 --- /dev/null +++ b/molecule/pxb-9x-testing/playbooks/cleanup.yml @@ -0,0 +1,102 @@ +--- +- name: Cleanup + hosts: all + become: true + become_method: sudo + vars: + WORKSPACE_VAR: "{{ lookup('env', 'WORKSPACE_VAR') }}" + tasks: + - name: PRINT WORKSPACE_VAR + debug: + msg: "WORKSPACE_VAR: {{ WORKSPACE_VAR }}" + + - name: Check if mysqld.log exists + stat: + path: /var/log/mysqld.log + register: mysqld_log + + - name: Check if mysql error log exists + stat: + path: /var/log/mysql/error.log + register: mysql_error_log + + - name: Create a temporary directory for zipping logs + file: + path: /var/tmp/mysql_logs + state: directory + mode: '0755' + when: + - mysqld_log.stat.exists or mysql_error_log.stat.exists + + - name: Copy mysqld.log to temporary directory if it exists + shell: cp /var/log/mysqld.log /var/tmp/mysql_logs/mysqld.log + when: mysqld_log.stat.exists + + - name: Copy mysql error log to temporary directory if it exists + shell: cp /var/log/mysql/error.log /var/tmp/mysql_logs/error.log + when: mysql_error_log.stat.exists + + - name: Zip the log files if any exist + archive: + path: /var/tmp/mysql_logs + dest: /var/tmp/mysql_logs.zip + format: zip + when: + - mysqld_log.stat.exists or mysql_error_log.stat.exists +## + + - name: Get the arch value from /etc/os-release + shell: uname -m + register: arch_output + + - name: Replace spaces with dashes in arch_output + set_fact: + arch_output: "{{ arch_output.stdout | trim }}" + +## + - name: Get the PRETTY_NAME value from /etc/os-release + shell: | + grep '^PRETTY_NAME=' /etc/os-release | cut -d'=' -f2 | tr -d '"' + register: pretty_name_output + + - name: Replace spaces with dashes in PRETTY_NAME + set_fact: + os_id: "{{ pretty_name_output.stdout | replace(' ', '-') | trim }}" + + - name: Debug the arch_output + debug: + msg: "The arch_output is {{ arch_output }}" + + - name: Debug the OS ID + debug: + msg: "The OS ID is {{ os_id }}" + + - name: Fetch the logs archive on localhost + fetch: + src: /var/tmp/mysql_logs.zip + dest: "/{{ WORKSPACE_VAR }}/{{ ansible_hostname }}_{{ os_id }}_{{ arch_output }}_mysql_logs.zip" + flat: yes + become: true + + - name: Debug the fetch task status on localhost + command: ls -l "/{{ WORKSPACE_VAR }}" + register: fetch_list + delegate_to: localhost + + - name: Debug the list of files in /{{ WORKSPACE_VAR }} on localhost + debug: + msg: "Files in /{{ WORKSPACE_VAR }}: {{ fetch_list.stdout_lines }}" + delegate_to: localhost + + - name: remove Tarball directories + file: + path: "{{ paths }}" + state: absent + vars: + paths: + - /tmp/percona-server-{{ lookup('env', 'PS_VERSION') }}.tar.gz + - /tmp/percona-server-{{ lookup('env', 'PS_VERSION') }}-minimal.tar.gz + - /tmp/percona-server-{{ lookup('env', 'PS_VERSION') }}-debug.tar.gz + - /usr/percona-server + - /tmp/percona-server-minimal + - /tmp/percona-server-debug diff --git a/molecule/pxb-9x-testing/playbooks/create.yml b/molecule/pxb-9x-testing/playbooks/create.yml new file mode 100644 index 000000000..84b4239b0 --- /dev/null +++ b/molecule/pxb-9x-testing/playbooks/create.yml @@ -0,0 +1,339 @@ +--- +- name: Create + hosts: localhost + connection: local + gather_facts: false + no_log: "{{ not (lookup('env', 'MOLECULE_DEBUG') | bool or molecule_yml.provisioner.log|default(false) | bool) }}" + vars: + ssh_user: ubuntu + ssh_port: 22 + default_region: "{{ lookup('env', 'AWS_DEFAULT_REGION') | default('us-east-1', true) }}" + security_group_name_prefix: molecule-pxc-package-testing + security_group_description: Testing PXC package testing with Molecule + keypair_name: "molecule-pkg-tests" + keypair_path: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}/ssh_key" + + tasks: + - name: Check subnet + ec2_vpc_subnet_info: + region: "{{ item.region|default(default_region) }}" + filters: + subnet-id: "{{ item.vpc_subnet_id }}" + with_items: "{{ molecule_yml.platforms }}" + register: subnet_facts + + - name: Populate subnet vpc + set_fact: + subnet_dict: "{{ subnet_dict|default({}) | combine({ item.subnets[0].id: item.subnets[0].vpc_id }) }}" + with_items: "{{ subnet_facts.results }}" + + - name: Create security group + ec2_group: + name: "{{ security_group_name_prefix }}-{{ subnet_dict[item.vpc_subnet_id] }}" + description: "{{ security_group_description }}" + rules: + - proto: tcp + from_port: "{{ ssh_port }}" + to_port: "{{ ssh_port }}" + cidr_ip: '0.0.0.0/0' + - proto: icmp + from_port: 8 + to_port: -1 + cidr_ip: '0.0.0.0/0' + - proto: -1 + from_port: -1 + to_port: -1 + group_name: "{{ security_group_name_prefix }}-{{ subnet_dict[item.vpc_subnet_id] }}" + rules_egress: + - proto: -1 + from_port: 0 + to_port: 0 + cidr_ip: '0.0.0.0/0' + vpc_id: "{{ subnet_dict[item.vpc_subnet_id] }}" + region: "{{ item.region|default(default_region) }}" + state: present + with_items: "{{ molecule_yml.platforms }}" + + - name: Setup keypair for molecule ec2 + copy: + dest: "{{ keypair_path }}-{{ item.region|default(default_region) }}" + src: "{{ lookup('env', 'MOLECULE_AWS_PRIVATE_KEY') }}" + mode: 0600 + no_log: True + with_items: "{{ molecule_yml.platforms }}" + + - name: Create spot instance or on-demand is spot is not avalable + block: + - name: Create molecule instance(s) + ec2: + key_name: "{{ keypair_name }}" + image: "{{ item.image }}" + instance_type: "{{ item.instance_type }}" + vpc_subnet_id: "{{ item.vpc_subnet_id }}" + group: "{{ security_group_name_prefix }}-{{ subnet_dict[item.vpc_subnet_id] }}" + instance_tags: "{{ + item.instance_tags | combine({ + 'Name': item.name, + 'ssh_user': item.ssh_user|default(ssh_user) + }) + if item.instance_tags is defined + else { + 'Name': item.name, + 'ssh_user': item.ssh_user|default(ssh_user) + } + }}" + wait: true + spot_price: "0.0100" + spot_type: "one-time" + assign_public_ip: true + exact_count: 1 + count_tag: + Name: "{{ item.name }}" + region: "{{ item.region|default(default_region) }}" + volumes: + - device_name: "{{ item.root_device_name }}" + volume_type: gp2 + volume_size: 30 + delete_on_termination: true + instance_initiated_shutdown_behavior: "terminate" + register: server + loop: "{{ molecule_yml.platforms }}" + loop_control: + index_var: index + async: 7200 + poll: 0 + + - name: Debug message to check + debug: + msg: 'This is my updated task' + + - name: Wait for instance(s) creation to complete + async_status: + jid: "{{ item.ansible_job_id }}" + register: ec2_jobs + until: ec2_jobs.finished + retries: 300 + with_items: "{{ server.results }}" + + rescue: + - name: Create molecule instance(s) + ec2: + key_name: "{{ keypair_name }}" + image: "{{ item.image }}" + instance_type: "{{ item.instance_type }}" + vpc_subnet_id: "{{ item.vpc_subnet_id }}" + group: "{{ security_group_name_prefix }}-{{ subnet_dict[item.vpc_subnet_id] }}" + instance_tags: "{{ + item.instance_tags | combine({ + 'Name': item.name, + 'ssh_user': item.ssh_user|default(ssh_user) + }) + if item.instance_tags is defined + else { + 'Name': item.name, + 'ssh_user': item.ssh_user|default(ssh_user) + } + }}" + wait: true + assign_public_ip: true + exact_count: 1 + count_tag: + Name: "{{ item.name }}" + region: "{{ item.region|default(default_region) }}" + volumes: + - device_name: "{{ item.root_device_name }}" + volume_type: gp2 + volume_size: 30 + delete_on_termination: true + register: server + loop: "{{ molecule_yml.platforms }}" + loop_control: + index_var: index + async: 7200 + poll: 0 + + - name: Wait for instance(s) creation to complete + async_status: + jid: "{{ item.ansible_job_id }}" + register: ec2_jobs + until: ec2_jobs.finished + retries: 300 + with_items: "{{ server.results }}" + + - name: Populate instance private IP dict + set_fact: + instance_priv_ip_dict: { + 'instance': "{{ item.tagged_instances[0].tags.Name }}", + 'private_ip': "{{ item.tagged_instances[0].private_ip }}", + } + with_items: "{{ ec2_jobs.results }}" + register: instance_private_ip_dict + + - name: Populate instance Public IP dict + set_fact: + instance_public_ip_dict: { + 'instance': "{{ item.tagged_instances[0].tags.Name }}", + 'public_ip': "{{ item.tagged_instances[0].public_ip }}", + } + with_items: "{{ ec2_jobs.results }}" + register: instance_public_ip_dict + + - name: Convert instance private IP dict to a list + set_fact: + instance_priv_ip: "{{ instance_private_ip_dict.results | map(attribute='ansible_facts.instance_priv_ip_dict') | list }}" + + - name: Convert instance public IP dict to a list + set_fact: + instance_public_ip: "{{ instance_public_ip_dict.results | map(attribute='ansible_facts.instance_public_ip_dict') | list }}" + + - name: Set fact instance_name + set_fact: + instance_name: "{{ item.tagged_instances[0].tags.Name }}" + with_items: "{{ ec2_jobs.results }}" + + - name: Set the instance name variable + shell: echo "{{ instance_name }}" + register: creates + + - name: Dump instance private IPs install and bootstrap instance INSTALL_BOOTSTRAP_INSTANCE_PRIVATE_IP + copy: + content: "{{ instance_priv_ip | to_json }}" + dest: "{{ lookup('env', 'INSTALL_BOOTSTRAP_INSTANCE_PRIVATE_IP') }}" + when: + - "'install' in creates.stdout" + - "'bootstrap' in creates.stdout" + + - name: Dump instance private IPs install and common instance INSTALL_COMMON_INSTANCE_PRIVATE_IP + copy: + content: "{{ instance_priv_ip | to_json }}" + dest: "{{ lookup('env', 'INSTALL_COMMON_INSTANCE_PRIVATE_IP') }}" + when: + - "'install' in creates.stdout" + - "'common' in creates.stdout" + + - name: Dump instance public IPs install and bootstrap instance INSTALL_BOOTSTRAP_INSTANCE_PUBLIC_IP + copy: + content: "{{ instance_public_ip | to_json }}" + dest: "{{ lookup('env', 'INSTALL_BOOTSTRAP_INSTANCE_PUBLIC_IP') }}" + when: + - "'install' in creates.stdout" + - "'bootstrap' in creates.stdout" + + - name: Dump instance public IPs install and common instance INSTALL_COMMON_INSTANCE_PUBLIC_IP + copy: + content: "{{ instance_public_ip | to_json }}" + dest: "{{ lookup('env', 'INSTALL_COMMON_INSTANCE_PUBLIC_IP') }}" + when: + - "'install' in creates.stdout" + - "'common' in creates.stdout" + + - name: Dump instance private IPs min_upgrade and bootstrap instance UPGRADE_BOOTSTRAP_INSTANCE_PRIVATE_IP + copy: + content: "{{ instance_priv_ip | to_json }}" + dest: "{{ lookup('env', 'UPGRADE_BOOTSTRAP_INSTANCE_PRIVATE_IP') }}" + when: + - "'min_upgrade' in creates.stdout" + - "'bootstrap' in creates.stdout" + + - name: Dump instance public IPs min_upgrade and bootstrap instance UPGRADE_BOOTSTRAP_INSTANCE_PUBLIC_IP + copy: + content: "{{ instance_public_ip | to_json }}" + dest: "{{ lookup('env', 'UPGRADE_BOOTSTRAP_INSTANCE_PUBLIC_IP') }}" + when: + - "'min_upgrade' in creates.stdout" + - "'bootstrap' in creates.stdout" + + - name: Dump instance private IPs min_upgrade and common instance UPGRADE_COMMON_INSTANCE_PRIVATE_IP + copy: + content: "{{ instance_priv_ip | to_json }}" + dest: "{{ lookup('env', 'UPGRADE_COMMON_INSTANCE_PRIVATE_IP') }}" + when: + - "'min_upgrade' in creates.stdout" + - "'common' in creates.stdout" + + - name: Dump instance public IPs min_upgrade and common instance UPGRADE_COMMON_INSTANCE_PUBLIC_IP + copy: + content: "{{ instance_public_ip | to_json }}" + dest: "{{ lookup('env', 'UPGRADE_COMMON_INSTANCE_PUBLIC_IP') }}" + when: + - "'min_upgrade' in creates.stdout" + - "'common' in creates.stdout" + +## + + - name: Dump instance private IPs maj_upgrade and bootstrap instance UPGRADE_MAJ_BOOTSTRAP_INSTANCE_PRIVATE_IP + copy: + content: "{{ instance_priv_ip | to_json }}" + dest: "{{ lookup('env', 'UPGRADE_MAJ_BOOTSTRAP_INSTANCE_PRIVATE_IP') }}" + when: + - "'maj_upgrade' in creates.stdout" + - "'bootstrap' in creates.stdout" + + - name: Dump instance public IPs maj_upgrade and bootstrap instance UPGRADE_MAJ_BOOTSTRAP_INSTANCE_PUBLIC_IP + copy: + content: "{{ instance_public_ip | to_json }}" + dest: "{{ lookup('env', 'UPGRADE_MAJ_BOOTSTRAP_INSTANCE_PUBLIC_IP') }}" + when: + - "'maj_upgrade' in creates.stdout" + - "'bootstrap' in creates.stdout" + + - name: Dump instance private IPs maj_upgrade and common instance UPGRADE_MAJ_COMMON_INSTANCE_PRIVATE_IP + copy: + content: "{{ instance_priv_ip | to_json }}" + dest: "{{ lookup('env', 'UPGRADE_MAJ_COMMON_INSTANCE_PRIVATE_IP') }}" + when: + - "'maj_upgrade' in creates.stdout" + - "'common' in creates.stdout" + + - name: Dump instance public IPs maj_upgrade and common instance UPGRADE_MAJ_COMMON_INSTANCE_PUBLIC_IP + copy: + content: "{{ instance_public_ip | to_json }}" + dest: "{{ lookup('env', 'UPGRADE_MAJ_COMMON_INSTANCE_PUBLIC_IP') }}" + when: + - "'maj_upgrade' in creates.stdout" + - "'common' in creates.stdout" + # Mandatory configuration for Molecule to function. + + - name: Populate instance config dict + set_fact: + instance_conf_dict: { + 'instance': "{{ item.tagged_instances[0].tags.Name }}", + 'address': "{{ item.tagged_instances[0].public_ip }}", + 'user': "{{ item.tagged_instances[0].tags.ssh_user }}", + 'port': "{{ ssh_port }}", + 'identity_file': "{{ keypair_path }}-{{ item.tagged_instances[0].region }}", + 'instance_id': "{{ item.tagged_instances[0].id }}", + 'region': "{{ item.tagged_instances[0].region }}", + } + with_items: "{{ ec2_jobs.results }}" + register: instance_config_dict + when: server.changed | bool + + - name: Convert instance config dict to a list + set_fact: + instance_conf: "{{ instance_config_dict.results | map(attribute='ansible_facts.instance_conf_dict') | list }}" + when: server.changed | bool + + - name: Dump instance config + copy: + content: "{{ instance_conf | to_json | from_json | to_yaml }}" + dest: "{{ molecule_instance_config }}" + when: server.changed | bool + + - name: Print config dict + debug: + var: instance_config_dict + + - name: Wait for SSH + wait_for: + port: "{{ ssh_port }}" + host: "{{ item.address }}" + search_regex: SSH + delay: 10 + timeout: 320 + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" + + - name: Wait for boot process to finish + pause: + minutes: 2 + diff --git a/molecule/pxb-9x-testing/playbooks/create_noble.yml b/molecule/pxb-9x-testing/playbooks/create_noble.yml new file mode 100644 index 000000000..1ce364ed5 --- /dev/null +++ b/molecule/pxb-9x-testing/playbooks/create_noble.yml @@ -0,0 +1,189 @@ +--- +- name: Create + hosts: localhost + connection: local + gather_facts: false + no_log: "{{ not (lookup('env', 'MOLECULE_DEBUG') | bool or molecule_yml.provisioner.log|default(false) | bool) }}" + vars: + ssh_user: ubuntu + ssh_port: 22 + default_region: "{{ lookup('env', 'AWS_DEFAULT_REGION') | default('us-east-1', true) }}" + security_group_name_prefix: molecule + security_group_description: Security group for testing Molecule + security_group_rules: + - proto: tcp + from_port: "{{ ssh_port }}" + to_port: "{{ ssh_port }}" + cidr_ip: '0.0.0.0/0' + - proto: icmp + from_port: 8 + to_port: -1 + cidr_ip: '0.0.0.0/0' + - proto: -1 + from_port: 0 + to_port: 0 + group_name: "{{ security_group_name_prefix }}-{{ subnet_dict[item.vpc_subnet_id] }}" + security_group_rules_egress: + - proto: -1 + from_port: 0 + to_port: 0 + cidr_ip: '0.0.0.0/0' + keypair_name: "molecule-pkg-tests" + keypair_path: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}/ssh_key" + + tasks: + - name: Check subnet + ec2_vpc_subnet_info: + region: "{{ item.region|default(default_region) }}" + filters: + subnet-id: "{{ item.vpc_subnet_id }}" + with_items: "{{ molecule_yml.platforms }}" + register: subnet_facts + + - name: Populate subnet vpc + set_fact: + subnet_dict: "{{ subnet_dict|default({}) | combine({ item.subnets[0].id: item.subnets[0].vpc_id }) }}" + with_items: "{{ subnet_facts.results }}" + + - name: Create security group + ec2_group: + name: "{{ security_group_name_prefix }}-{{ subnet_dict[item.vpc_subnet_id] }}" + description: "{{ security_group_description }}" + rules: "{{ security_group_rules }}" + rules_egress: "{{ security_group_rules_egress }}" + vpc_id: "{{ subnet_dict[item.vpc_subnet_id] }}" + region: "{{ item.region|default(default_region) }}" + with_items: "{{ molecule_yml.platforms }}" + register: sg_status + failed_when: sg_status is failed and 'already exists' not in sg_status.error.message + +# - name: Delete remote keypair +# ec2_key: +# name: "{{ keypair_name }}" +# state: absent +# region: "{{ item.item.region|default(default_region) }}" +# with_items: "{{ keypair_local.results}}" +# when: not item.stat.exists + +# - name: Create keypair +# ec2_key: +# name: "{{ keypair_name }}" +# region: "{{ item.region|default(default_region) }}" +# with_items: "{{ molecule_yml.platforms }}" +# register: keypair + + - name: Setup keypair for molecule ec2 + copy: + dest: "{{ keypair_path }}-{{ item.region|default(default_region) }}" + src: "{{ lookup('env', 'MOLECULE_AWS_PRIVATE_KEY') }}" + mode: 0600 + no_log: True + with_items: "{{ molecule_yml.platforms }}" + +# - name: Get the ec2 ami(s) by owner and name, if image not set +# ec2_ami_facts: +# owners: "{{ item.image_owner }}" +# filters: +# name: "{{ item.image_name }}" +# region: "{{ item.region|default(default_region) }}" +# loop: "{{ molecule_yml.platforms }}" +# when: item.image is not defined +# register: ami_facts + + - name: Create molecule instance(s) + ec2_instance: + key_name: "{{ keypair_name }}" + image_id: "{{ item.image }}" + instance_role: "arn:aws:iam::119175775298:instance-profile/jenkins-psmdb-slave" + instance_type: "{{ item.instance_type }}" + vpc_subnet_id: "{{ item.vpc_subnet_id }}" + security_group: "{{ security_group_name_prefix }}-{{ subnet_dict[item.vpc_subnet_id] }}" + tags: "{{ + item.instance_tags | combine({ + 'Name': item.name, + 'ssh_user': item.ssh_user|default(ssh_user) + }) + if item.instance_tags is defined + else { + 'Name': item.name, + 'ssh_user': item.ssh_user|default(ssh_user) + } + }}" + wait: true + network: + assign_public_ip: true + exact_count: 1 + region: "{{ item.region|default(default_region) }}" + volumes: + - device_name: "{{ item.root_device_name }}" + ebs: + volume_type: gp2 + volume_size: 30 + delete_on_termination: true + register: server + loop: "{{ molecule_yml.platforms }}" + loop_control: + index_var: index + async: 7200 + poll: 0 + + - name: Wait for instance(s) creation to complete + async_status: + jid: "{{ item.ansible_job_id }}" + register: ec2_jobs + until: ec2_jobs.finished + retries: 300 + with_items: "{{ server.results }}" + + # Mandatory configuration for Molecule to function. + + - name: Populate instance config dict + set_fact: + instance_conf_dict: { + 'instance': "{{ item.instances[0].tags.Name }}", + 'address': "{{ item.instances[0].public_ip_address }}", + 'user': "{{ item.instances[0].tags.ssh_user }}", + 'port': "{{ ssh_port }}", + 'identity_file': "{{ keypair_path }}-{{ item.invocation.module_args.region }}", + 'instance_id': "{{ item.instances[0].instance_id }}", + 'region': "{{ item.invocation.module_args.region }}", + } + with_items: "{{ ec2_jobs.results }}" + register: instance_config_dict + when: server.changed | bool + + - name: Convert instance config dict to a list + set_fact: + instance_conf: "{{ instance_config_dict.results | map(attribute='ansible_facts.instance_conf_dict') | list }}" + when: server.changed | bool + + - name: Dump instance config + copy: + content: "{{ instance_conf | to_json | from_json | to_yaml }}" + dest: "{{ molecule_instance_config }}" + when: server.changed | bool + + - name: Print config dict + debug: + var: instance_config_dict + + - name: Wait for boot process to finish + pause: + minutes: 2 + + - name: Wait for SSH + wait_for: + port: "{{ ssh_port }}" + host: "{{ item.address }}" + search_regex: SSH + delay: 10 + timeout: 320 + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" + + - set_fact: + job_name: "{{ lookup('env', 'JOB_NAME') | lower | default('local', true) }}" + + - name: Wait more for boot process to finish for FIPS-enabled OS + pause: + minutes: 3 + when: "'fips' in job_name" diff --git a/molecule/pxb-9x-testing/playbooks/destroy.yml b/molecule/pxb-9x-testing/playbooks/destroy.yml new file mode 100644 index 000000000..6dbb29d10 --- /dev/null +++ b/molecule/pxb-9x-testing/playbooks/destroy.yml @@ -0,0 +1,48 @@ +- name: Destroy + hosts: localhost + connection: local + gather_facts: false + no_log: false + tasks: + - block: + - name: Populate instance config + set_fact: + instance_conf: "{{ lookup('file', molecule_instance_config) | from_yaml }}" + skip_instances: false + rescue: + - name: Populate instance config when file missing + set_fact: + instance_conf: {} + skip_instances: true + + - name: Destroy molecule instance(s) + ec2: + state: absent + instance_ids: "{{ item.instance_id }}" + region: "{{ item.region }}" + register: server + with_items: "{{ instance_conf }}" + when: not skip_instances + async: 7200 + poll: 0 + + - name: Wait for instance(s) deletion to complete + async_status: + jid: "{{ item.ansible_job_id }}" + register: ec2_jobs + until: ec2_jobs.finished + retries: 300 + with_items: "{{ server.results }}" + when: not skip_instances + + # Mandatory configuration for Molecule to function. + + - name: Populate instance config + set_fact: + instance_conf: {} + + - name: Dump instance config + copy: + content: "{{ instance_conf | to_json | from_json | to_yaml }}" + dest: "{{ molecule_instance_config }}" + when: server.changed | bool diff --git a/molecule/pxb-9x-testing/playbooks/destroy_noble.yml b/molecule/pxb-9x-testing/playbooks/destroy_noble.yml new file mode 100644 index 000000000..cdce29928 --- /dev/null +++ b/molecule/pxb-9x-testing/playbooks/destroy_noble.yml @@ -0,0 +1,49 @@ +--- +- name: Destroy + hosts: localhost + connection: local + gather_facts: false + no_log: false + tasks: + - block: + - name: Populate instance config + set_fact: + instance_conf: "{{ lookup('file', molecule_instance_config) | from_yaml }}" + skip_instances: false + rescue: + - name: Populate instance config when file missing + set_fact: + instance_conf: {} + skip_instances: true + + - name: Destroy molecule instance(s) + ec2_instance: + state: absent + instance_ids: "{{ item.instance_id }}" + region: "{{ item.region }}" + register: server + with_items: "{{ instance_conf }}" + when: not skip_instances + async: 7200 + poll: 0 + + - name: Wait for instance(s) deletion to complete + async_status: + jid: "{{ item.ansible_job_id }}" + register: ec2_jobs + until: ec2_jobs.finished + retries: 300 + with_items: "{{ server.results }}" + when: not skip_instances + + # Mandatory configuration for Molecule to function. + + - name: Populate instance config + set_fact: + instance_conf: {} + + - name: Dump instance config + copy: + content: "{{ instance_conf | to_json | from_json | to_yaml }}" + dest: "{{ molecule_instance_config }}" + when: server.changed | bool diff --git a/molecule/pxb-9x-testing/playbooks/playbook.yml b/molecule/pxb-9x-testing/playbooks/playbook.yml new file mode 100644 index 000000000..0a908a897 --- /dev/null +++ b/molecule/pxb-9x-testing/playbooks/playbook.yml @@ -0,0 +1,12 @@ +--- +- name: Converge + hosts: all + become: true + become_method: sudo + environment: + PERCONA_TELEMETRY_URL: "https://check-dev.percona.com/v1/telemetry/GenericReport" + roles: + - role: pxb-package-testing + vars: + install_repo: "{{ lookup('env', 'install_repo') }}" + REPO_TYPE: "{{ lookup('env', 'REPO_TYPE') }}" diff --git a/molecule/pxb-9x-testing/playbooks/prepare.yml b/molecule/pxb-9x-testing/playbooks/prepare.yml new file mode 100644 index 000000000..f2839c7cb --- /dev/null +++ b/molecule/pxb-9x-testing/playbooks/prepare.yml @@ -0,0 +1,38 @@ +- name: Prepare node for running tests + hosts: all + become: true + become_method: sudo + gather_facts: true + tasks: + + - name: Setup SSH keys for Oracle Linux or Amazon + authorized_key: + user: ec2-user + key: "{{ lookup('file', 'public_keys') }}" + state: present + exclusive: False + when: ansible_os_family == "RedHat" + + - name: Setup SSH keys CentOS + authorized_key: + user: centos + key: "{{ lookup('file', 'public_keys') }}" + state: present + exclusive: False + when: ansible_distribution == "CentOS" + + - name: Setup SSH keys Debian + authorized_key: + user: admin + key: "{{ lookup('file', 'public_keys') }}" + state: present + exclusive: False + when: ansible_distribution == "Debian" + + - name: Setup SSH keys Ubuntu + authorized_key: + user: ubuntu + key: "{{ lookup('file', 'public_keys') }}" + state: present + exclusive: False + when: ansible_distribution == "Ubuntu" diff --git a/molecule/pxb-9x-testing/playbooks/public_keys b/molecule/pxb-9x-testing/playbooks/public_keys new file mode 100644 index 000000000..7ca05da5e --- /dev/null +++ b/molecule/pxb-9x-testing/playbooks/public_keys @@ -0,0 +1,2 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC4ns0dEv0sJV+rMDftaaTDwsj2y0hf0/vOsPepy+YJzFW4B8dgTa75bN12uexH78Xcth06MkOCiB3iOuIkoxEcQx8JMUiUCiIpNSWTTTjxu4zhx6k68Fw6eczbbBoXenNO6i7lCB1rXsd2NO4JgOEMobi6IzdkOXINV3LX5Pu3zrbxOKSeTIKnVEt3kK0/yrvCEKAg8lyGIuZ6Xh6zOLkbhQGpWDNexQa8kx4K/2QN98dNWAFktihcy1UOZJ4ha17MEsDRxyNb5lixWurv23/BpjbaiywpQbmZ+hAfS3wN2hxMSuP4pwkoCiRBvQjT7fD5jeMJ3YiYVv56VBbf0TAAcLentCowfzEdwPYyExma0J0PXmregNPlaw38KcmlSmUfXn77XRIgJ70aAcq3MscsqlKpIN7AYYbTBuDj/7ENpI8dsJarNWmeHMlfoi0mwI9izPnJim3XODdGWAZlV0CXvG2NpmzASxuKYrf8occNtyjjrD/Fn5DBHuD6PbJn8KE= yash@yash-ThinkPad-P15-Gen-2i +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDOd40LZGjUamEmWNHD8IF0bezAMu2pIK3r/rZbt+FFNWapvbATwWXdZt6i0wXZrtEz7CFXZJgE0REZxldzvCW80m6RDw/S7xc9X7v/atilQMRiMs68bDBY7/GsfzR92umhU0bZRpzX24mUm/DIksYW4V49dS8qg7e0UG/UwM1RuCB5hvDjThCIY0ILosWn0CNWtbrADeB98HxRpCYe9bombRZKH+5SpRIVnvHet/ENadOyHROG5GwF64SHVAMgGcy/Y1tnv1RWws4o+DswuwZHxVAn9WFwnC5veGXnfZixA8SUTCRYfjLfuU/3akZiC6Ibhq7w3pBj06q4ENfRKs7ez1JXimfA8qTRGQdYy4RDsclPVwXLehpgKo7pouZbyMVXfpMeA++7KdslHUriIdkgaCJU7VIa3NFAdDvaDtDAmM2tsrzEem5d5dRUdpgwTzUTfCnr4ssU6fzFS2hbnNF4BvnabLeLFO7Go6da/HAMb/bKCgt4uxh9CBGtxJZ/oD2S3WngONsmCwhYFhPKJHaNAYpcIsIrxyPtzLjsWX74FmOTfl4PGxo01WBtik1HmJoVdVoOVCAZrwyP2imR0IoFsXgMvQm89K/pzw8tpG2uvsQeQ+NEN57GfBEzmmxiVWPuxvxkWa/fzgnTWwy85CK+WlOEKKAXd1V8u2XakZIcaw== puneet-work@puneet-work diff --git a/molecule/pxb-9x-testing/tasks/main.yml b/molecule/pxb-9x-testing/tasks/main.yml new file mode 100644 index 000000000..62a449ab7 --- /dev/null +++ b/molecule/pxb-9x-testing/tasks/main.yml @@ -0,0 +1,32 @@ +--- + - name: Setup SSH keys for Oracle Linux or Amazon + authorized_key: + user: ec2-user + key: "{{ lookup('file', 'public_keys') }}" + state: present + exclusive: False + when: ansible_os_family == "RedHat" + + - name: Setup SSH keys CentOS + authorized_key: + user: centos + key: "{{ lookup('file', 'public_keys') }}" + state: present + exclusive: False + when: ansible_distribution == "CentOS" + + - name: Setup SSH keys Debian + authorized_key: + user: admin + key: "{{ lookup('file', 'public_keys') }}" + state: present + exclusive: False + when: ansible_distribution == "Debian" + + - name: Setup SSH keys Ubuntu + authorized_key: + user: ubuntu + key: "{{ lookup('file', 'public_keys') }}" + state: present + exclusive: False + when: ansible_distribution == "Ubuntu" diff --git a/package_check.sh b/package_check.sh index dba6b08ed..402f7131b 100755 --- a/package_check.sh +++ b/package_check.sh @@ -105,7 +105,7 @@ elif [ $1 = "pxb84" ]; then elif [ $1 = "pxb84" ] && [ "$2" = "pro" ]; then version=${PXB84_PRO_VER} pkg_version=${PXB84_PRO_PKG_VER} -elif [[ $1 =~ ^pxb9[1-9]{1}$ ]]; then +elif [[ $1 =~ ^pxb9[0-9]{1}$ ]]; then version=${PXB_INN_LTS_VER} pkg_version=${PXB_INN_LTS_PKG_VER} elif [ $1 = "psmdb30" ]; then diff --git a/playbooks/pxb_9x.yml b/playbooks/pxb_9x.yml new file mode 100644 index 000000000..5e9eaf57c --- /dev/null +++ b/playbooks/pxb_9x.yml @@ -0,0 +1,393 @@ +--- +- hosts: all + become: true + become_method: sudo + vars: + gnupg_home: /root/.gnupg + percona_key1: 4D1BB29D63D98E422B2113B19334A25F8507EFA5 + percona_key1_file: "{{ gnupg_home }}/PERCONA-PACKAGING-KEY" + environment: + PERCONA_TELEMETRY_URL: "https://check-dev.percona.com/v1/telemetry/GenericReport" + + tasks: + - name: include tasks for test env setup + include_tasks: ../tasks/test_prep.yml + + - name: Extract values using shell command for repo name used for innovation/lts release + shell: grep 'PS_INN_LTS_REPO=' /package-testing/VERSIONS | cut -d'=' -f2 | tr -d '"' + register: ps_inn_lts_repo_name + + - name: Set major_release_version variable + set_fact: + ps_inn_lts_repo_name: "{{ ps_inn_lts_repo_name.stdout }}" + + - name: include tasks for enabling main repo + include_tasks: ../tasks/enable_main_repo.yml + when: lookup('env', 'install_repo') == "main" + + - name: include tasks for enabling PS INNOVATION main repo + include_tasks: ../tasks/enable_ps_innovation_repo_main.yml + when: lookup('env', 'install_repo') == "main" + + - name: include tasks for enabling PS INNOVATION test repo + include_tasks: ../tasks/enable_ps_innovation_repo_testing.yml + when: lookup('env', 'install_repo') == "testing" + + - name: include tasks for enabling PS INNOVATION experimental repo + include_tasks: ../tasks/enable_ps_innovation_repo_experimental.yml + when: lookup('env', 'install_repo') == "experimental" + + - name: download and extract world database + command: "{{ item }}" + with_items: + - wget --no-check-certificate -P /package-testing https://raw.githubusercontent.com/Percona-QA/percona-qa/master/sample_db/world.sql + + - name: install Percona Server 8.4 packages + include_tasks: + file: ../tasks/install_ps_innovation_lts.yml + apply: + environment: + PERCONA_TELEMETRY_DISABLE: "1" + when: + - lookup('env', 'server_to_test') == "ps-9x-innovation" + +# INSTALL MS + + - name: Extract PXB major and minor version number using shell commands + shell: cat /package-testing/VERSIONS | grep 'PXB_INN_LTS_MAJ_VER' | cut -d'=' -f2 | sed 's/"//g' + register: pxb_version_major_minor + + - name: Extract PXB major version number using shell commands + shell: cat /package-testing/VERSIONS | grep 'PXB_INN_LTS_MAJ_VER' | awk -F'[=".]' '{print $3"."$4}' + register: pxb_version_major + + - name: Extract version number using shell commands + shell: cat /package-testing/VERSIONS | grep -oP 'PXB_INN_LTS_VER="\K(\d+)\.(\d+)' | tr -d '.' + register: major_release_version + + - name: Set major_release_version variable + set_fact: + major_release_version: "{{ major_release_version.stdout }}" + + - name: Set pxb_version_major variable + set_fact: + pxb_version_major_reg: "{{ pxb_version_major.stdout }}" + + - name: Set pxb_version_major_minor variable + set_fact: + pxb_version_major_minor_reg: "{{ pxb_version_major_minor.stdout }}" + + - name: DEBUG PXB version number + debug: + msg: "PXB version number is {{ pxb_version_major.stdout }} {{ pxb_version_major_minor.stdout }}" + +### + + - name: install MYSQL MS Server {{ pxb_version_major_reg }} packages + include_tasks: ../tasks/install_ms_innovation_lts.yml + vars: + pxb_version_major: "{{ pxb_version_major_reg }}" + pxb_version_major_minor: "{{ pxb_version_major_minor_reg }}" + when: + - lookup('env', 'server_to_test') == "ms_innovation_lts" + + - name: Download percona-release for Ubuntu + get_url: + url: https://repo.percona.com/apt/percona-release_latest.generic_all.deb + dest: /tmp/percona-release.deb + when: ansible_os_family == "Debian" + + - name: Install percona-release for Ubuntu + apt: + deb: /tmp/percona-release.deb + state: present + when: ansible_os_family == "Debian" + + - name: Enable PXB LTS testing repo + command: percona-release enable-only pxb-9x-innovation experimental + when: lookup('env', 'REPO_TYPE') != "PRO" + + - name: install Percona XtraBackup innovation packages + include_tasks: ../tasks/install_pxb_innovation_lts.yml + when: lookup('env', 'REPO_TYPE') != "PRO" + + #- name: check telemetry (enabled) + # command: /package-testing/check_telemetry.sh pxb -e + + + - name: PRINT INSTALLED XTRABACKUP version DEBIAN + shell: apt list --installed 2>&1 | grep percona-xtrabackup + when: + - ansible_os_family == "Debian" + register: xtrabackup_version_print + + - name: DEBUG xtrabackup_version_print DEBIAN + debug: + msg: "Xtrabackup version is {{ xtrabackup_version_print.stdout }}" + when: + - ansible_os_family == "Debian" + + - name: Gather fresh service facts after MySQL install + service_facts: + + - name: Debug all discovered services (optional, for troubleshooting) + debug: + var: ansible_facts.services + + - name: Detect MySQL service name dynamically + set_fact: + mysql_service_name: >- + {% set services = ansible_facts.services.keys() %} + {% if 'mysql.service' in services %} + mysql.service + {% elif 'mysqld.service' in services %} + mysqld.service + {% else %} + "" + {% endif %} + + - name: Strip whitespace from mysql_service_name + set_fact: + mysql_service_name: "{{ mysql_service_name | trim }}" + + - name: Debug selected mysql_service_name + debug: + var: mysql_service_name + + - name: Start the MySQL service dynamically + service: + name: "{{ mysql_service_name }}" + state: started + when: + - mysql_service_name is defined + - mysql_service_name in ansible_facts.services + + - name: install plugins, import world database + command: /package-testing/plugins_test.sh + + - name: Print the version of the installed Percona XtraBackup + shell: | + { + echo " xtrabackup --version is "; + xtrabackup --version || echo "FAILED: xtrabackup --version"; + echo "xbstream --version is "; + xbstream --version || echo "FAILED: xbstream --version"; + echo "xbcloud --version is "; + xbcloud --version || echo "FAILED: xbcloud --version"; + echo "xbcrypt --version is "; + xbcrypt --version || echo "FAILED: xbcrypt --version"; + } + register: version_output + ignore_errors: yes + + - name: Display version information + debug: + var: version_output.stdout_lines + + - name: check that Percona XtraBackup version is correct + command: /package-testing/version_check.sh pxb91 + when: + - lookup('env', 'REPO_TYPE') != "PRO" + + - name: check that Percona XtraBackup package versions are correct + command: /package-testing/package_check.sh pxb91 + when: + - lookup('env', 'REPO_TYPE') != "PRO" + + + - name: Ensure /tmp/backups directory exists + file: + path: /tmp/backups + state: directory + mode: '0755' + + + - name: run backup + shell: /usr/bin/xtrabackup --backup --user=root --target-dir=/tmp/backups/ > /tmp/backups/xtrabackup.log 2>&1 + + - name: Show xtrabackup log after regular backup + shell: cat /tmp/backups/xtrabackup.log + register: xtrabackup_regular_log + ignore_errors: yes + + - name: xtrabackup regular backup log + debug: + msg: "{{ xtrabackup_regular_log.stdout_lines }}" + + + - name: Check xtrabackup log for actual errors (regular backup) + shell: | + grep -i 'ERROR' /tmp/backups/xtrabackup.log | grep -v 'performance_schema/error_' || echo "No real error found" + register: backup_log_check + failed_when: > + ('ERROR' in backup_log_check.stdout) and ('No real error found' not in backup_log_check.stdout) + + - name: prepare backup + command: /usr/bin/xtrabackup --prepare --user=root --target-dir=/tmp/backups/ + + - name: install lz4 and zstd packages on Redhat/CentOS + yum: + name: "{{ packages }}" + vars: + packages: + - lz4 + - zstd + when: ansible_os_family == "RedHat" + + - name: install lz4 and zstd packages on Ubuntu/Debian + apt: + name: "{{ packages }}" + vars: + packages: + - lz4 + - zstd + when: ansible_os_family == "Debian" and ansible_distribution_release != "bionic" + + - name: install lz4 and zstd packages on Bionic + apt: + name: "{{ packages }}" + vars: + packages: + - liblz4-tool + - zstd + when: ansible_os_family == "Debian" and ansible_distribution_release == "bionic" + + - name: run backup with lz4 compression + command: /usr/bin/xtrabackup --backup --user=root --target-dir=/tmp/backup_l/ --compress=lz4 --compress-threads=10 + + - name: decompress backup + command: /usr/bin/xtrabackup --decompress --user=root --target-dir=/tmp/backup_l/ + + - name: prepare backup + command: /usr/bin/xtrabackup --prepare --user=root --target-dir=/tmp/backup_l/ + + - name: run backup with zstd compression + command: /usr/bin/xtrabackup --backup --user=root --target-dir=/tmp/backup_z/ --compress=zstd --compress-threads=10 + + - name: decompress backup + command: /usr/bin/xtrabackup --decompress --user=root --target-dir=/tmp/backup_z/ + + - name: prepare backup + command: /usr/bin/xtrabackup --prepare --user=root --target-dir=/tmp/backup_z/ + + + - name: Restore LZ4 backup using rsync method + block: + - name: Stop MySQL before LZ4 restore + service: + name: "{{ mysql_service_name }}" + state: stopped + + - name: Move datadir for LZ4 rsync restore + command: mv /var/lib/mysql /var/lib/mysql.lz4.rsync.bak + ignore_errors: yes + + - name: Create new datadir for LZ4 rsync restore + file: + path: /var/lib/mysql + state: directory + owner: mysql + group: mysql + mode: '0755' + + - name: Rsync LZ4 backup to datadir + command: rsync -av /tmp/backup_l/ /var/lib/mysql/ + + - name: Set ownership for datadir after LZ4 rsync restore + file: + path: /var/lib/mysql + state: directory + recurse: yes + owner: mysql + group: mysql + + - name: Start MySQL after LZ4 rsync restore + service: + name: "{{ mysql_service_name }}" + state: started + + - name: Wait for MySQL to come up after LZ4 rsync restore + shell: mysqladmin ping -u root + register: mysql_status_lz4_rsync + retries: 5 + delay: 3 + until: "'mysqld is alive' in mysql_status_lz4_rsync.stdout" + + - name: Confirm LZ4 rsync restore success + debug: + msg: "LZ4 rsync restore successful. MySQL is alive." + + - name: Restore ZSTD backup using --copy-back method + block: + - name: Stop MySQL before ZSTD restore + service: + name: "{{ mysql_service_name }}" + state: stopped + + - name: Move datadir for ZSTD copy-back restore + command: mv /var/lib/mysql /var/lib/mysql.zstd.copyback.bak + ignore_errors: yes + + - name: Create new datadir for ZSTD copy-back restore + file: + path: /var/lib/mysql + state: directory + owner: mysql + group: mysql + mode: '0755' + + - name: Restore ZSTD backup using --copy-back + command: /usr/bin/xtrabackup --copy-back --target-dir=/tmp/backup_z/ + + - name: Set ownership for datadir after copy-back + file: + path: /var/lib/mysql + state: directory + recurse: yes + owner: mysql + group: mysql + + - name: Start MySQL after ZSTD copy-back restore + service: + name: "{{ mysql_service_name }}" + state: started + + - name: Wait for MySQL to come up after ZSTD restore + shell: mysqladmin ping -u root + register: mysql_status_zstd_copyback + retries: 5 + delay: 3 + until: "'mysqld is alive' in mysql_status_zstd_copyback.stdout" + + - name: Confirm ZSTD copy-back restore success + debug: + msg: "ZSTD copy-back restore successful. MySQL is alive." + + ### OPTIONAL CLEANUP: Revert to original datadir (if needed) + - name: Stop MySQL before restoring original data + service: + name: "{{ mysql_service_name }}" + state: stopped + + - name: Remove restored datadir + file: + path: /var/lib/mysql + state: absent + + - name: Restore original datadir + command: mv /var/lib/mysql.bak /var/lib/mysql + ignore_errors: yes + + - name: Start MySQL again with original data + service: + name: "{{ mysql_service_name }}" + state: started + + - name: Print original data restored + debug: + msg: "Original datadir restored and MySQL restarted." + + + - name: restart mysql service debian + service: name=mysql state=restarted + when: ansible_os_family == "Debian" diff --git a/tasks/enable_ps_innovation_repo_experimental.yml b/tasks/enable_ps_innovation_repo_experimental.yml index b34c30f21..9c58965be 100644 --- a/tasks/enable_ps_innovation_repo_experimental.yml +++ b/tasks/enable_ps_innovation_repo_experimental.yml @@ -100,4 +100,4 @@ when: - ansible_os_family == "RedHat" - ansible_distribution_major_version >= "8" - - percona_packages_dnf.stdout_lines is defined + - percona_packages_dnf.stdout_lines is defined \ No newline at end of file diff --git a/tasks/test_prep.yml b/tasks/test_prep.yml index 0b0d71856..c714adfaf 100644 --- a/tasks/test_prep.yml +++ b/tasks/test_prep.yml @@ -225,8 +225,8 @@ - rm -f master.zip - mv "package-testing-{{ branch }}" /package-testing vars: - branch: "{{ lookup('env', 'TESTING_BRANCH') | default('master', true) }}" - git_account: "{{ lookup('env', 'TESTING_GIT_ACCOUNT') | default('Percona-QA', true) }}" + branch: "{{ lookup('env', 'TESTING_BRANCH') | default('pxb-work', true) }}" + git_account: "{{ lookup('env', 'TESTING_GIT_ACCOUNT') | default('grishma123-eng', true) }}" - name: install latest bats from github command: "{{ item }}" diff --git a/version_check.sh b/version_check.sh index e3ff2a83b..fabbfa359 100755 --- a/version_check.sh +++ b/version_check.sh @@ -109,7 +109,7 @@ elif [[ $1 = "pxb84" ]]; then elif [[ $1 = "pxb84pro" ]]; then version=${PXB84_PRO_VER} pkg_version=${PXB84_PRO_PKG_VER} -elif [[ $1 =~ ^pxb9([2-35-9])$ ]]; then +elif [[ $1 =~ ^pxb9([0-9])$ ]]; then version=${PXB_INN_LTS_VER} elif [ "$1" = "pmm" ]; then version=${PMM_VER}