Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Issue running playbook to install controller and nodes #51

Closed
distsystemsarchitect opened this issue Aug 24, 2020 · 18 comments
Closed

Issue running playbook to install controller and nodes #51

distsystemsarchitect opened this issue Aug 24, 2020 · 18 comments

Comments

@distsystemsarchitect
Copy link

While trying to run the deploy scripts (deploy_ne.sh), I am getting errors of version compatibility of python. This is on a clean install of Centos on KVM. Full connectivity between controller node and edge node (tested with ansible -m ping all command).

I am getting the following error:
STDOUT:

File: ‘/opt/edgecontroller’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: fd00h/64768d Inode: 50761770 Links: 27
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Context: unconfined_u:object_r:usr_t:s0
Access: 2020-08-24 09:17:56.527509889 -0700
Modify: 2020-08-24 09:17:57.863589833 -0700
Change: 2020-08-24 09:17:57.863589833 -0700
Birth: -

TASK [openness/onprem/master : remove all Docker containers] ******************************************************************************************************************************************************************************
task path: /root/openness/openness-experience-kits/roles/openness/onprem/master/tasks/subtasks/remove_docker_containers.yml:19
fatal: [controller]: FAILED! => {
"changed": true,
"cmd": [
"docker-compose",
"rm",
"--stop",
"-f"
],
"delta": "0:00:00.192591",
"end": "2020-08-24 09:18:23.738305",
"rc": 1,
"start": "2020-08-24 09:18:23.545714"
}

STDERR:

/usr/lib64/python2.7/site-packages/cryptography/init.py:39: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
CryptographyDeprecationWarning,
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 7, in
from compose.cli.main import main
File "/usr/lib/python2.7/site-packages/compose/cli/main.py", line 17, in
import docker
File "/usr/lib/python2.7/site-packages/docker/init.py", line 2, in
from .api import APIClient
File "/usr/lib/python2.7/site-packages/docker/api/init.py", line 2, in
from .client import APIClient
File "/usr/lib/python2.7/site-packages/docker/api/client.py", line 10, in
from .build import BuildApiMixin
File "/usr/lib/python2.7/site-packages/docker/api/build.py", line 6, in
from .. import auth
File "/usr/lib/python2.7/site-packages/docker/auth.py", line 9, in
from .utils import config
File "/usr/lib/python2.7/site-packages/docker/utils/init.py", line 3, in
from .decorators import check_resource, minimum_version, update_headers
File "/usr/lib/python2.7/site-packages/docker/utils/decorators.py", line 4, in
from . import utils
File "/usr/lib/python2.7/site-packages/docker/utils/utils.py", line 13, in
from .. import tls
File "/usr/lib/python2.7/site-packages/docker/tls.py", line 5, in
from .transport import SSLHTTPAdapter
File "/usr/lib/python2.7/site-packages/docker/transport/init.py", line 11, in
from .sshconn import SSHHTTPAdapter
File "/usr/lib/python2.7/site-packages/docker/transport/sshconn.py", line 1, in
import paramiko
File "/usr/lib/python2.7/site-packages/paramiko/init.py", line 22, in
from paramiko.transport import SecurityOptions, Transport
File "/usr/lib/python2.7/site-packages/paramiko/transport.py", line 89, in
from paramiko.dsskey import DSSKey
File "/usr/lib/python2.7/site-packages/paramiko/dsskey.py", line 25, in
from cryptography.hazmat.primitives import hashes, serialization
File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/serialization/init.py", line 22, in
from cryptography.hazmat.primitives.serialization.ssh import (
File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/serialization/ssh.py", line 27, in
from bcrypt import kdf as _bcrypt_kdf
File "/usr/lib64/python2.7/site-packages/bcrypt/init.py", line 57
def gensalt(rounds: int = 12, prefix: bytes = b"2b") -> bytes:
^
SyntaxError: invalid syntax

MSG:

non-zero return code

PLAY RECAP ********************************************************************************************************************************************************************************************************************************
controller : ok=67 changed=23 unreachable=0 failed=1 skipped=37 rescued=0 ignored=0

------------------[ My version of CentOS ]--------------------------
controller root ~/openness/openness-experience-kits:> hostnamectl
Static hostname: controller
Icon name: computer-vm
Chassis: vm
Machine ID: ........2860dd8b4c6d97a0a5ef4...........
Boot ID: .......4bf219a408699bf83b27.............
Virtualization: kvm
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-957.el7.x86_64
Architecture: x86-64

------------------[ My inventory file ]--------------------------

SPDX-License-Identifier: Apache-2.0

Copyright (c) 2019-2020 Intel Corporation

[all]
controller ansible_ssh_user=root ansible_host=192.168.122.113
edge ansible_ssh_user=root ansible_host=192.168.122.22

[controller_group]
controller

[edgenode_group]
edge

[edgenode_vca_group]

[ptp_master]
controller

[ptp_slave_group]
edge

------------------[ Additional effects ]--------------------------

Additionally, this renders my ansible installation unusable, even if I remove and install again (yum remove / install ). I have tried updating python to later versions, but then get other syntax errors).

