{"action":"created","issue":{"url":"https://api.github.com/repos/reciprocity/ggrc-core/issues/2226","labels_url":"https://api.github.com/repos/reciprocity/ggrc-core/issues/2226/labels{/name}","comments_url":"https://api.github.com/repos/reciprocity/ggrc-core/issues/2226/comments","events_url":"https://api.github.com/repos/reciprocity/ggrc-core/issues/2226/events","html_url":"https://github.com/reciprocity/ggrc-core/pull/2226","id":56102951,"number":2226,"title":"Move npm sections to end of tasks main.yml","user":{"login":"dandv","id":33569,"avatar_url":"https://avatars.githubusercontent.com/u/33569?v=3","gravatar_id":"","url":"https://api.github.com/users/dandv","html_url":"https://github.com/dandv","followers_url":"https://api.github.com/users/dandv/followers","following_url":"https://api.github.com/users/dandv/following{/other_user}","gists_url":"https://api.github.com/users/dandv/gists{/gist_id}","starred_url":"https://api.github.com/users/dandv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dandv/subscriptions","organizations_url":"https://api.github.com/users/dandv/orgs","repos_url":"https://api.github.com/users/dandv/repos","events_url":"https://api.github.com/users/dandv/events{/privacy}","received_events_url":"https://api.github.com/users/dandv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-31T00:24:25Z","updated_at":"2015-02-04T14:20:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/reciprocity/ggrc-core/pulls/2226","html_url":"https://github.com/reciprocity/ggrc-core/pull/2226","diff_url":"https://github.com/reciprocity/ggrc-core/pull/2226.diff","patch_url":"https://github.com/reciprocity/ggrc-core/pull/2226.patch"},"body":"Installing npm packages fails in certain circumstances (see #2118). Moving these sections to the end prevents aborting subsequent provisioning operations.\r\n\r\nI've tested this on Windows and provisioning worked well, right up before failing to install npm modules. Since those were at the end anyway, there's no longer a need to comment out the npm sections, and if we figure out what causes the npm install failure, we won't have to uncomment them.\r\n\r\nHere's the log.\r\n\r\n```\r\nWelcome to your Vagrant-built virtual machine.\r\nLast login: Fri Sep 14 06:23:18 2012 from 10.0.2.2\r\n\r\nvagrant@precise64:~$ echo 'localhost ansible_connection=local' >/tmp/local-inventory\r\n\r\nvagrant@precise64:~$ sudo apt-get update\r\nIgn http://us.archive.ubuntu.com precise InRelease\r\n[...]\r\nGet:65 http://us.archive.ubuntu.com precise-backports/universe Translation-en [34.4 kB]\r\nFetched 5,702 kB in 15s (369 kB/s)\r\nReading package lists... Done\r\n\r\nvagrant@precise64:~$ sudo aptitude install python-pip python-all-dev -y\r\nThe following NEW packages will be installed:\r\n  libexpat1-dev{a} libpython2.7{a} python-all{a} python-all-dev python-dev{a} python-pip python-pkg-resources{a} python-setuptools{a} python2.7-dev{a}\r\nThe following packages will be upgraded:\r\n  libexpat1 python python-minimal python2.7 python2.7-minimal\r\n5 packages upgraded, 9 newly installed, 0 to remove and 173 not upgraded.\r\nNeed to get 36.3 MB of archives. After unpacking 45.0 MB will be used.\r\n[...]\r\nCurrent status: 173 updates [-5].\r\n\r\nvagrant@precise64:~$ sudo pip install ansible markupsafe\r\nDownloading/unpacking ansible\r\n  Downloading ansible-1.8.2.tar.gz (754Kb): 754Kb downloaded\r\n  Running setup.py egg_info for package ansible\r\n\r\n    no previously-included directories found matching 'lib/ansible/modules/core/.git'\r\n    no previously-included directories found matching 'lib/ansible/modules/extras/.git'\r\nDownloading/unpacking markupsafe\r\n  Downloading MarkupSafe-0.23.tar.gz\r\n  Running setup.py egg_info for package markupsafe\r\n\r\nDownloading/unpacking paramiko (from ansible)\r\n  Downloading paramiko-1.15.2.tar.gz (1.2Mb): 1.2Mb downloaded\r\n  Running setup.py egg_info for package paramiko\r\n\r\nDownloading/unpacking jinja2 (from ansible)\r\n  Downloading Jinja2-2.7.3.tar.gz (378Kb): 378Kb downloaded\r\n  Running setup.py egg_info for package jinja2\r\n\r\n    warning: no files found matching '*' under directory 'custom_fixers'\r\n    warning: no previously-included files matching '*' found under directory 'docs/_build'\r\n    warning: no previously-included files matching '*.pyc' found under directory 'jinja2'\r\n    warning: no previously-included files matching '*.pyc' found under directory 'docs'\r\n    warning: no previously-included files matching '*.pyo' found under directory 'jinja2'\r\n    warning: no previously-included files matching '*.pyo' found under directory 'docs'\r\nDownloading/unpacking PyYAML (from ansible)\r\n  Downloading PyYAML-3.11.tar.gz (248Kb): 248Kb downloaded\r\n  Running setup.py egg_info for package PyYAML\r\n\r\nRequirement already satisfied (use --upgrade to upgrade): distribute in /usr/lib/python2.7/dist-packages (from ansible)\r\nDownloading/unpacking pycrypto>=2.6 (from ansible)\r\n  Downloading pycrypto-2.6.1.tar.gz (446Kb): 446Kb downloaded\r\n  Running setup.py egg_info for package pycrypto\r\n\r\nDownloading/unpacking ecdsa>=0.11 (from paramiko->ansible)\r\n  Downloading ecdsa-0.11.tar.gz (45Kb): 45Kb downloaded\r\n  Running setup.py egg_info for package ecdsa\r\n\r\nInstalling collected packages: ansible, markupsafe, paramiko, jinja2, PyYAML, pycrypto, ecdsa\r\n  Running setup.py install for ansible\r\n    changing mode of build/scripts-2.7/ansible from 644 to 755\r\n    changing mode of build/scripts-2.7/ansible-playbook from 644 to 755\r\n    changing mode of build/scripts-2.7/ansible-pull from 644 to 755\r\n    changing mode of build/scripts-2.7/ansible-doc from 644 to 755\r\n    changing mode of build/scripts-2.7/ansible-galaxy from 644 to 755\r\n    changing mode of build/scripts-2.7/ansible-vault from 644 to 755\r\n\r\n    no previously-included directories found matching 'lib/ansible/modules/core/.git'\r\n    no previously-included directories found matching 'lib/ansible/modules/extras/.git'\r\n    changing mode of /usr/local/bin/ansible-playbook to 755\r\n    changing mode of /usr/local/bin/ansible-galaxy to 755\r\n    changing mode of /usr/local/bin/ansible-vault to 755\r\n    changing mode of /usr/local/bin/ansible to 755\r\n    changing mode of /usr/local/bin/ansible-doc to 755\r\n    changing mode of /usr/local/bin/ansible-pull to 755\r\n  Running setup.py install for markupsafe\r\n\r\n    building 'markupsafe._speedups' extension\r\n    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c markupsafe/_speedups.c -o build/temp.linux-x86_64-2.7/markupsafe/_speedups.o\r\n    gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/markupsafe/_speedups.o -o build/lib.linux-x86_64-2.7/markupsafe/_speedups.so\r\n  Running setup.py install for paramiko\r\n\r\n  Running setup.py install for jinja2\r\n\r\n    warning: no files found matching '*' under directory 'custom_fixers'\r\n    warning: no previously-included files matching '*' found under directory 'docs/_build'\r\n    warning: no previously-included files matching '*.pyc' found under directory 'jinja2'\r\n    warning: no previously-included files matching '*.pyc' found under directory 'docs'\r\n    warning: no previously-included files matching '*.pyo' found under directory 'jinja2'\r\n    warning: no previously-included files matching '*.pyo' found under directory 'docs'\r\n  Running setup.py install for PyYAML\r\n    checking if libyaml is compilable\r\n    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/check_libyaml.c -o build/temp.linux-x86_64-2.7/check_libyaml.o\r\n    build/temp.linux-x86_64-2.7/check_libyaml.c:2:18: fatal error: yaml.h: No such file or directory\r\n    compilation terminated.\r\n\r\n    libyaml is not found or a compiler error: forcing --without-libyaml\r\n    (if libyaml is installed correctly, you may need to\r\n     specify the option --include-dirs or uncomment and\r\n     modify the parameter include_dirs in setup.cfg)\r\n\r\n  Running setup.py install for pycrypto\r\n[...]\r\n    configure: creating ./config.status\r\n    config.status: creating src/config.h\r\n    warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.\r\n    building 'Crypto.Hash._MD2' extension\r\n    gcc [...]\r\n\r\n  Running setup.py install for ecdsa\r\n\r\nSuccessfully installed ansible markupsafe paramiko jinja2 PyYAML pycrypto ecdsa\r\nCleaning up...\r\n\r\nvagrant@precise64:~$ sudo ansible-playbook -i /tmp/local-inventory /vagrant/provision/site.yml\r\n\r\nPLAY [Reciprocity gGRC] *******************************************************\r\n\r\nGATHERING FACTS ***************************************************************\r\nok: [localhost]\r\n\r\nTASK: [add the node.js PPA] ***************************************************\r\nchanged: [localhost]\r\n\r\nTASK: [update apt] ************************************************************\r\nok: [localhost]\r\n\r\nTASK: [common | install common packages] **************************************\r\nchanged: [localhost] => (item={'name': 'curl'})\r\nchanged: [localhost] => (item={'name': 'git-core'})\r\nok: [localhost] => (item={'name': 'python-pip'})\r\n\r\nTASK: [mysql | install mysql] *************************************************\r\nchanged: [localhost]\r\n\r\nTASK: [ggrc | install requirements] *******************************************\r\nchanged: [localhost]\r\n\r\nTASK: [ggrc | install packages] ***********************************************\r\nchanged: [localhost] => (item={'name': 'unzip'})\r\nchanged: [localhost] => (item={'name': 'zip'})\r\nchanged: [localhost] => (item={'name': 'make'})\r\nchanged: [localhost] => (item={'name': 'python-virtualenv'})\r\nchanged: [localhost] => (item={'name': 'fabric'})\r\nchanged: [localhost] => (item={'name': 'python-mysqldb'})\r\nchanged: [localhost] => (item={'name': 'python-imaging'})\r\nchanged: [localhost] => (item={'name': 'sqlite3'})\r\nok: [localhost] => (item={'name': 'python-dev'})\r\nchanged: [localhost] => (item={'name': 'rubygems'})\r\nchanged: [localhost] => (item={'name': 'nodejs'})\r\n\r\nTASK: [ggrc | create development directories] *********************************\r\nchanged: [localhost] => (item={'name': '/vagrant-dev'})\r\nchanged: [localhost] => (item={'name': '/vagrant-dev/opt'})\r\nchanged: [localhost] => (item={'name': '/vagrant-dev/tmp'})\r\nok: [localhost] => (item={'name': '/vagrant/tmp'})\r\n\r\nTASK: [ggrc | prepare development virtualenv] *********************************\r\nchanged: [localhost]\r\n\r\nTASK: [ggrc | install gems] ***************************************************\r\nchanged: [localhost] => (item={'name': 'sass'})\r\nchanged: [localhost] => (item={'name': 'compass'})\r\n\r\nTASK: [ggrc | run make] *******************************************************\r\nchanged: [localhost]\r\n\r\nTASK: [ggrc | change root password] *******************************************\r\nchanged: [localhost]\r\n\r\nTASK: [ggrc | create databases] ***********************************************\r\nchanged: [localhost] => (item={'name': 'ggrcdev'})\r\nchanged: [localhost] => (item={'name': 'ggrctest'})\r\n\r\nTASK: [ggrc | configure bash] *************************************************\r\nchanged: [localhost]\r\n\r\nTASK: [ggrc | install global npm modules] *************************************\r\nchanged: [localhost] => (item={'name': 'nodeunit'})\r\nchanged: [localhost] => (item={'name': 'pegjs'})\r\nchanged: [localhost] => (item={'name': 'karma-cli'})\r\nchanged: [localhost] => (item={'name': 'jasmine-core'})\r\nchanged: [localhost] => (item={'name': 'mkdirp'})\r\n\r\nTASK: [ggrc | install local npm modules] **************************************\r\nfailed: [localhost] => (item={'name': 'karma'}) => {\"cmd\": \"/usr/bin/npm install karma --registry http://registry.npmjs.org/\", \"failed\": true, \"item\": {\"name\": \"karma\"}, \"rc\": 255}\r\nstderr: npm WARN optional dep failed, continuing fsevents@0.3.5\r\nnpm ERR! Error: UNKNOWN, symlink '../rimraf/bin.js'\r\nnpm ERR! If you need help, you may report this *entire* log,\r\nnpm ERR! including the npm and node versions, at:\r\nnpm ERR!     <http://github.com/npm/npm/issues>\r\n\r\nnpm ERR! System Linux 3.2.0-23-generic\r\nnpm ERR! command \"/usr/bin/node\" \"/usr/bin/npm\" \"install\" \"karma\" \"--registry\" \"http://registry.npmjs.org/\"\r\nnpm ERR! cwd /vagrant/node_modules\r\nnpm ERR! node -v v0.10.33\r\nnpm ERR! npm -v 1.4.28\r\nnpm ERR! path ../rimraf/bin.js\r\nnpm ERR! code UNKNOWN\r\nnpm ERR! errno -1\r\nnpm ERR! not ok code 0\r\n\r\nmsg: npm WARN optional dep failed, continuing fsevents@0.3.5\r\nnpm ERR! Error: UNKNOWN, symlink '../rimraf/bin.js'\r\nnpm ERR! If you need help, you may report this *entire* log,\r\nnpm ERR! including the npm and node versions, at:\r\nnpm ERR!     <http://github.com/npm/npm/issues>\r\n\r\nnpm ERR! System Linux 3.2.0-23-generic\r\nnpm ERR! command \"/usr/bin/node\" \"/usr/bin/npm\" \"install\" \"karma\" \"--registry\" \"http://registry.npmjs.org/\"\r\nnpm ERR! cwd /vagrant/node_modules\r\nnpm ERR! node -v v0.10.33\r\nnpm ERR! npm -v 1.4.28\r\nnpm ERR! path ../rimraf/bin.js\r\nnpm ERR! code UNKNOWN\r\nnpm ERR! errno -1\r\nnpm ERR! not ok code 0\r\nok: [localhost] => (item={'name': 'karma-jasmine'})\r\n\r\nFATAL: all hosts have already failed -- aborting\r\n\r\nPLAY RECAP ********************************************************************\r\n           to retry, use: --limit @/home/vagrant/site.retry\r\n\r\nlocalhost                  : ok=15   changed=13   unreachable=0    failed=1\r\n\r\nvagrant@precise64:~$ npm install nodeunit pegjs mkdirp jasmine-core karma karma-cli karma-jasmine\r\nnpm WARN optional dep failed, continuing fsevents@0.3.5\r\n\r\n> ws@0.4.32 install /home/vagrant/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws\r\n> (node-gyp rebuild 2> builderror.log) || (exit 0)\r\n\r\nmake: Entering directory `/home/vagrant/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'\r\n  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o\r\n  SOLINK_MODULE(target) Release/obj.target/bufferutil.node\r\n  SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished\r\n  COPY Release/bufferutil.node\r\n  CXX(target) Release/obj.target/validation/src/validation.o\r\n  SOLINK_MODULE(target) Release/obj.target/validation.node\r\n  SOLINK_MODULE(target) Release/obj.target/validation.node: Finished\r\n  COPY Release/validation.node\r\nmake: Leaving directory `/home/vagrant/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'\r\nkarma-jasmine@0.3.5 node_modules/karma-jasmine\r\n\r\nmkdirp@0.5.0 node_modules/mkdirp\r\n└── minimist@0.0.8\r\n\r\npegjs@0.8.0 node_modules/pegjs\r\n\r\nkarma-cli@0.0.4 node_modules/karma-cli\r\n└── resolve@0.5.1\r\n\r\njasmine-core@2.1.3 node_modules/jasmine-core\r\n\r\nnodeunit@0.9.0 node_modules/nodeunit\r\n└── tap@0.5.0 (yamlish@0.0.6, deep-equal@0.0.0, inherits@2.0.1, buffer-equal@0.0.1, slide@1.1.6, nopt@2.2.1, glob@3.2.11, difflet@0.2.6, runforcover@0.0.2)\r\n\r\nkarma@0.12.31 node_modules/karma\r\n├── di@0.0.1\r\n├── graceful-fs@2.0.3\r\n├── rimraf@2.2.8\r\n├── colors@0.6.2\r\n├── mime@1.2.11\r\n├── q@0.9.7\r\n├── minimatch@0.2.14 (sigmund@1.0.0, lru-cache@2.5.0)\r\n├── optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.10)\r\n├── source-map@0.1.43 (amdefine@0.1.0)\r\n├── glob@3.2.11 (inherits@2.0.1, minimatch@0.3.0)\r\n├── chokidar@1.0.0-rc3 (async-each@0.1.6, is-binary-path@1.0.0, glob-parent@1.0.0, anymatch@1.1.0, readdirp@1.3.0)\r\n├── log4js@0.6.22 (semver@1.1.4, async@0.2.10, readable-stream@1.0.33)\r\n├── http-proxy@0.10.4 (pkginfo@0.3.0, utile@0.2.1)\r\n├── lodash@2.4.1\r\n├── connect@2.26.6 (fresh@0.2.4, cookie@0.1.2, pause@0.0.1, cookie-signature@1.0.5, response-time@2.0.1, vhost@3.0.0, on-headers@1.0.0, basic-auth-connect@1.0.0, media-typer@0.3.0, bytes@1.0.0, parseurl@1.3.0, cookie-parser@1.3.3, depd@0.4.5, qs@2.2.4, connect-timeout@1.3.0, finalhandler@0.2.0, debug@2.0.0, method-override@2.2.0, morgan@1.3.2, serve-favicon@2.1.7, csurf@1.6.5, multiparty@3.3.2, serve-static@1.6.4, express-session@1.8.2, body-parser@1.8.4, errorhandler@1.2.4, type-is@1.5.6, serve-index@1.2.1, compression@1.1.2)\r\n├── useragent@2.0.10 (lru-cache@2.2.4)\r\n└── socket.io@0.9.16 (base64id@0.1.0, policyfile@0.0.4, redis@0.7.3, socket.io-client@0.9.16)\r\nvagrant@precise64:~$ logout\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/reciprocity/ggrc-core/issues/comments/72861250","html_url":"https://github.com/reciprocity/ggrc-core/pull/2226#issuecomment-72861250","issue_url":"https://api.github.com/repos/reciprocity/ggrc-core/issues/2226","id":72861250,"user":{"login":"Swizec","id":56883,"avatar_url":"https://avatars.githubusercontent.com/u/56883?v=3","gravatar_id":"","url":"https://api.github.com/users/Swizec","html_url":"https://github.com/Swizec","followers_url":"https://api.github.com/users/Swizec/followers","following_url":"https://api.github.com/users/Swizec/following{/other_user}","gists_url":"https://api.github.com/users/Swizec/gists{/gist_id}","starred_url":"https://api.github.com/users/Swizec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Swizec/subscriptions","organizations_url":"https://api.github.com/users/Swizec/orgs","repos_url":"https://api.github.com/users/Swizec/repos","events_url":"https://api.github.com/users/Swizec/events{/privacy}","received_events_url":"https://api.github.com/users/Swizec/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T14:20:15Z","updated_at":"2015-02-04T14:20:15Z","body":"@zidarsk8 no, there is no issue per se. But as long as we're here, might as well proper fix it, you know."}}