You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by nickwallen <gi...@git.apache.org> on 2018/10/20 19:42:08 UTC

[GitHub] metron pull request #1244: Fix issue with idempotency of Elasticsearch MPack...

GitHub user nickwallen opened a pull request:

    https://github.com/apache/metron/pull/1244

    Fix issue with idempotency of Elasticsearch MPack installation step

    When re-provisioning the development environment, the "Install Elasticsearch MPack on Ambari Host" step will fail.  This step needs to be idempotent so it succeeds when re-provisioned.
    
    ## Testing
    
    1. Spin-up a development environment.
    
        ```
        cd metron-deployment/development/centos6
        vagrant up
        ```
    
    1. Re-provision the same environment after the fist completes.
    
        ```
        vagrant --ansible-skip-tags="build,sensors" provision
        ```
    
    1. If the re-provision makes it past the "Install Elasticsearch MPack on Ambari Host" step, the change is good.
    
    ## Pull Request Checklist
    
    - [ ] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel).
    - [ ] Does your PR title start with METRON-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
    - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)?
    
    - [ ] Have you included steps to reproduce the behavior or problem that is being changed or addressed?
    - [ ] Have you included steps or a guide to how the change may be verified and tested manually?
    - [ ] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via:
    - [ ] Have you written or updated unit tests and or integration tests to verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
    - [ ] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent?


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nickwallen/metron METRON-1839

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/metron/pull/1244.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1244
    
----
commit 209b971eea31bb773c146eae46b5b5c31e9a92b1
Author: Nick Allen <ni...@...>
Date:   2018-10-18T19:09:53Z

    Fix issue with idempotency of Elasticsearch MPack installation step

----


---

[GitHub] metron issue #1244: METRON-1839 Install Elasticsearch MPack Step in Ansible ...

Posted by anandsubbu <gi...@git.apache.org>.
Github user anandsubbu commented on the issue:

    https://github.com/apache/metron/pull/1244
  
    Hey @nickwallen , I am seeing an error at the `ambari_gather_facts : Ask Ambari: core_site_tag` step when trying to validate the fix. 
    
    1. Re-created the problem first by:
    a) Running `vagrant up`
    b) Then attempting `vagrant provision` again
    c) Noticed the following error:
    ```
    TASK [ambari_master : Install Elasticsearch MPack on Ambari Host] **************
    fatal: [node1]: FAILED! => {"changed": true, "cmd": "ambari-server install-mpack --mpack=/tmp/elasticsearch_mpack-0.6.1.0.tar.gz", "delta": "0:00:00.433435", "end": "2018-10-21 18:12:29.939320", "msg": "non-zero return code", "rc": 255, "start": "2018-10-21 18:12:29.505885", "stderr": "", "stderr_lines": [], "stdout": "Using python  /usr/bin/python\nInstalling management pack\nERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!\nERROR: Exiting with exit code -1. \nREASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "stdout_lines": ["Using python  /usr/bin/python", "Installing management pack", "ERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "ERROR: Exiting with exit code -1. ", "REASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!"]}
    	to retry, use: --limit @/Users/asubramanian/Desktop/Metron/anand-metron-fork/metron-latest/metron/metron-deployment/development/centos6/ansible/playbook.retry
    ```
    
    2. Destroyed the VM, applied the fix and 
    a) Running `vagrant up`
    b) Then ran `vagrant --ansible-skip-tags="build,sensors" provision` after which I am seeing the below error:
    ```
    <snip>
    TASK [ambari_gather_facts : Ask Ambari: namenode_host] *************************
    changed: [node1]
    
    TASK [ambari_gather_facts : set_fact] ******************************************
    ok: [node1]
    
    TASK [ambari_gather_facts : Ask Ambari: core_site_tag] *************************
    fatal: [node1]: FAILED! => {"changed": true, "cmd": "curl -s -u admin:admin -X GET -H \"X-Requested-By: ambari\" 'http://node1:8080/api/v1/clusters/metron_cluster/hosts/node1/host_components/NAMENODE' | python -c 'import sys, json; print json.load(sys.stdin)[\"HostRoles\"][\"actual_configs\"][\"core-site\"][\"default\"]'", "delta": "0:00:00.060271", "end": "2018-10-21 23:19:31.928568", "msg": "non-zero return code", "rc": 1, "start": "2018-10-21 23:19:31.868297", "stderr": "Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nKeyError: 'core-site'", "stderr_lines": ["Traceback (most recent call last):", "  File \"<string>\", line 1, in <module>", "KeyError: 'core-site'"], "stdout": "", "stdout_lines": []}
    	to retry, use: --limit @/Users/asubramanian/Desktop/Metron/anand-metron-fork/metron-latest/metron/metron-deployment/development/centos6/ansible/playbook.retry
    ```
    
    Am I missing something?


