ibm-spectrum-scale-install-infra
ibm-spectrum-scale-install-infra copied to clipboard
Failed when adding node to cluster
Describe the bug When extending inventory to add new node, first ansible run finish with failed. Re;ease used is v2.2.0
TASK [ibm.spectrum_scale.core.cluster : configure | check if package upgraded] *******************************************************************
Thursday 17 March 2022 16:08:49 +0100 (0:00:00.084) 0:07:14.594 ********
skipping: [n001] => (item=n001)
skipping: [n001] => (item=n002)
fatal: [n001]: FAILED! =>
msg: |-
The conditional check '(hostvars[item].scale_install_updated is defined and (true in ansible_play_hosts | map('extract', hostvars, 'scale_install_updated') | map('bool') | list))' failed. The error was: error while evaluating conditional ((hostvars[item].scale_install_updated is defined and (true in ansible_play_hosts | map('extract', hostvars, 'scale_install_updated') | map('bool') | list))): 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'scale_install_updated'
The error appears to be in 'xxxxxxx/ansible/ansible_collections/ibm/spectrum_scale/roles/core/cluster/tasks/finalize.yml': line 5, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- block: ## run_once: true
- name: configure | check if package upgraded
^ here
To Reproduce Steps to reproduce the behavior:
- Add node to inventory
- Run ansible for the cluster
- first run crashwith error
- second one finish succesfully
Expected behavior First run clear
Environment Please run the following an paste your output here:
# Developement
$ ansible --version
ansible [core 2.11.8]
python version = 3.9.6 (default, Aug 25 2021, 16:22:38) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
jinja version = 3.0.3
libyaml = True
$ python --version
Python 3.9.6
# Deployment
[root@n001 ~]# rpm -qa | grep gpfs
gpfs.compression-5.1.2-2.x86_64
gpfs.gss.pmsensors-5.1.2-2.el7.x86_64
gpfs.gpl-5.1.2-2.noarch
gpfs.gskit-8.0.55-19.1.x86_64
gpfs.license.da-5.1.2-2.x86_64
gpfs.docs-5.1.2-2.noarch
gpfs.base-5.1.2-2.x86_64
gpfs.msg.en_US-5.1.2-2.noarch
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
Can you please check your installed ansible version.
ansible --version
We are supporting ansible 2.9 but with latest master code, it should work with 2.10 too. Thanks
@pekackif we will check this with latest ansible version but currently you can try following work around,
Option 1: You can install ansible 2.9 version and continue with the installation.
Option 2:
Or you can check by defining this variable in the playbook ,
scale_install_updated: false
scale_config_changed: false
$ ansible-lint /home/xxxxx/ibm/spectrum_scale/roles/core/cluster/tasks/finalize.yml
WARNING Listing 2 violation(s) that are fatal
yaml: wrong indentation: expected 8 but found 7 (indentation)
../ansible/ansible_collections/ibm/spectrum_scale/roles/core/cluster/tasks/finalize.yml:9
yaml: wrong indentation: expected 8 but found 7 (indentation)
../ansible/ansible_collections/ibm/spectrum_scale/roles/core/cluster/tasks/finalize.yml:19
You can skip specific rules or tags by adding them to your configuration file:
# .ansible-lint
warn_list: # or 'skip_list' to silence them completely
- yaml # Violations reported by yamllint
Finished with 2 failure(s), 0 warning(s) on 1 files.
https://github.com/IBM/ibm-spectrum-scale-install-infra/blob/7fdce47d562e1f762b9b62ad0606d7d7fee4033f/roles/core/cluster/tasks/finalize.yml#L9 https://github.com/IBM/ibm-spectrum-scale-install-infra/blob/7fdce47d562e1f762b9b62ad0606d7d7fee4033f/roles/core/cluster/tasks/finalize.yml#L19
@pekackif Thanks for the update. are you executing this through ansible collection ?
collections:
- ibm.spectrum_scale
roles:
- core.precheck
- core.common
- core.node
- core.cluster
- gui/precheck
- gui/node
- gui/cluster
Thanks @pekackif for the reply. Can you please check if you are able to execute using roles method without collections.
- hosts: cluster01
vars:
- scale_install_localpkg_path: /root/Spectrum_Scale_Standard-5.0.4.0-x86_64-Linux-install
roles:
- core/precheck
- core/node
- core/cluster
- core/postcheck
- gui/precheck
- gui/node
- gui/cluster
FWIW I think I hit the same error (was a while ago now) and I added this to work around:
scale_install_needsupdate: false
scale_install_updated: false
Which actually I think is correct default behaviour? As ansible users won't expect a re-run to possibly change the installed packages just because a newer version is available.