Awx: Issue running the playbook on fedora 26

Created on 10 Sep 2017  路  3Comments  路  Source: ansible/awx

Summary

While running the install playbook, it fails because it cannot build image:

TASK [image_build : Build AWX distribution] ************************************************************************************************************** fatal: [localhost -> localhost]: FAILED! => {"changed": true, "cmd": "make sdist", "delta": "0:46:25.292094", "end": "2017-09-10 01:19:01.122102", "failed": true, "rc": 2, "start": "2017-09-10 00:32:35.830008", "stderr": "npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue\nnpm WARN prefer global [email protected] should be installed with -g\nmake[1]: g++: Command not found\nmake[1]: *** [contextify.target.mk:94: Release/obj.target/contextify/src/contextify.o] Error 127\ngyp ERR! build error \ngyp ERR! stack Error:makefailed with exit code: 2\ngyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/lib/build.js:276:23)\ngyp ERR! stack at emitTwo (events.js:106:13)\ngyp ERR! stack at ChildProcess.emit (events.js:191:7)\ngyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)\ngyp ERR! System Linux 4.12.9-300.fc26.x86_64\ngyp ERR! command \"/usr/bin/node\" \"/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"\ngyp ERR! cwd /root/awx/awx/ui/node_modules/contextify\ngyp ERR! node -v v6.11.2\ngyp ERR! node-gyp -v v3.4.0\ngyp ERR! not ok \nnpm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):\nnpm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {\"os\":\"darwin\",\"arch\":\"any\"} ...

Environment

  • Operating System: Fedora 26 (Cloud Edition)

Steps To Reproduce:

  1. Install VM fedora 26 with Fedora-Cloud-Base-26-1.5.x86_64.qcow2
    # uname -a Linux fedora-srv.example.local 4.12.9-300.fc26.x86_64 #1 SMP Fri Aug 25 13:09:43 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  2. Install prerequisites
    # dnf install docker nodejs npm make git gettext ansible
    # pip install docker-py
  3. Clone the repos
    # git clone https://github.com/ansible/awx.git
    # git clone https://github.com/ansible/awx-logos.git
  4. Start docker
    # systemctl enable docker
    # systemctl start docker
  5. Modify inventory
    # grep awx_official inventory
    awx_official=true
  6. Running the playbook
    # ansible-playbook -i inventory install.yml

Expected Results:

Installed Ansible AWX

Actual Results:

PLAY RECAP ***************************************
localhost : ok=10 changed=2 unreachable=0 failed=1

Additional Information:

Full output error message:

https://pastebin.com/g70Jxi6S

dnf list docker nodejs npm make git gettext ansible

Last metadata expiration check: 2:12:27 ago on Sat 09 Sep 2017 11:28:17 PM UTC.
Installed Packages
ansible.noarch 2.3.2.0-1.fc26 @updates
docker.x86_64 2:1.13.1-22.gitb5e3294.fc26 @updates
gettext.x86_64 0.19.8.1-9.fc26 @anaconda
git.x86_64 2.13.5-2.fc26 @updates
make.x86_64 1:4.2.1-2.fc26 @anaconda
nodejs.x86_64 1:6.11.2-1.fc26 @updates
npm.x86_64 1:3.10.10-1.6.11.2.1.fc26 @updates
Available Packages
nodejs.i686 1:6.11.2-1.fc26 updates

pip list docker-py

ansible (2.3.2.0)
asn1crypto (0.22.0)
Babel (2.3.4)
backports.ssl-match-hostname (3.5.0.1)
bcrypt (3.1.3)
certifi (2017.7.27.1)
cffi (1.9.1)
chardet (3.0.4)
cryptography (2.0.2)
decorator (4.0.11)
docker-py (1.10.6)
docker-pycreds (0.2.1)
enum34 (1.1.6)
gssapi (1.2.0)
httplib2 (0.9.2)
idna (2.5)
ipaddress (1.0.16)
Jinja2 (2.9.6)
jmespath (0.9.0)
MarkupSafe (0.23)
paramiko (2.2.1)
pip (9.0.1)
ply (3.9)
pyasn1 (0.2.3)
pycparser (2.14)
pycrypto (2.6.1)
PyNaCl (1.1.1)
python-keyczar (0.71rc0)
pytz (2016.10)
PyYAML (3.12)
requests (2.18.4)
setuptools (36.2.0)
six (1.10.0)
urllib3 (1.22)
websocket-client (0.44.0)`

getenforce

Permissive

make --version

GNU Make 4.2.1
Built for x86_64-redhat-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

npm -v minimatch

3.10.10

Most helpful comment

you need make & gcc-c++ to build native npm modules

All 3 comments

you need make & gcc-c++ to build native npm modules

Thanks a lot @Zokormazo !

After installing gcc-c++, the installation sends me another dependency error:
# dnf -y install gcc-c++
# ansible-playbook -i inventory install.yml
...
TASK [image_build : Stage sdist] ********************************************************************
fatal: [localhost -> localhost]: FAILED! => {"changed": false, "checksum": "03e1c699b3f5dd0c3200355a3ead210184a876b6", "failed": true, "msg": "Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!"}
to retry, use: --limit @/root/awx/installer/install.retry
PLAY RECAP ******************************************************************************************
localhost : ok=14 changed=1 unreachable=0 failed=1

And after installing the dependency mentioned, the image build was executed correctly:
# dnf -y install libselinux-python

Should these dependencies be included in the documentation?

This will be covered here: https://github.com/ansible/awx/pull/30

Was this page helpful?
0 / 5 - 0 ratings

Related issues

augabet picture augabet  路  3Comments

gamuniz picture gamuniz  路  3Comments

philippwiesner picture philippwiesner  路  4Comments

mwiora picture mwiora  路  3Comments

Gui13 picture Gui13  路  3Comments