---

[GitHub] metron issue #1244: METRON-1839 Install Elasticsearch MPack Step in Ansible ...

Posted by anandsubbu <gi...@git.apache.org>.
Github user anandsubbu commented on the issue:

    https://github.com/apache/metron/pull/1244
  
    Hey @nickwallen , I am seeing an error at the `ambari_gather_facts : Ask Ambari: core_site_tag` step when trying to validate the fix. 
    
    1. Re-created the problem first by:
    a) Running `vagrant up`
    b) Then attempting `vagrant provision` again
    c) Noticed the following error:
    ```
    TASK [ambari_master : Install Elasticsearch MPack on Ambari Host] **************
    fatal: [node1]: FAILED! => {"changed": true, "cmd": "ambari-server install-mpack --mpack=/tmp/elasticsearch_mpack-0.6.1.0.tar.gz", "delta": "0:00:00.433435", "end": "2018-10-21 18:12:29.939320", "msg": "non-zero return code", "rc": 255, "start": "2018-10-21 18:12:29.505885", "stderr": "", "stderr_lines": [], "stdout": "Using python  /usr/bin/python\nInstalling management pack\nERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!\nERROR: Exiting with exit code -1. \nREASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "stdout_lines": ["Using python  /usr/bin/python", "Installing management pack", "ERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "ERROR: Exiting with exit code -1. ", "REASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!"]}
    	to retry, use: --limit @/Users/asubramanian/Desktop/Metron/anand-metron-fork/metron-latest/metron/metron-deployment/development/centos6/ansible/playbook.retry
    ```
    
    2. Destroyed the VM, applied the fix and 
    a) Running `vagrant up`
    b) Then ran `vagrant --ansible-skip-tags="build,sensors" provision` after which I am seeing the below error:
    ```
    <snip>
    TASK [ambari_gather_facts : Ask Ambari: namenode_host] *************************
    changed: [node1]
    
    TASK [ambari_gather_facts : set_fact] ******************************************
    ok: [node1]
    
    TASK [ambari_gather_facts : Ask Ambari: core_site_tag] *************************
    fatal: [node1]: FAILED! => {"changed": true, "cmd": "curl -s -u admin:admin -X GET -H \"X-Requested-By: ambari\" 'http://node1:8080/api/v1/clusters/metron_cluster/hosts/node1/host_components/NAMENODE' | python -c 'import sys, json; print json.load(sys.stdin)[\"HostRoles\"][\"actual_configs\"][\"core-site\"][\"default\"]'", "delta": "0:00:00.060271", "end": "2018-10-21 23:19:31.928568", "msg": "non-zero return code", "rc": 1, "start": "2018-10-21 23:19:31.868297", "stderr": "Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nKeyError: 'core-site'", "stderr_lines": ["Traceback (most recent call last):", "  File \"<string>\", line 1, in <module>", "KeyError: 'core-site'"], "stdout": "", "stdout_lines": []}
    	to retry, use: --limit @/Users/asubramanian/Desktop/Metron/anand-metron-fork/metron-latest/metron/metron-deployment/development/centos6/ansible/playbook.retry
    ```
    
    Am I missing something?


---

[GitHub] metron issue #1244: METRON-1839 Install Elasticsearch MPack Step in Ansible ...

