Skip to content

subutai_clone seems does not work #31

@etursunbaev

Description

@etursunbaev
  1. Documentation how to install/setup plugin (it is module in ansible meaning) is pure. I understand that this is not in Ansible. Anyway there should be solid instructions how to install it properly

  2. I cloned this repo and placed into this path: /usr/lib/python2.7/dist-packages/ansible/modules/cloud/subutai

  3. I imported debian-stretch template like this:

- name: Import debian-stretch
   subutai:
        name: debian-stretch
        state: present

and it worked:

root@jenkins:~# subutai list   
CONT/TEMP
---------
debian-stretch:subutai:0.4.2
  1. When I want clone debian-stretch to builder name using like this:
 - name: Clone debian-stretch to builder
   subutai_clone:
        parent: debian-stretch
        child: builder

it fails:

fatal: [jenkins]: FAILED! => {"changed": false, "module_stderr": "Shared connection to 192.168.121.188 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_YCtJ1n/ansible_module_subutai_clone.py\", line 161, in <module>\r\n    main()\r\n  File \"/tmp/ansible_YCtJ1n/ansible_module_subutai_clone.py\", line 158, in main\r\n    run_module()\r\n  File \"/tmp/ansible_YCtJ1n/ansible_module_subutai_clone.py\", line 134, in run_module\r\n    if container_exists(module.params['child']):\r\n  File \"/tmp/ansible_YCtJ1n/ansible_module_subutai_clone.py\", line 150, in container_exists\r\n    out = subprocess.Popen([\"/snap/bin/subutai\", \"list\"], stdout=subprocess.PIPE).stdout.read()\r\n  File \"/usr/lib/python2.7/subprocess.py\", line 390, in __init__\r\n    errread, errwrite)\r\n  File \"/usr/lib/python2.7/subprocess.py\", line 1024, in _execute_child\r\n    raise child_exception\r\nOSError: [Errno 2] No such file or directory\r\n", "msg": "MODULE FAILURE", "rc": 1}

With agent cli I usually do like this:

  • subutai import debian-stretch
  • subutai clone debian-stretch new_name which creates container from debian-stretch template

So It seems to me subutai_clone does not work as agent does

Also there a lot of modules missed in repo.

@liquuid pls. help

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions