Make space for Cinder/Swift nodes if using nspawn
Currently if CONTAINER_TECH=nspawn is uses, Cinder and Swift are unable to create volumes as space is fully allocated for machines volume. This shrinks machine00 mount to 8192 to make space for Cinder and Swift volumes when using nspawn for the container tech. Change-Id: Ief0040f638f0d3570557ac76fd5e0a8aee80df8d
This commit is contained in:
parent
f1b18d30f1
commit
875fa96fb8
@ -245,30 +245,48 @@
|
||||
state: restarted
|
||||
|
||||
|
||||
- name: Setup cinder host volume
|
||||
- name: Make space for swift and cinder volumes
|
||||
hosts: cinder_hosts:swift_hosts
|
||||
gather_facts: false
|
||||
environment: "{{ deployment_environment_variables | default({}) }}"
|
||||
tags:
|
||||
- deploy-vms
|
||||
tasks:
|
||||
- name: un-mount deleteme mount
|
||||
- name: Unmount lxc and machines mounts
|
||||
mount:
|
||||
name: "/var/lib/lxc"
|
||||
name: "{{ item }}"
|
||||
state: unmounted
|
||||
with_items:
|
||||
- "/var/lib/lxc"
|
||||
- "/var/lib/machines"
|
||||
|
||||
- name: remote deleteme mount
|
||||
- name: Remove lxc mount directory
|
||||
mount:
|
||||
name: "/var/lib/lxc"
|
||||
state: absent
|
||||
|
||||
- name: Remove deleteme lv
|
||||
- name: Shrink machines00 mount
|
||||
lvol:
|
||||
vg: vmvg00
|
||||
lv: machines00
|
||||
size: 8192
|
||||
shrink: yes
|
||||
force: yes
|
||||
|
||||
- name: Remove lxc00 volume group
|
||||
lvol:
|
||||
vg: vmvg00
|
||||
lv: lxc00
|
||||
force: true
|
||||
state: absent
|
||||
|
||||
- name: Re-mount machines00 mount
|
||||
mount:
|
||||
path: /var/lib/machines
|
||||
src: /dev/mapper/vmvg00-machines00
|
||||
state: mounted
|
||||
fstype: btrfs
|
||||
|
||||
|
||||
- name: Setup cinder host volume
|
||||
hosts: cinder_hosts
|
||||
|
Loading…
x
Reference in New Issue
Block a user