Posted by anandsubbu <gi...@git.apache.org>.
Github user anandsubbu commented on the issue:

    https://github.com/apache/metron/pull/1244
  
    +1
    
    Thanks for the fix @nickwallen !
    
    1. Re-created the problem first by:
    a) Running `vagrant up`
    b) Then attempting `vagrant provision` again
    c) Noticed the following error (which I have also seen previously many times!):
    ```
    TASK [ambari_master : Install Elasticsearch MPack on Ambari Host] **************
    fatal: [node1]: FAILED! => {"changed": true, "cmd": "ambari-server install-mpack --mpack=/tmp/elasticsearch_mpack-0.6.1.0.tar.gz", "delta": "0:00:00.433435", "end": "2018-10-21 18:12:29.939320", "msg": "non-zero return code", "rc": 255, "start": "2018-10-21 18:12:29.505885", "stderr": "", "stderr_lines": [], "stdout": "Using python  /usr/bin/python\nInstalling management pack\nERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!\nERROR: Exiting with exit code -1. \nREASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "stdout_lines": ["Using python  /usr/bin/python", "Installing management pack", "ERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "ERROR: Exiting with exit code -1. ", "REASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!"]}
    	to retry, use: --limit @/Users/asubramanian/Desktop/Metron/anand-metron-fork/metron-latest/metron/metron-deployment/development/centos6/ansible/playbook.retry
    ```
    
    2. Destroyed the VM, applied the fix and 
    a) Running `vagrant up`
    b) Then ran `vagrant --ansible-skip-tags="build,sensors" provision` to see that the ES mpack install goes through fine:
    ```
    TASK [ambari_master : Install Elasticsearch MPack on Ambari Host] **************
    ok: [node1]
    ```


---

[GitHub] metron issue #1244: METRON-1839 Install Elasticsearch MPack Step in Ansible ...

Posted by anandsubbu <gi...@git.apache.org>.
Github user anandsubbu commented on the issue:

    https://github.com/apache/metron/pull/1244
  
    +1
    
    Thanks for the fix @nickwallen ! I have bumped into this issue previously as well.
    
    1. Re-created the problem first by:
    a) Running `vagrant up`
    b) Then attempting `vagrant provision` again
    c) Noticed the following error:
    ```
    TASK [ambari_master : Install Elasticsearch MPack on Ambari Host] **************
    fatal: [node1]: FAILED! => {"changed": true, "cmd": "ambari-server install-mpack --mpack=/tmp/elasticsearch_mpack-0.6.1.0.tar.gz", "delta": "0:00:00.433435", "end": "2018-10-21 18:12:29.939320", "msg": "non-zero return code", "rc": 255, "start": "2018-10-21 18:12:29.505885", "stderr": "", "stderr_lines": [], "stdout": "Using python  /usr/bin/python\nInstalling management pack\nERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!\nERROR: Exiting with exit code -1. \nREASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "stdout_lines": ["Using python  /usr/bin/python", "Installing management pack", "ERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "ERROR: Exiting with exit code -1. ", "REASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!"]}
    	to retry, use: --limit @/Users/asubramanian/Desktop/Metron/anand-metron-fork/metron-latest/metron/metron-deployment/development/centos6/ansible/playbook.retry
    ```
    
    2. Destroyed the VM, applied the fix and
    a) Running `vagrant up`
    b) Then ran `vagrant --ansible-skip-tags="build,sensors" provision` to see that the ES mpack install goes through fine:
    ```
    TASK [ambari_master : Install Elasticsearch MPack on Ambari Host] **************
    ok: [node1]
    ```



---

[GitHub] metron issue #1244: METRON-1839 Install Elasticsearch MPack Step in Ansible ...

Posted by anandsubbu <gi...@git.apache.org>.
Github user anandsubbu commented on the issue:

    https://github.com/apache/metron/pull/1244
  
    +1
    
    Thanks for the fix @nickwallen ! I have seen this issue previously as well.
    
    1. Re-created the problem first by:
    a) Running `vagrant up`
    b) Then attempting `vagrant provision` again
    c) Noticed the following error:
    ```
    TASK [ambari_master : Install Elasticsearch MPack on Ambari Host] **************
    fatal: [node1]: FAILED! => {"changed": true, "cmd": "ambari-server install-mpack --mpack=/tmp/elasticsearch_mpack-0.6.1.0.tar.gz", "delta": "0:00:00.433435", "end": "2018-10-21 18:12:29.939320", "msg": "non-zero return code", "rc": 255, "start": "2018-10-21 18:12:29.505885", "stderr": "", "stderr_lines": [], "stdout": "Using python  /usr/bin/python\nInstalling management pack\nERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!\nERROR: Exiting with exit code -1. \nREASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "stdout_lines": ["Using python  /usr/bin/python", "Installing management pack", "ERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "ERROR: Exiting with exit code -1. ", "REASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!"]}
    	to retry, use: --limit @/Users/asubramanian/Desktop/Metron/anand-metron-fork/metron-latest/metron/metron-deployment/development/centos6/ansible/playbook.retry
    ```
    
    2. Destroyed the VM, applied the fix and
    a) Running `vagrant up`
    b) Then ran `vagrant --ansible-skip-tags="build,sensors" provision` to see that the ES mpack install goes through fine:
    ```
    TASK [ambari_master : Install Elasticsearch MPack on Ambari Host] **************
    ok: [node1]
    ```