controller root ~:> ansible
/usr/lib64/python2.7/site-packages/cryptography/init.py:39: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
CryptographyDeprecationWarning,
ERROR! Unexpected Exception, this is probably a bug: invalid syntax (init.py, line 57)
the full traceback was:

Traceback (most recent call last):
File "/bin/ansible", line 92, in
mycli = getattr(import("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
File "/usr/lib/python2.7/site-packages/ansible/cli/init.py", line 22, in
from ansible.inventory.manager import InventoryManager
File "/usr/lib/python2.7/site-packages/ansible/inventory/manager.py", line 38, in
from ansible.plugins.loader import inventory_loader
File "/usr/lib/python2.7/site-packages/ansible/plugins/loader.py", line 23, in
from ansible.parsing.utils.yaml import from_yaml
File "/usr/lib/python2.7/site-packages/ansible/parsing/utils/yaml.py", line 17, in
from ansible.parsing.yaml.loader import AnsibleLoader
File "/usr/lib/python2.7/site-packages/ansible/parsing/yaml/loader.py", line 30, in
from ansible.parsing.yaml.constructor import AnsibleConstructor
File "/usr/lib/python2.7/site-packages/ansible/parsing/yaml/constructor.py", line 30, in
from ansible.parsing.vault import VaultLib
File "/usr/lib/python2.7/site-packages/ansible/parsing/vault/init.py", line 52, in
CRYPTOGRAPHY_BACKEND = default_backend()
File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/init.py", line 15, in default_backend
from cryptography.hazmat.backends.openssl.backend import backend
File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/init.py", line 7, in
from cryptography.hazmat.backends.openssl.backend import backend
File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 16, in
from cryptography import utils, x509
File "/usr/lib64/python2.7/site-packages/cryptography/x509/init.py", line 8, in
from cryptography.x509.base import (
File "/usr/lib64/python2.7/site-packages/cryptography/x509/base.py", line 22, in
from cryptography.x509.extensions import Extension, ExtensionType
File "/usr/lib64/python2.7/site-packages/cryptography/x509/extensions.py", line 22, in
from cryptography.hazmat.primitives import constant_time, serialization
File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/serialization/init.py", line 22, in
from cryptography.hazmat.primitives.serialization.ssh import (
File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/serialization/ssh.py", line 27, in
from bcrypt import kdf as _bcrypt_kdf
File "/usr/lib64/python2.7/site-packages/bcrypt/init.py", line 57
def gensalt(rounds: int = 12, prefix: bytes = b"2b") -> bytes:
^
SyntaxError: invalid syntax

Any help would be greatly appreciated.

Thanks in advance!

@archie951
Copy link

Hi @distsystemsarchitect ,
The error seems to be because of some updated cryptography package here. I suggest you uninstall it using below command on both controller and node.
pip uninstall -y cryptography

Run the deploy script after removing it.
If you face this error again, please install watchdog on both node and controller and run the below command parallelly while running the deploy_ne.sh script.
watch pip uninstall -y cryptography

Basically this command will be executed every 2 seconds, so if by any chance cryptography get installed anytime during the installation process, using watchdog will keep on clearing it automatically without manual intervention. Please let us know if this works.

Regards,
Archit

@archie951
Copy link

Hi @distsystemsarchitect,

Are you able to install OpenNESS 20.06 successfully. If you are facing any issues please let us know.

Regards,
Archit

@archie951
Copy link

Hi @distsystemsarchitect ,

The permanent fix for this issue has been solved by the OpenNESS 20.06.01 patch release. Please clone the repository again and you won't face this issue.

@amr-mokhtar : Please close this ticket. Thanks!

Regards,
Archit

@sushantsj
Copy link

sushantsj commented Sep 14, 2020

I am also facing the same issue and tried uninstalling cryptography as mentioned above but uninstalling it on controller and node, it is showing that cryptography is not installed. Can you help?

@archie951
Copy link

Hi @sushantsj,

This issue has now been resolved by the new OpenNESS 20.06.01 patch release. Could you please try doing a fresh installation once and let us know if you face the same issue. Try doing a cleanup and clone the openness-experience-kits once again

Thanks,
Archit

@sushantsj
Copy link

@archie951
Facing this issue while ./deploy_ne.sh node01
Error: TASK [machine_setup/os_setup : Install IUS Repository]
Failure Downloading https://repo.ius.io/ius-release-e17.rpm, Request Failed:<url open error [Errno-2] Name or service not known>
Any help would be appreciated

@sushantsj
Copy link

sushantsj commented Sep 14, 2020

Hi @sushantsj,

This issue has now been resolved by the new OpenNESS 20.06.01 patch release. Could you please try doing a fresh installation once and let us know if you face the same issue. Try doing a cleanup and clone the openness-experience-kits once again

Thanks,
Archit

It is the latest release and the issue is not in node but in controller

  1. ./deploy_ne.sh controller //failing related to python issue mentioned above.
  2. ./deploy_ne.sh node // failing while pulling IUS repository i.e Failure Downloading https://repo.ius.io/ius-release-e17.rpm, Request Failed:<url open error [Errno-2] Name or service not known>

@sushantsj
Copy link

Hi @archie951 ,
Cloned the latest release, still facing the same issue.
Can you help?

@archie951
Copy link

Hi @sushantsj,
Please note that there is no repository by the name of https://repo.ius.io/ius-release-e17.rpm. It is rather present in roles/machine_setup/os_setup/tasks/install_base_os_packages.yml as https://repo.ius.io/ius-release-el7.rpm .
Can you please check the value set in above yml. I hope you have not made any changes in the openness experience kits and only have changed hugepages according to your system requirement. Rest of the packages and dependencies will be installed by OpenNESS itself.
If you still face issues please share with us the log files for debugging.

Thanks and Regards,
Archit Agarwal

@sushantsj
Copy link

sushantsj commented Sep 15, 2020 via email

@archie951
Copy link

Hi @sushantsj,

Can you please let us know your controller and node hardware specifics. How much HDD and hard-disk space have been allocated and how much is left by doing df -h and free -h?

Regards,
Archit

@sushantsj
Copy link

sushantsj commented Sep 15, 2020 via email

@archie951
Copy link

Hi @sushantsj ,

The controller and node created by you are too small for OpenNESS deployment. That is the reason it is getting corrupt. Atleast 30GB or more HDD is required. Also the RAM is too less. The huge pages will never be sufficient enough. I would suggest to use atleast 16GB RAM for controller and 32GB for node.
Please refer the documentation.
https://github.com/open-ness/specs/blob/master/doc/getting-started/network-edge/controller-edge-node-setup.md#qa

Regards,
Archit

@sushantsj
Copy link

sushantsj commented Sep 15, 2020 via email

@sushantsj
Copy link

sushantsj commented Sep 21, 2020 via email

@archie951
Copy link

Please update the git version on both node and controller. I am suspecting that the current version will be 1.8.x. You need to update it to 2.1.x. For doing so please run below commands on both VM's:

yum remove -y git*
yum install -y --enablerepo=ius-archive git2u-all

Regards,
Archit

@sushantsj
Copy link

sushantsj commented Sep 21, 2020 via email

@archie951
Copy link

Oh that's great to hear Sushant. No problem at all.

@amr-mokhtar - Hi, Could you please close this ticket.
Thanks,
Archit

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants