Add support for running object-servers Per Disk
Adds support for configuring different storage port per disk in the storage policy ring. This Swift feature is described here https://docs.openstack.org/swift/latest/deployment_guide.html#running-object-servers-per-disk Signed-off-by: Andrej Babolcai <andrej.babolcai@gmail.com> Change-Id: I254e35a67195817c237dba00bec6338d3fffa985
This commit is contained in:
@@ -225,6 +225,8 @@ file**
|
|||||||
# weight: 75
|
# weight: 75
|
||||||
# groups:
|
# groups:
|
||||||
# - gold
|
# - gold
|
||||||
|
# storage_port: 6010
|
||||||
|
# repl_port: 6110
|
||||||
# - name: sdc
|
# - name: sdc
|
||||||
# - name: sdd
|
# - name: sdd
|
||||||
# - name: sde
|
# - name: sde
|
||||||
@@ -249,6 +251,11 @@ file**
|
|||||||
If neither are specified, both default to the host IP
|
If neither are specified, both default to the host IP
|
||||||
address.
|
address.
|
||||||
|
|
||||||
|
``storage_port`` and ``repl_port``
|
||||||
|
Used to enable running object servers per disk. The default value
|
||||||
|
for both is ``swift_object_port``.
|
||||||
|
https://docs.openstack.org/swift/latest/deployment_guide.html
|
||||||
|
|
||||||
``zone``
|
``zone``
|
||||||
The default is 0. Optionally, set the swift zone for the
|
The default is 0. Optionally, set the swift zone for the
|
||||||
ring.
|
ring.
|
||||||
|
@@ -69,15 +69,17 @@
|
|||||||
{% set weight = drive.weight | default(swift_vars.weight | default(swift.weight | default(swift_default_drive_weight))) %}
|
{% set weight = drive.weight | default(swift_vars.weight | default(swift.weight | default(swift_default_drive_weight))) %}
|
||||||
{% set region = drive.region | default(swift_vars.region | default(swift.region | default(swift_default_host_region))) %}
|
{% set region = drive.region | default(swift_vars.region | default(swift.region | default(swift_default_host_region))) %}
|
||||||
{% set zone = drive.zone | default(swift_vars.zone | default(swift.zone | default(swift_default_host_zone))) %}
|
{% set zone = drive.zone | default(swift_vars.zone | default(swift.zone | default(swift_default_host_zone))) %}
|
||||||
|
{% set stor_port = drive.storage_port | default(port) %}
|
||||||
|
{% set repl_port = drive.repl_port | default(port) %}
|
||||||
{### Update the device with the appropriate values #}
|
{### Update the device with the appropriate values #}
|
||||||
{% set _update = device.update({'device':drive.name}) %}
|
{% set _update = device.update({'device':drive.name}) %}
|
||||||
{% set _update = device.update({'weight': weight|int}) %}
|
{% set _update = device.update({'weight': weight|int}) %}
|
||||||
{% set _update = device.update({'region': region|int}) %}
|
{% set _update = device.update({'region': region|int}) %}
|
||||||
{% set _update = device.update({'zone': zone|int}) %}
|
{% set _update = device.update({'zone': zone|int}) %}
|
||||||
{% set _update = device.update({'replication_ip': repl_ip}) %}
|
{% set _update = device.update({'replication_ip': repl_ip}) %}
|
||||||
{% set _update = device.update({'replication_port': port|int}) %}
|
{% set _update = device.update({'replication_port': repl_port|int}) %}
|
||||||
{% set _update = device.update({'ip': storage_ip}) %}
|
{% set _update = device.update({'ip': storage_ip}) %}
|
||||||
{% set _update = device.update({'port': port|int}) %}
|
{% set _update = device.update({'port': stor_port|int}) %}
|
||||||
{### Append the device to the drives list of the builder dict #}
|
{### Append the device to the drives list of the builder dict #}
|
||||||
{% set _update = builder.drives.append(device) %}
|
{% set _update = builder.drives.append(device) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Reference in New Issue
Block a user