Skip to content
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

/erlang/18.3/activate: No such file or directory #4

Open
patsevanton opened this issue Oct 17, 2019 · 9 comments
Open

/erlang/18.3/activate: No such file or directory #4

patsevanton opened this issue Oct 17, 2019 · 9 comments

Comments

@patsevanton
Copy link

Hello!

TASK [builder : Build LeoFS (Selected Branch)] ***************************************************************************************************************************************************************
fatal: [172.26.9.28]: FAILED! => {
    "changed": true, 
    "rc": 2
}

STDOUT:

/home/centos/.ansible/tmp/ansible-tmp-1571310720.6-245725389908377/build_custom.sh: line 12: /erlang/18.3/activate: No such file or directory
/home/centos/.ansible/tmp/ansible-tmp-1571310720.6-245725389908377/build_custom.sh: line 15: git: command not found
/home/centos/.ansible/tmp/ansible-tmp-1571310720.6-245725389908377/build_custom.sh: line 16: cd: /tmp/leofs_builder: No such file or directory
/home/centos/.ansible/tmp/ansible-tmp-1571310720.6-245725389908377/build_custom.sh: line 19: git: command not found
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `release'.  Stop.

cat hosts

# Please check roles/common/vars/leofs_releases for available versions
[all:vars]
leofs_version=1.2.22
build_temp_path="/tmp/leofs_builder"
build_install_path="/tmp/"
build_branch="master"
source="package"

[builder]
172.26.9.28

# nodename of leo_manager_0 and leo_manager_1 are set at group_vars/all
[leo_manager_0]
172.26.9.29

# nodename of leo_manager_0 and leo_manager_1 are set at group_vars/all
[leo_manager_1]
172.26.9.30

[leo_storage]
172.26.9.31 [email protected]
172.26.9.32 [email protected]
172.26.9.33 [email protected]

[leo_gateway]
172.26.9.34 [email protected]

[leofs_nodes:children]
leo_manager_0
leo_manager_1
leo_gateway
leo_storage
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    }, 
    "changed": false, 
    "ping": "pong"
}
172.26.9.28 | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    }, 
    "changed": false, 
    "ping": "pong"
}
172.26.9.31 | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    }, 
    "changed": false, 
    "ping": "pong"
}
172.26.9.30 | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    }, 
    "changed": false, 
    "ping": "pong"
}
172.26.9.34 | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    }, 
    "changed": false, 
    "ping": "pong"
}
172.26.9.32 | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    }, 
    "changed": false, 
    "ping": "pong"
}
172.26.9.33 | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    }, 
    "changed": false, 
    "ping": "pong"
}
@alexfrolov
Copy link

Hi, you should install git on the builder host.

@patsevanton
Copy link
Author

patsevanton commented Nov 26, 2019

  1. Disable selinux

  2. Install on all nodes gcc glibc-devel make ncurses-devel openssl-devel autoconf curl git cmake check check-devel automake systemd-devel patch gcc-c++ redhat-lsb-core nmap-ncat rpm-build lzo-devel sysstat wget sudo nc

  3. Run ansible-playbook -i hosts build_leofs.yml

Output:

TASK [builder : Build LeoFS (Selected Branch)] ***************************************************************************************************************************************************************
fatal: [172.26.9.157]: FAILED! => {
    "changed": true, 
    "rc": 2
}

STDOUT:

Cloning into '/tmp/leofs_builder'...
remote: Enumerating objects: 59, done.
remote: Counting objects: 100% (59/59), done.
remote: Compressing objects: 100% (55/55), done.
remote: Total 12118 (delta 26), reused 21 (delta 4), pack-reused 12059
Receiving objects: 100% (12118/12118), 30.73 MiB | 17.05 MiB/s, done.
Resolving deltas: 100% (7188/7188), done.
Branch master set up to track remote branch master from origin.
Switched to a new branch 'master'
/usr/bin/env: escript: No such file or directory
make: *** [deps] Error 127
for reltool_config in rel/leo_*/reltool.config.in; do \
	./make_reltool.sh no $reltool_config > $(echo $reltool_config | sed s/.in$//); \
done
/usr/bin/env: escript: No such file or directory
make: *** [release] Error 127

STDERR:

Shared connection to 172.26.9.157 closed.

MSG:

non-zero return code

@alexfrolov
Copy link

Hi!

You should install erlang/otp into your building node. The Erlang rpm packages can be found here:
https://github.com/rabbitmq/erlang-rpm/releases

I am using erlang 20.3.8.23. The latest ones do not work with LeoFS.

Best,
Alex

@patsevanton
Copy link
Author

patsevanton commented Nov 27, 2019

  1. Disable selinux

  2. Install on all nodes gcc glibc-devel make ncurses-devel openssl-devel autoconf curl git cmake check check-devel automake systemd-devel patch gcc-c++ redhat-lsb-core nmap-ncat rpm-build lzo-devel sysstat wget sudo nc

  3. install with yum erlang-20.3.8.23-1.el7.x86_64.rpm

---
- hosts: all
  gather_facts: False
  become: yes
  tasks:
    - name: Remote erlang-20.3.8.23-1.el7.x86_64.rpm install with yum
      yum: name=https://github.com/rabbitmq/erlang-rpm/releases/download/v20.3.8.23/erlang-20.3.8.23-1.el7.x86_64.rpm
  1. ansible-playbook -i hosts build_leofs.yml
  2. ansible-playbook -i hosts install_leofs.yml
  3. ansible-playbook -i hosts config_leofs.yml
    Output:
TASK [common : Creates directory /usr/local/leofs/1.2.22//leo_manager_0//work/ord_reda/] *********************************************************************************************************************
failed: [172.26.9.166] (item=/usr/local/leofs/1.2.22//leo_manager_0//work/ord_reda/) => {
    "changed": false, 
    "gid": 0, 
    "group": "root", 
    "item": "/usr/local/leofs/1.2.22//leo_manager_0//work/ord_reda/", 
    "mode": "0755", 
    "owner": "root", 
    "path": "/usr/local/leofs/1.2.22//leo_manager_0//work/ord_reda/", 
    "secontext": "unconfined_u:object_r:usr_t:s0", 
    "size": 6, 
    "state": "directory", 
    "uid": 0
}
MSG:
chown failed: failed to look up user leofs
  1. Create user group leofs:
---
- hosts: all
  gather_facts: False
  become: yes
  tasks:
    - group:
        name: leofs
        state: present
    - name: Add the user 'leofs', appending the group 'leofs' to the user's groups
      user:
        name: leofs
        groups: leofs
        append: yes
  1. ansible-playbook -i hosts config_leofs.yml
  2. ansible-playbook -i hosts start_leofs.yml
    Output:
TASK [leo_manager_0 : Run LeoManager (Primary)] **************************************************************************************************************************************************************
fatal: [172.26.9.166]: FAILED! => {
    "changed": true, 
    "cmd": [
        "bin/leo_manager", 
        "start"
    ], 
    "delta": "0:00:00.337194", 
    "end": "2019-11-27 05:14:25.311043", 
    "rc": 1, 
    "start": "2019-11-27 05:14:24.973849"
}

STDOUT:

vm.args needs to have either -name or -sname parameter.

STDERR:

mv: missing destination file operand after ‘/usr/local/leofs/1.2.22/leo_manager_0/etc/app.config’
Try 'mv --help' for more information.
mv: missing destination file operand after ‘/usr/local/leofs/1.2.22/leo_manager_0/etc/vm.args’
Try 'mv --help' for more information.
grep: /usr/local/leofs/1.2.22/leo_manager_0/etc/vm.args: No such file or directory

MSG:

non-zero return code

@alexfrolov
Copy link

alexfrolov commented Nov 27, 2019

I had the same problems with leofs. Try to use root.

@patsevanton
Copy link
Author

I had the same problems with leofs. Try to use root.

What is root?
Write become: yes to ansible-playbook?

@patsevanton
Copy link
Author

patsevanton commented Dec 2, 2019

New Create user group leofs:

---
- hosts: all
  gather_facts: False
  become: yes
  tasks:
    - group:
        name: leofs
        state: present

    - name: Allow 'wheel' group to have passwordless sudo
      lineinfile:
        dest: /etc/sudoers
        state: present
        regexp: '^%wheel'
        line: '%wheel ALL=(ALL) NOPASSWD: ALL'
        validate: 'visudo -cf %s'

    - name: Add the user 'leofs', appending the group 'leofs' to the user's groups
      user:
        name: leofs
        groups: wheel
        append: yes

@patsevanton
Copy link
Author

Install netcat on localhost where run aplybook

yum install -y nc

@patsevanton
Copy link
Author

Add become_user: root to every task in control.yml.
For examle:

- name: Run LeoGateway
  command: bin/leo_gateway start
  become: true
  become_user: root
  when: control_leofs is defined and control_leofs == "start"
  args:
    chdir: "{{ leofs_module_path }}"
  tags:
      - run

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

No branches or pull requests

2 participants