Pike. swift-ringbuilder.yaml

Latest response

Hello folks,

on pike we are trying to run the swift-ringbuilder.yaml during the initial deploying of the overcloud.
but it failed without useful error message.

below the yaml file. is copied from template.
is the anything else to do or to adapt before running this file?

any idea how i can troubleshoot what exactly is going wrong?

thanks for your answers

br
Niko

[stack@srvhost1 services]$ more swift-ringbuilder.yaml
heat_template_version: pike

description: >
OpenStack Swift Ringbuilder

parameters:
DockerSwiftConfigImage:
description: The container image to use for the swift config_volume
type: string
DockerSwiftRingbuilderConfigImage:
description: Fake parameter to bypass config_volume yaml validation
type: string
default: ''
ServiceData:
default: {}
description: Dictionary packing service data
type: json
ServiceNetMap:
default: {}
description: Mapping of service_name -> network name. Typically set
via parameter_defaults in the resource registry. This
mapping overrides those in ServiceNetMapDefaults.
type: json
DefaultPasswords:
default: {}
type: json
RoleName:
default: ''
description: Role name on which the service is applied
type: string
RoleParameters:
default: {}
description: Parameters specific to the role
type: json
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
SwiftMinPartHours:
type: number
default: 1
description: The minimum time (in hours) before a partition in a ring can be moved following a rebalance.
SwiftPartPower:
default: 9
description: Partition Power to use when building Swift rings
type: number
SwiftRingBuild:
default: true
description: Whether to manage Swift rings or not
type: boolean
SwiftReplicas:
type: number
default: 2
description: How many replicas to use in the swift rings.
SwiftRawDisks:
default: {}
description: 'A hash of additional raw devices to use as Swift backend (eg. {sdb: {}})'
type: json
SwiftUseLocalDir:
default: true
description: 'Use a local directory for Swift storage services when building rings'
type: boolean
SwiftRingGetTempurl:
default: ''
description: A temporary Swift URL to download rings from.
type: string
SwiftRingPutTempurl:
default: ''
description: A temporary Swift URL to upload rings to.
type: string

resources:

SwiftRingbuilderBase:
type: ../../puppet/services/swift-ringbuilder.yaml
properties:
EndpointMap: {get_param: EndpointMap}
ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}

outputs:
role_data:
description: Role data for Swift Ringbuilder configuration in containers.
value:
service_name: {get_attr: [SwiftRingbuilderBase, role_data, service_name]}
config_settings:
map_merge:
- {get_attr: [SwiftRingbuilderBase, role_data, config_settings]}
- tripleo::profile::base::swift::ringbuilder:skip_consistency_check: true
logging_source: {get_attr: [SwiftRingbuilderBase, role_data, logging_source]}
logging_groups: {get_attr: [SwiftRingbuilderBase, role_data, logging_groups]}
step_config: &step_config
get_attr: [SwiftRingbuilderBase, role_data, step_config]
service_config_settings: {get_attr: [SwiftRingbuilderBase, role_data, service_config_settings]}
# BEGIN DOCKER SETTINGS
puppet_config:
config_volume: 'swift_ringbuilder'
puppet_tags: exec,fetch_swift_ring_tarball,extract_swift_ring_tarball,ring_object_device,swift::ringbuilder::create,tripleo::profile::base::swift::add_devices,swift::ringbuilder::rebalance,create_swift
_ring_tarball,upload_swift_ring_tarball
step_config: *step_config
config_image: &swift_ringbuilder_image {get_param: DockerSwiftConfigImage}
kolla_config: {}
docker_config:
step_3:
swift_copy_rings:
image: *swift_ringbuilder_image
user: root
detach: false
command:
# Use bash to run the cp command so that wildcards can be used
- '/bin/bash'
- '-c'
- 'cp -v -a -t /etc/swift /swift_ringbuilder/etc/swift/*.gz /swift_ringbuilder/etc/swift/*.builder /swift_ringbuilder/etc/swift/backups'
volumes:
- /var/lib/config-data/puppet-generated/swift/etc/swift:/etc/swift:rw
- /var/lib/config-data/swift_ringbuilder:/swift_ringbuilder:ro

Responses

So this looks like the default containerized service template for swift-ringerbuilder. There shouldn't be any modifications required to the template to get it working.

How do you know that it's the swift-ringbuilder? Is the docker container in a failed state? Did the other containers start successfully (for example, the HA services)?

no it is not in the failed state. HA services are running as expected. the deployment ran without issue with attached template. you wrote that i must modify the template. which setting must be adapted. with openstack container list I see swing-ring. I would like to test if it works but the documentation i have doesn't work properly. any suggestion how i can maintain it?

thanks

Sorry, I mistyped. I meant there shouldn't be any modifications required.

I think there might be some confusion here. The "openstack container list" is for something different (not docker containers). What I'm trying to find out is how you know the swift-ringbuilder failed, as per your original message:

on pike we are trying to run the swift-ringbuilder.yaml during the initial deploying of the overcloud. but it failed without useful error message.

How do you know it was specifically the swift-ringbuilder that failed?

thanks for you answer. I did a mistake as tried to check if the swift is running currently. i checked this on the control nodes but swift is running on the compute nodes. i execute the command: sudo docker su and i got this result.

root@comp0 heat-admin]# sudo docker ps
CONTAINER ID        IMAGE                                                                         COMMAND             CREATED             STATUS                    PORTS               NAMES
34375a258f61        ppc10.test-port.net:5000/test-osp12_containers-swift-account:12.0        "kolla_start"       44 hours ago        Up 44 hours (healthy)                         swift_account_server
8dcc20978ab5        ppc10.test-port.net:5000/test-osp12_containers-swift-container:12.0      "kolla_start"       44 hours ago        Up 44 hours (healthy)                         swift_container_replicator
cfa5441016e8        ppc10.test-port.net:5000/test-osp12_containers-swift-account:12.0        "kolla_start"       44 hours ago        Up 44 hours (healthy)                         swift_account_reaper
316453cd113d        ppc10.test-port.net:5000/test-osp12_containers-swift-container:12.0      "kolla_start"       44 hours ago        Up 44 hours (healthy)                         swift_container_auditor
83ccd7b0ec88        ppc10.test-port.net:5000/test-osp12_containers-swift-proxy-server:12.0   "kolla_start"       44 hours ago        Up 44 hours (healthy)                         swift_object_expirer
0e29c52b48e3        ppc10.test-port.net:5000/test-osp12_containers-swift-object:12.0         "kolla_start"       44 hours ago        Up 44 hours (healthy)                         swift_object_updater
9acac77bb4bc        ppc10.test-port.net:5000/test-osp12_containers-ceilometer-compute:12.0   "kolla_start"       44 hours ago        Up 44 hours                                   ceilometer_agent_compute
dbd2d38f73ad        ppc10.test-port.net:5000/test-osp12_containers-swift-account:12.0        "kolla_start"       44 hours ago        Up 44 hours (healthy)                         swift_account_auditor
45d0c4ddd660        ppc10.test-port.net:5000/test-osp12_containers-cron:12.0                 "kolla_start"       44 hours ago        Up 44 hours                                   logrotate_crond
3f9be127b4da        ppc10.test-port.net:5000/test-osp12_containers-swift-account:12.0        "kolla_start"       44 hours ago        Up 44 hours (healthy)                         swift_account_replicator
cb00056167ee        ppc10.test-port.net:5000/test-osp12_containers-swift-object:12.0         "kolla_start"       44 hours ago        Up 44 hours (healthy)                         swift_object_auditor
0cae9eb4f35a        ppc10.test-port.net:5000/test-osp12_containers-nova-compute:12.0         "kolla_start"       44 hours ago        Up 44 hours (healthy)                         nova_compute
9152fac2c1a5        ppc10.test-port.net:5000/test-osp12_containers-nova-compute:12.0         "kolla_start"       44 hours ago        Up 44 hours (healthy)                         nova_migration_target
39de59e43be9        ppc10.test-port.net:5000/test-osp12_containers-swift-proxy-server:12.0   "kolla_start"       44 hours ago        Up 44 hours (healthy)                         swift_proxy
fddeffc5a7c0        ppc10.test-port.net:5000/test-osp12_containers-swift-object:12.0         "kolla_start"       44 hours ago        Up 44 hours (healthy)                         swift_object_replicator
d3ffa80dfb4b        ppc10.test-port.net:5000/test-osp12_containers-swift-container:12.0      "kolla_start"       44 hours ago        Up 44 hours (healthy)                         swift_container_server
f57d2d832c0c        ppc10.test-port.net:5000/test-osp12_containers-swift-object:12.0         "kolla_start"       44 hours ago        Up 44 hours (healthy)                         swift_object_server
9c539dbaaf54        ppc10.test-port.net:5000/test-osp12_containers-swift-object:12.0         "kolla_start"       44 hours ago        Up 44 hours (healthy)                         swift_rsync
d12fe34bfcf2        ppc10.test-port.net:5000/test-osp12_containers-swift-container:12.0      "kolla_start"       44 hours ago        Up 44 hours (healthy)                         swift_container_updater
ba3badc1129c        ppc10.test-port.net:5000/test-osp12_containers-nova-libvirt:12.0         "kolla_start"       44 hours ago        Up 44 hours                                   nova_libvirt
a6fe4609067e        ppc10.test-port.net:5000/test-osp12_containers-nova-libvirt:12.0         "kolla_start"       44 hours ago        Up 44 hours                                   nova_virtlogd
b998361b3aee        ppc10.test-port.net:5000/test-osp12_containers-sensu-client:12.0         "kolla_start"       44 hours ago        Up 44 hours (unhealthy)                       sensu_client

so for my point of you looks good so far. swift seems to be running. can you tell me how can i check if the ring is running. how will be saved the files... etc..

thanks br

So the ringbuilder isn't so much a service. It's a container that performs some initial configuration to define the swift rings. Rings essentially map data in the swift cluster. So if you run docker ps on its own, nothing relating to the swift-ringbuilder will appear because the container finished its operation during deployment. However, you should be able to see the container that ran the ringbuilder using:

