Hi,
so evidently this is not an elasticlluster issue but an ansible module
issue.
I found out that I needed do install openstacksdk and the right version of
decorator, then shade seems to work
- openstacksdk
- shade
- decorator>=4.0.0
So problem solved.
On Monday, April 1, 2019 at 3:54:42 PM UTC+2, Maiken Pedersen wrote:
>
> Hi,
>
> I am trying to use the os_volume module in a custom after-script when
> running elasticluster setup.
>
> I have installed shade on all the instances, my after script does:
>
> #### Install shade to be able to use openstack ansible module
>
> - hosts: all
> tags:
> - after
> - local
> tasks:
> - name: Update packages
> yum:
> name: '*'
> state: latest
> exclude: kernel*
> - name: Dependencies for shade
> yum:
> name: "{{ item }}"
> state: present
> with_items:
> - epel-release
> - python-devel
> - openssl-devel
> - "@Development Tools"
> - python-pip
> - name: Install shade
> command: pip install shade
>
>
> But when running this:
> ### Volumes on compute
> - hosts: compute
> tags:
> - after
> - local
> tasks:
> - name: openstack volume | create volume for compute
> environment: "{{ os_env }}"
> os_volume:
> state: present
> size: "{{ item.size }}"
> display_name: "{{ item.name }}"
> with_items: "{{ blockstorage_compute }}"
> - name: openstack volume | attach volume to compute host
> environment: "{{ os_env }}"
> os_server_volume:
> state: present
> server: "{{ cluster_name }}-{{ ansible_hostname }}"
> volume: "{{ item.name }}"
> device: "{{ item.src }}"
> with_items: "{{ blockstorage_compute }}"
> - name: Create filesystem
> filesystem:
> fstype: "{{ item.fstype }}"
> dev: "{{ item.src }}"
> with_items: "{{ blockstorage_compute }}"
> - name: Ensure directories exist
> file:
> path: "{{ item.path }}"
> state: directory
> owner: root
> group: root
> mode: 0755
> with_items: "{{ blockstorage_compute }}"
> - name: Add mountpoints in fstab
> mount:
> fstype: "{{ item.fstype }}"
> path: "{{ item.path }}"
> src: "{{ item.src }}"
> state: mounted
> with_items: "{{ blockstorage_compute }}"
>
>
> I get:
>
> TASK [openstack volume | create volume for frontend]
> *********************************************************************************************************************************************************************************************
> failed: [frontend001] (item={u'path': u'/grid', u'src': u'/dev/sdb', u
> 'fstype': u'xfs', u'name': u'sessiondir-frontend001', u'size': 20}) => {
> "failed": true, "item": {"fstype": "xfs", "name": "sessiondir-frontend001"
> , "path": "/grid", "size": 20, "src": "/dev/sdb"}, "msg": "shade is
> required for this module"}
> failed: [frontend001] (item={u'path': u'/gctrl', u'src': u'/dev/sdc', u
> 'fstype': u'xfs', u'name': u'sessiondir-frontend001', u'size': 20}) => {
> "failed": true, "item": {"fstype": "xfs", "name": "sessiondir-frontend001"
> , "path": "/gctrl", "size": 20, "src": "/dev/sdc"}, "msg": "shade is
> required for this module"}
>
>
> Must mention that I am running with a rather old version of elasticluster,
> a bit afraid to upgrade at the moment in case things break :)
>
> (elasticluster)[centos@elasticluster-final ~]$ elasticluster --version
> elasticluster version 1.3.dev0
>
> Any hints towards solution very welcome!
>
> Best,
> Maiken
>
>
--
You received this message because you are subscribed to the Google Groups
"elasticluster" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.