Skip to content

scaleapi code fixes in the development branch #817

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 25 additions & 14 deletions roles/core_install/tasks/install_nodeid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,57 @@
- block:
- name: install| Creates default directory
file:
path: "{{ scale_node_id_config.cert_dir_location }}"
path: "{{ hostvars[inventory_hostname].cert_dir_location }}"
state: directory
mode: '0600'
recurse: yes
when: scale_node_id_config.cert_dir_location is defined
when: hostvars[inventory_hostname].cert_dir_location is defined

- name: install | Copy installation package to node
copy:
src: "{{ scale_node_id_config.cert }}"
dest: "{{ scale_node_id_config.cert }}"
src: "{{ hostvars[inventory_hostname].node_cert }}"
dest: "{{ hostvars[inventory_hostname].node_cert }}"
mode: '0600'

- name: install | Copy installation package to node
copy:
src: "{{ scale_node_id_config.key }}"
dest: "{{ scale_node_id_config.key }}"
src: "{{ hostvars[inventory_hostname].node_cert_key }}"
dest: "{{ hostvars[inventory_hostname].node_cert_key }}"
mode: '0600'

- name: install | Copy installation package to node
copy:
src: "{{ scale_node_id_config.chain }}"
dest: "{{ scale_node_id_config.chain }}"
src: "{{ hostvars[inventory_hostname].node_cert_chain }}"
dest: "{{ hostvars[inventory_hostname].node_cert_chain }}"
mode: '0600'

- name: cluster | Node identity
command: /usr/lpp/mmfs/bin/scalectl nodeid get
command: /usr/lpp/mmfs/bin/scalectl node config get
register: nodeidentity_exist_results
ignore_errors: yes
failed_when: false

- name: cluster | Restart scaleadmd ( workaround)
command: systemctl restart scaleadmd
ignore_errors: yes
failed_when: false
when:
- nodeidentity_exist_results.stderr is defined
- '"/var/mmfs/run/grpc.admin.sock" in nodeidentity_exist_results.stderr'

- debug:
msg: "{{nodeidentity_exist_results}}"

- name: cluster | Node identity
command: /usr/lpp/mmfs/bin/scalectl nodeid import --cert {{ scale_node_id_config.cert }} --key {{ scale_node_id_config.key }} --chain {{ scale_node_id_config.chain }}
command: /usr/lpp/mmfs/bin/scalectl node config set --cert {{ hostvars[inventory_hostname].node_cert }} --key {{ hostvars[inventory_hostname].node_cert_key }} --chain {{ hostvars[inventory_hostname].node_cert_chain }}
register: nodeidentity_results
retries: 5
delay: 30
when: nodeidentity_exist_results.stdout_lines | length < 1
when:
- scale_node_id_config is defined
- scale_node_id_config.cert is defined
- scale_node_id_config.key is defined
- scale_node_id_config.chain is defined
- hostvars[inventory_hostname].node_cert is defined
- hostvars[inventory_hostname].node_cert_key is defined
- hostvars[inventory_hostname].node_cert_chain is defined

- debug:
msg: "{{ nodeidentity_results.cmd }}"
Expand Down
10 changes: 10 additions & 0 deletions roles/core_install/tasks/install_repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,13 @@
scale_install_all_packages: "{{ scale_install_all_packages + [ item ] }}"
when: scale_install_gplbin_package is undefined
with_items: "{{ scale_install_gplsrc_packages }}"

#
# Add GPFS packages for building scale-api from source
#
- name: install | Add scale api package to list
set_fact:
scale_install_all_packages: "{{ scale_install_all_packages + [ item ] }}"
when: scale_type is defined
with_items:
- gpfs.scaleapi
8 changes: 8 additions & 0 deletions roles/core_install/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,11 @@

- import_tasks: build.yml
tags: build

- import_tasks: install_nodeid.yml
tags: install
when:
- scale_scaleadmd is defined
- hostvars[inventory_hostname].node_cert is defined and hostvars[inventory_hostname].node_cert != "None"
- hostvars[inventory_hostname].node_cert_key is defined and hostvars[inventory_hostname].node_cert_key != "None"
- hostvars[inventory_hostname].node_cert_chain is defined and hostvars[inventory_hostname].node_cert_chain != "None"
11 changes: 11 additions & 0 deletions roles/core_upgrade/tasks/install_repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,14 @@
with_items:
- gpfs.java*
when: (is_scale_java_pkg_installed | bool)


#
# Add GPFS packages for building scale-api from source
#
- name: install | Add scale api package to list
set_fact:
scale_install_all_packages: "{{ scale_install_all_packages + [ item ] }}"
when: scale_type is defined
with_items:
- gpfs.scaleapi