---

[GitHub] metron issue #1244: METRON-1839 Install Elasticsearch MPack Step in Ansible ...

Posted by anandsubbu <gi...@git.apache.org>.
Github user anandsubbu commented on the issue:

    https://github.com/apache/metron/pull/1244
  
    +1
    
    Thanks for the fix @nickwallen ! I have seen this issue previously as well.
    
    1. Re-created the problem first by:
    a) Running `vagrant up`
    b) Then attempting `vagrant provision` again
    c) Noticed the following error:
    ```
    TASK [ambari_master : Install Elasticsearch MPack on Ambari Host] **************
    fatal: [node1]: FAILED! => {"changed": true, "cmd": "ambari-server install-mpack --mpack=/tmp/elasticsearch_mpack-0.6.1.0.tar.gz", "delta": "0:00:00.433435", "end": "2018-10-21 18:12:29.939320", "msg": "non-zero return code", "rc": 255, "start": "2018-10-21 18:12:29.505885", "stderr": "", "stderr_lines": [], "stdout": "Using python  /usr/bin/python\nInstalling management pack\nERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!\nERROR: Exiting with exit code -1. \nREASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "stdout_lines": ["Using python  /usr/bin/python", "Installing management pack", "ERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "ERROR: Exiting with exit code -1. ", "REASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!"]}
    	to retry, use: --limit @/Users/asubramanian/Desktop/Metron/anand-metron-fork/metron-latest/metron/metron-deployment/development/centos6/ansible/playbook.retry
    ```
    
    2. Destroyed the VM, applied the fix and
    a) Running `vagrant up`
    b) Then ran `vagrant --ansible-skip-tags="build,sensors" provision` to see that the ES mpack install goes through fine:
    ```
    TASK [ambari_master : Install Elasticsearch MPack on Ambari Host] **************
    ok: [node1]
    ```



---

[GitHub] metron pull request #1244: METRON-1839 Install Elasticsearch MPack Step in A...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/metron/pull/1244


---

[GitHub] metron issue #1244: METRON-1839 Install Elasticsearch MPack Step in Ansible ...

Posted by anandsubbu <gi...@git.apache.org>.
Github user anandsubbu commented on the issue:

    https://github.com/apache/metron/pull/1244
  
    +1
    
    Thanks for the fix @nickwallen ! I have seen this issue previously as well.
    
    1. Re-created the problem first by:
    a) Running `vagrant up`
    b) Then attempting `vagrant provision` again
    c) Noticed the following error:
    ```
    TASK [ambari_master : Install Elasticsearch MPack on Ambari Host] **************
    fatal: [node1]: FAILED! => {"changed": true, "cmd": "ambari-server install-mpack --mpack=/tmp/elasticsearch_mpack-0.6.1.0.tar.gz", "delta": "0:00:00.433435", "end": "2018-10-21 18:12:29.939320", "msg": "non-zero return code", "rc": 255, "start": "2018-10-21 18:12:29.505885", "stderr": "", "stderr_lines": [], "stdout": "Using python  /usr/bin/python\nInstalling management pack\nERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!\nERROR: Exiting with exit code -1. \nREASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "stdout_lines": ["Using python  /usr/bin/python", "Installing management pack", "ERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "ERROR: Exiting with exit code -1. ", "REASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!"]}
    	to retry, use: --limit @/Users/asubramanian/Desktop/Metron/anand-metron-fork/metron-latest/metron/metron-deployment/development/centos6/ansible/playbook.retry
    ```
    
    2. Destroyed the VM, applied the fix and 
    a) Running `vagrant up`
    b) Then ran `vagrant --ansible-skip-tags="build,sensors" provision` to see that the ES mpack install goes through fine:
    ```
    TASK [ambari_master : Install Elasticsearch MPack on Ambari Host] **************
    ok: [node1]
    ```


---

[GitHub] metron issue #1244: METRON-1839 Install Elasticsearch MPack Step in Ansible ...

