IBM / StorageScaleVagrant

Example scripts and configuration files to install and configure IBM Storage Scale in a Vagrant environment
Apache License 2.0
16 stars 19 forks source link

Ansible version dependancy problem stops the install #27

Closed dannyk96 closed 2 years ago

dannyk96 commented 2 years ago

I am getting this error

  SpectrumScale_base: Error:
    SpectrumScale_base:  Problem: conflicting requests
    SpectrumScale_base:   - nothing provides (ansible-core >= 2.12.2 with ansible-core < 2.13) needed by ansible-5.4.0-3.el8.noarch
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

I have tried with both Spectrum_Scale_Developer-5.1.4.0-x86_64-Linux-install and Spectrum_Scale_Developer-5.1.5.0-x86_64-Linux-install

The problem occurs with both.

hseipp commented 2 years ago

Hi Daniel, thank you for reporting this issue. The last Spectrum Scale version I successfully tested was 5.1.4.1 mid of July 2022. At that time, Ansible 2.9.27 was available on EPEL. In the meantime this "Ansible classic" version got pulled from EPEL, and was replaced with version 5.4.0 that requires ansible-core. ansible-core is only available on CentOS Stream, but not on CentOS 8. When re-running the tests today, I get the same error.

This is essentially an Ansible packaging issue like also pointed out here. An option might be to pull in ansible-core from CentOS Stream, but there is risk that doing so might cause dependency issues.

hseipp commented 2 years ago

Switching to pip-based Ansible installation seems to solve the issue. Also now disabling EPEL after installing Ansible. Disabling EPEL is recommended by latest Spectrum Scale installer versions to prevent (Object) package dependency conflicts.

diff --git a/shared/Vagrantfile8.rpms b/shared/Vagrantfile8.rpms
index 6103d92..747615c 100644
--- a/shared/Vagrantfile8.rpms
+++ b/shared/Vagrantfile8.rpms
@@ -108,11 +108,10 @@ Vagrant.configure('2') do |config|
       /bin/sh -c \"sed -i 's/metalink/#metalink/g' /etc/yum.repos.d/epel*\" && /bin/sh -c \"sed -i 's|#baseurl=https://download.example/pub/|baseurl=https://mirror.init7.net/fedora/|g' /etc/yum.repos.d/epel*\"
     "

-  # Install Ansible as required by Spectrum Scale 5.1.1+ installer
-    config.vm.provision "shell",
-    name:   "Install additional RPMs required by Spectrum Scale",
+  config.vm.provision "shell",
+    name:   "Install Ansible as required by Spectrum Scale 5.1.1+ installer",
     inline: "
-      /usr/bin/dnf makecache && /usr/bin/dnf install -y ansible
+      /usr/bin/dnf -y install rust libsodium python3-paramiko python3-pynacl && pip3 install setuptools_rust && pip3 install ansible==2.9.27
     "

   # Install RPM to prevent CLI errors due to locale for German users
@@ -129,4 +128,11 @@ Vagrant.configure('2') do |config|
     inline: "
       /usr/bin/dnf upgrade -y
     "
+
+  # Disable EPEL
+  config.vm.provision "shell",
+    name:   "Disable EPEL to prevent package conflicts during Spectrum Scale installation",
+    inline: "
+      /bin/sh -c \"sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/epel*\"
+    "
 end
hseipp commented 2 years ago

@dannyk96 I have merged the potential fix for your issue, please test and close this issue in case it is working for you as well. I verified that the latest code works with the libvirt backend using Spectrum Scale 5.1.4.1 and 5.1.5.0.

dannyk96 commented 2 years ago

Thanks Harold!

I get much further now The ./spectrumscale toolkit did get extracted, but it won't run as /usr/bin/pthion3 is missing

I am working in it now. Oddly the prep-box VM does seem to have a working python3 - weird

I will delete all VMs by hand and start again.

image

hseipp commented 2 years ago

Hi Daniel, the screenshot proves that you can ssh into a fully-deployed VM so I'd consider the original bug as fixed.

I suppose the new issue you're seeing now is due to the way you changed to the root user. Can you try a sudo -s instead? BTW: If you are trying to use the spectrumscale command to modify the Scale installation, this is not in-scope for this project (yet).

If you just want to find out the Scale version, please use

[vagrant@m1 ~]$ sudo mmdiag --version

=== mmdiag: version ===
Current GPFS build: "5.1.5.0 ".
Built on Aug 19 2022 at 12:44:59
Running 18 minutes 31 secs, pid 5090
dannyk96 commented 2 years ago

Hi Harold, I have no intension of running ./spectrumscale to install anything. I was running it with argument 'version' as a pre-check, as I had a problem on a customer system where ./spectrumscale would not run because of Python dependancy issues : and this was proved by getting them to run just ./spectrumscale version as the reproducer

hseipp commented 2 years ago

Hi Daniel,

got it. This is what I just successfully tried on my VM instance:

$ vagrant ssh
Last login: Mon Oct 10 15:36:52 2022 from 192.168.121.1
[vagrant@m1 ~]$ sudo -s
[root@m1 vagrant]# cd /usr/lpp/mmfs/5.1.5.0/ansible-toolkit/
[root@m1 ansible-toolkit]# ./spectrumscale version
usage: spectrumscale [-h] [-v] [--version]
                     {setup,node,config,nsd,filesystem,callhome,fileauditlogging,enable,disable,install,deploy,upgrade}
                     ...
spectrumscale: error: invalid choice: 'version' (choose from 'setup', 'node', 'config', 'nsd', 'filesystem', 'callhome', 'fileauditlogging', 'enable', 'disable', 'install', 'deploy', 'upgrade')
[root@m1 ansible-toolkit]# ./spectrumscale --version
IBM Spectrum Scale Ansible Install Toolkit release: 5.1.5.0
dannyk96 commented 2 years ago

But yes this ticket can be closed. I confirtn that Ansible is being installed via pip

dannyk96 commented 2 years ago

see new ticket re. .ansible-playbook not being on the default path (it is now in usr//local/bin)