metaspace2020 / sm-engine-ansible

Setting up cloud infrastructure for the engine using Ansible
Apache License 2.0
2 stars 6 forks source link

ansible git clone of sm, and spark key pair generation failing #3

Closed sean-ocall closed 8 years ago

sean-ocall commented 8 years ago

It fails at this point:

TASK [sm_webapp : clone sm git repository] *****

with this error:

fatal: [sm-vbox]: FAILED! => {"changed": false, "failed": true, "module_stderr": "", "module_stdout": "Traceback (most recent call last):\r\n File \"/home/ubuntu/.ansible/tmp/ansible-tmp-1465172823.75-50583051330552/git\", line 3009, in \r\n main()\r\n File \"/home/ubuntu/.ansible/tmp/ansible-tmp-1465172823.75-50583051330552/git\", line 753, in main\r\n clone(git_path, module, repo, dest, remote, depth, version, bare, reference, refspec, verify_commit)\r\n File \"/home/ubuntu/.ansible/tmp/ansible-tmp-1465172823.75-50583051330552/git\", line 329, in clone\r\n if is_remote_branch(git_path, module, dest, repo, version) \r\n File \"/home/ubuntu/.ansible/tmp/ansible-tmp-1465172823.75-50583051330552/git\", line 439, in is_remote_branch\r\n if version in out:\r\nTypeError: 'in ' requires string as left operand, not NoneType\r\n", "msg": "MODULE FAILURE", "parsed": false}

If I manually clone SM_distributed into /opt/dev/sm and delete the relevant code from the sm_webapp role tasks/main.yml, everything else runs smoothly up to:

TASK [spark : generate a key pair for remote ubuntu user (locally)] ****

which errors out with: fatal: [sm-vbox -> localhost]: FAILED! => {"changed": true, "cmd": "ssh-keygen -f /home/intsco/.ssh/ubuntu_spark -t rsa -N ''", "delta": "0:00:00.032162", "end": "2016-06-06 11:56:12.548935", "failed": true, "rc": 1, "start": "2016-06-06 11:56:12.516773", "stderr": "open /home/intsco/.ssh/ubuntu_spark failed: No such file or directory.", "stdout": "Generating public/private rsa key pair.\nSaving the key failed: /home/intsco/.ssh/ubuntu_spark.", "stdout_lines": ["Generating public/private rsa key pair.", "Saving the key failed: /home/intsco/.ssh/ubuntu_spark."], "warnings": []}

Looking on the virtual machine, there is no 'intsco' home directory and no user 'intsco'.

Thanks, Sean

intsco commented 8 years ago

Hi there,

I suspect the reason for failing may be missing parameter sm_branch value. Did you skip the step "Put the SM engine version of interest into group_vars/all.yml as value for the sm_branch variable"?

Best, Vitaly

sean-ocall commented 8 years ago

Yes, I did forget that, and it has solved the git issue, but the spark key pair generation is still failing.

Have you hardcoded your own filesystem folder names into this somehow?

intsco commented 8 years ago

Hi,

Indeed, spark_key_file default value was wrong. Fixed.

Thanks!

sean-ocall commented 8 years ago

Everything working now, all tests passed, example job didn't finish though so I will start a new issue. Thanks!