Posted by anandsubbu <gi...@git.apache.org>.
Github user anandsubbu commented on the issue:

    https://github.com/apache/metron/pull/1244
  
    +1
    
    Thanks for the fix @nickwallen ! I have bumped into this issue previously as well.
    
    1. Re-created the problem first by:
    a) Running `vagrant up`
    b) Then attempting `vagrant provision` again
    c) Noticed the following error:
    ```
    TASK [ambari_master : Install Elasticsearch MPack on Ambari Host] **************
    fatal: [node1]: FAILED! => {"changed": true, "cmd": "ambari-server install-mpack --mpack=/tmp/elasticsearch_mpack-0.6.1.0.tar.gz", "delta": "0:00:00.433435", "end": "2018-10-21 18:12:29.939320", "msg": "non-zero return code", "rc": 255, "start": "2018-10-21 18:12:29.505885", "stderr": "", "stderr_lines": [], "stdout": "Using python  /usr/bin/python\nInstalling management pack\nERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!\nERROR: Exiting with exit code -1. \nREASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "stdout_lines": ["Using python  /usr/bin/python", "Installing management pack", "ERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "ERROR: Exiting with exit code -1. ", "REASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!"]}
    	to retry, use: --limit @/Users/asubramanian/Desktop/Metron/anand-metron-fork/metron-latest/metron/metron-deployment/development/centos6/ansible/playbook.retry
    ```
    
    2. Destroyed the VM, applied the fix and
    a) Running `vagrant up`
    b) Then ran `vagrant --ansible-skip-tags="build,sensors" provision` to see that the ES mpack install goes through fine:
    ```
    TASK [ambari_master : Install Elasticsearch MPack on Ambari Host] **************
    ok: [node1]
    ```



---

[GitHub] metron issue #1244: METRON-1839 Install Elasticsearch MPack Step in Ansible ...

Posted by anandsubbu <gi...@git.apache.org>.
Github user anandsubbu commented on the issue:

    https://github.com/apache/metron/pull/1244
  
    +1
    
    Thanks for the fix @nickwallen !
    
    1. Re-created the problem first by:
    a) Running `vagrant up`
    b) Then attempting `vagrant provision` again
    c) Noticed the following error (which I have also seen previously many times!):
    ```
    TASK [ambari_master : Install Elasticsearch MPack on Ambari Host] **************
    fatal: [node1]: FAILED! => {"changed": true, "cmd": "ambari-server install-mpack --mpack=/tmp/elasticsearch_mpack-0.6.1.0.tar.gz", "delta": "0:00:00.433435", "end": "2018-10-21 18:12:29.939320", "msg": "non-zero return code", "rc": 255, "start": "2018-10-21 18:12:29.505885", "stderr": "", "stderr_lines": [], "stdout": "Using python  /usr/bin/python\nInstalling management pack\nERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!\nERROR: Exiting with exit code -1. \nREASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "stdout_lines": ["Using python  /usr/bin/python", "Installing management pack", "ERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "ERROR: Exiting with exit code -1. ", "REASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!"]}
    	to retry, use: --limit @/Users/asubramanian/Desktop/Metron/anand-metron-fork/metron-latest/metron/metron-deployment/development/centos6/ansible/playbook.retry
    ```
    
    2. Destroyed the VM, applied the fix and 
    a) Running `vagrant up`
    b) Then ran `vagrant --ansible-skip-tags="build,sensors" provision` to see that the ES mpack install goes through fine:
    ```
    TASK [ambari_master : Install Elasticsearch MPack on Ambari Host] **************
    ok: [node1]
    ```


---

[GitHub] metron issue #1244: METRON-1839 Install Elasticsearch MPack Step in Ansible ...