$ sudo docker ps --all --filter name=swift_copy_rings

Hey Daniel, thanks for the explanation. i execute this command on the compute and i get this:

[root@hdhstagcomp0 d1]# sudo docker ps --all --filter name=swift_copy_rings
CONTAINER ID        IMAGE                                                                         COMMAND                  CREATED             STATUS                  PORTS               NAMES
1eb754cd269b        ppc10.test-port.net:5000/test-osp12_containers-swift-proxy-server:12.0   "/bin/bash -c 'cp -v "   2 days ago          Exited (0) 2 days ago                       swift_copy_rings

Awesome. Looks like it ran to completion and exited normally.

Daniel, I checked the container with the commands below I do not understand the output completely. Maybe you can help here.

Do you have any experience troubleshooting the swift ?

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 34375a258f61 .ppc10-port.net:5000/test-osp12_containers-swift-account:12.0 "kolla_start" 2 days ago Up 2 days (healthy) swift_account_server

I logged into the docker using this [root@ppc1stagcomp0 swift]# docker exec -it 34375a258f61 /bin/bash tput: No value for $TERM and no -T specified tput: No value for $TERM and no -T specified ()[swift@ppc1stagcomp0 /]$

swift-ring-builder /etc/swift/account.ring.gz

Output

()[swift@ppc1stagcomp0 /]$ swift-ring-builder /etc/swift/account.ring.gz Note: using /etc/swift/account.builder instead of /etc/swift/account.ring.gz as builder file /etc/swift/account.builder, build version 3, id 02de34e9ce7a427aac055441e952805e 1024 partitions, 2.000000 replicas, 1 regions, 1 zones, 2 devices, 0.00 balance, 0.00 dispersion The minimum number of hours before a partition can be reassigned is 1 (0:00:00 remaining) The overload factor is 0.00% (0.000000) Ring file /etc/swift/account.ring.gz is up-to-date Devices: id region zone ip address:port replication ip:port name weight partitions balance flags meta 0 1 1 10.10.10.42:6002 10.10.10.42:6002 d1 100.00 1024 0.00 1 1 1 10.10.10.49:6002 10.10.10.49:6002 d1 100.00 1024 0.00 tput: No value for $TERM and no -T specified tput: No value for $TERM and no -T specified

swift-ring-builder /etc/swift/container.ring.gz

Output

()[swift@ppc1stagcomp0 /]$ swift-ring-builder /etc/swift/container.ring.gz Note: using /etc/swift/container.builder instead of /etc/swift/container.ring.gz as builder file /etc/swift/container.builder, build version 3, id 79ace65648b549d3b52a0a6a99c2f6a3 1024 partitions, 2.000000 replicas, 1 regions, 1 zones, 2 devices, 0.00 balance, 0.00 dispersion The minimum number of hours before a partition can be reassigned is 1 (0:00:00 remaining) The overload factor is 0.00% (0.000000) Ring file /etc/swift/container.ring.gz is up-to-date Devices: id region zone ip address:port replication ip:port name weight partitions balance flags meta 0 1 1 10.10.10.42:6001 10.10.10.42:6001 d1 100.00 1024 0.00 1 1 1 10.10.10.49:6001 10.10.10.49:6001 d1 100.00 1024 0.00 tput: No value for $TERM and no -T specified tput: No value for $TERM and no -T specified

swift-ring-builder /etc/swift/object.ring.gz

Output

()[swift@ppc1stagcomp0 /]$ swift-ring-builder /etc/swift/object.ring.gz Note: using /etc/swift/object.builder instead of /etc/swift/object.ring.gz as builder file /etc/swift/object.builder, build version 3, id a8f9aa2fb3b8494995614af36e972be7 1024 partitions, 2.000000 replicas, 1 regions, 1 zones, 2 devices, 0.00 balance, 0.00 dispersion The minimum number of hours before a partition can be reassigned is 1 (0:00:00 remaining) The overload factor is 0.00% (0.000000) Ring file /etc/swift/object.ring.gz is up-to-date Devices: id region zone ip address:port replication ip:port name weight partitions balance flags meta 0 1 1 10.10.10.42:6000 10.10.10.42:6000 d1 100.00 1024 0.00 1 1 1 10.10.10.49:6000 10.10.10.49:6000 d1 100.00 1024 0.00 tput: No value for $TERM and no -T specified tput: No value for $TERM and no -T specified

What are you trying to do here?

Got this commands from RH support to check your rings. " Once you are inside the container, you can run:

swift-ring-builder /etc/swift/account.ring.gz swift-ring-builder /etc/swift/container.ring.gz swift-ring-builder /etc/swift/object.ring.gz

to check the rings "

Right, so the commands you've run report back the rings info.

What exactly are you troubleshooting? It doesn't seem like anything is wrong.

I would like to understand how swift ring works. we do not have troubles currently but in case we have issues i would like to know which possibilities i have to fix it. the documentations i found are not really clear to me.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.