Fix containerized SwiftRawDisks usage
This patch partitions the defined devices and mounts them on the hostnode. It also disables the mount_check inside Swift because it is currently not possible to detect wether a given directory is a mounted device or not. This is just a workaround until a better solution has been implemented in Swift itself. Change-Id: I6e8e1328d7ffb18bb96ed1a940013dbb8b6b433e
This commit is contained in:
parent
61fdeb67a0
commit
ef8572acfe
|
@ -46,6 +46,11 @@ parameters:
|
||||||
via parameter_defaults in the resource registry. This
|
via parameter_defaults in the resource registry. This
|
||||||
mapping overrides those in ServiceNetMapDefaults.
|
mapping overrides those in ServiceNetMapDefaults.
|
||||||
type: json
|
type: json
|
||||||
|
SwiftRawDisks:
|
||||||
|
default: {}
|
||||||
|
description: 'A hash of additional raw devices to use as Swift backend (eg. {sdb: {}})'
|
||||||
|
type: json
|
||||||
|
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
|
|
||||||
|
@ -66,7 +71,11 @@ outputs:
|
||||||
description: Role data for the swift storage services.
|
description: Role data for the swift storage services.
|
||||||
value:
|
value:
|
||||||
service_name: {get_attr: [SwiftStorageBase, role_data, service_name]}
|
service_name: {get_attr: [SwiftStorageBase, role_data, service_name]}
|
||||||
config_settings: {get_attr: [SwiftStorageBase, role_data, config_settings]}
|
config_settings:
|
||||||
|
map_merge:
|
||||||
|
- {get_attr: [SwiftStorageBase, role_data, config_settings]}
|
||||||
|
# FIXME (cschwede): re-enable this once checks works inside containers
|
||||||
|
- swift::storage::all::mount_check: false
|
||||||
step_config: &step_config
|
step_config: &step_config
|
||||||
get_attr: [SwiftStorageBase, role_data, step_config]
|
get_attr: [SwiftStorageBase, role_data, step_config]
|
||||||
service_config_settings: {get_attr: [SwiftStorageBase, role_data, service_config_settings]}
|
service_config_settings: {get_attr: [SwiftStorageBase, role_data, service_config_settings]}
|
||||||
|
@ -348,6 +357,18 @@ outputs:
|
||||||
with_items:
|
with_items:
|
||||||
- /var/log/containers/swift
|
- /var/log/containers/swift
|
||||||
- /srv/node
|
- /srv/node
|
||||||
|
- name: Format and mount devices defined in SwiftRawDisks
|
||||||
|
mount:
|
||||||
|
name: /srv/node/{{ item }}
|
||||||
|
src: /dev/{{ item }}
|
||||||
|
fstype: xfs
|
||||||
|
opts: noatime
|
||||||
|
state: mounted
|
||||||
|
with_items:
|
||||||
|
- repeat:
|
||||||
|
template: 'DEVICE'
|
||||||
|
for_each:
|
||||||
|
DEVICE: {get_param: SwiftRawDisks}
|
||||||
upgrade_tasks:
|
upgrade_tasks:
|
||||||
- name: Stop and disable swift storage services
|
- name: Stop and disable swift storage services
|
||||||
tags: step2
|
tags: step2
|
||||||
|
|
Loading…
Reference in New Issue