Posted by anandsubbu <gi...@git.apache.org>.
Github user anandsubbu commented on the issue:

    https://github.com/apache/metron/pull/1244
  
    +1
    
    Thanks for the fix @nickwallen ! I have seen this issue previously as well.
    
    1. Re-created the problem first by:
    a) Running `vagrant up`
    b) Then attempting `vagrant provision` again
    c) Noticed the following error:
    ```
    TASK [ambari_master : Install Elasticsearch MPack on Ambari Host] **************
    fatal: [node1]: FAILED! => {"changed": true, "cmd": "ambari-server install-mpack --mpack=/tmp/elasticsearch_mpack-0.6.1.0.tar.gz", "delta": "0:00:00.433435", "end": "2018-10-21 18:12:29.939320", "msg": "non-zero return code", "rc": 255, "start": "2018-10-21 18:12:29.505885", "stderr": "", "stderr_lines": [], "stdout": "Using python  /usr/bin/python\nInstalling management pack\nERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!\nERROR: Exiting with exit code -1. \nREASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "stdout_lines": ["Using python  /usr/bin/python", "Installing management pack", "ERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "ERROR: Exiting with exit code -1. ", "REASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!"]}
    	to retry, use: --limit @/Users/asubramanian/Desktop/Metron/anand-metron-fork/metron-latest/metron/metron-deployment/development/centos6/ansible/playbook.retry
    ```
    
    2. Destroyed the VM, applied the fix and
    a) Running `vagrant up`
    b) Then ran `vagrant --ansible-skip-tags="build,sensors" provision` to see that the ES mpack install goes through fine:
    ```
    TASK [ambari_master : Install Elasticsearch MPack on Ambari Host] **************
    ok: [node1]
    ```



---

[GitHub] metron issue #1244: METRON-1839 Install Elasticsearch MPack Step in Ansible ...

Posted by anandsubbu <gi...@git.apache.org>.
Github user anandsubbu commented on the issue:

    https://github.com/apache/metron/pull/1244
  
    Hey @nickwallen , I am seeing an error at the `ambari_gather_facts : Ask Ambari: core_site_tag` step when trying to validate the fix. 
    
    1. Re-created the problem first by:
    a) Running `vagrant up`
    b) Then attempting `vagrant provision` again
    c) Noticed the following error:
    ```
    TASK [ambari_master : Install Elasticsearch MPack on Ambari Host] **************
    fatal: [node1]: FAILED! => {"changed": true, "cmd": "ambari-server install-mpack --mpack=/tmp/elasticsearch_mpack-0.6.1.0.tar.gz", "delta": "0:00:00.433435", "end": "2018-10-21 18:12:29.939320", "msg": "non-zero return code", "rc": 255, "start": "2018-10-21 18:12:29.505885", "stderr": "", "stderr_lines": [], "stdout": "Using python  /usr/bin/python\nInstalling management pack\nERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!\nERROR: Exiting with exit code -1. \nREASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "stdout_lines": ["Using python  /usr/bin/python", "Installing management pack", "ERROR: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!", "ERROR: Exiting with exit code -1. ", "REASON: Management pack elasticsearch-ambari.mpack-5.6.2 already installed!"]}
    	to retry, use: --limit @/Users/asubramanian/Desktop/Metron/anand-metron-fork/metron-latest/metron/metron-deployment/development/centos6/ansible/playbook.retry
    ```
    
    2. Destroyed the VM, applied the fix and 
    a) Running `vagrant up`
    b) Then ran `vagrant --ansible-skip-tags="build,sensors" provision` after which I am seeing the below error:
    ```
    <snip>
    TASK [ambari_gather_facts : Ask Ambari: namenode_host] *************************
    changed: [node1]
    
    TASK [ambari_gather_facts : set_fact] ******************************************
    ok: [node1]
    
    TASK [ambari_gather_facts : Ask Ambari: core_site_tag] *************************
    fatal: [node1]: FAILED! => {"changed": true, "cmd": "curl -s -u admin:admin -X GET -H \"X-Requested-By: ambari\" 'http://node1:8080/api/v1/clusters/metron_cluster/hosts/node1/host_components/NAMENODE' | python -c 'import sys, json; print json.load(sys.stdin)[\"HostRoles\"][\"actual_configs\"][\"core-site\"][\"default\"]'", "delta": "0:00:00.060271", "end": "2018-10-21 23:19:31.928568", "msg": "non-zero return code", "rc": 1, "start": "2018-10-21 23:19:31.868297", "stderr": "Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nKeyError: 'core-site'", "stderr_lines": ["Traceback (most recent call last):", "  File \"<string>\", line 1, in <module>", "KeyError: 'core-site'"], "stdout": "", "stdout_lines": []}
    	to retry, use: --limit @/Users/asubramanian/Desktop/Metron/anand-metron-fork/metron-latest/metron/metron-deployment/development/centos6/ansible/playbook.retry
    ```
    
    Am I missing something?


---