Docs: tips and tricks

Bug #1709631 reported by Eos
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Wishlist
Amy Marrich

Bug Description

14:47 < Tahvok> FWI, lxc-container-create.yml does not work. Probably because I've specified --limit
14:48 < odyssey4me> Tahvok if you limit it, you need to include lxc_hosts so that facts are
                    gathered from the host
14:52 < eoseq> odyssey4me: write that i.e. lxc_hosts tips and tricks somewhere, please :-)
14:52 < odyssey4me> eoseq if you can register a bug for it, then it should get added to docs

Changed in openstack-ansible:
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

I'm not entirely sure, but perhaps somewhere in https://docs.openstack.org/openstack-ansible/latest/admin/maintenance-tasks/scale-environment.html we should add a section for replacing containers.

To destroy containers, use the following:

cd /opt/openstack-ansible/playbooks
openstack-ansible lxc-containers-destroy --limit <container name|container group>

You will be asked two questions:

Are you sure you want to destroy the LXC containers?
Are you sure you want to destroy the LXC container data?

The first will just remove the container but leave the data in the bind mounts and logs. The second will remove the data in the bind mounts and logs too.

WARNING:
If you remove the containers and data for the entire galera_server container group you will lose all your databases! Also, if you destroy the first container in many host groups you will lose other important items like certificates, keys, etc. Be sure that you understand what you're doing when using this tool.

To create the containers again, execute the following:

cd /opt/openstack-ansible/playbooks
openstack-ansible lxc-containers-destroy --limit lxc_hosts,<container name|container group>

The lxc_hosts host group must be included as the playbook and roles executed require the use of facts from the hosts.

tags: added: low-hanging-fruit
Changed in openstack-ansible:
assignee: nobody → Amy Marrich (amy-marrich)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible (master)

Fix proposed to branch: master
Review: https://review.openstack.org/494646

Changed in openstack-ansible:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible (master)

Reviewed: https://review.openstack.org/494646
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=e2bf8b926e2bd0822941e90914159f37e54b6bd5
Submitter: Jenkins
Branch: master

commit e2bf8b926e2bd0822941e90914159f37e54b6bd5
Author: Amy Marrich (spotz) <email address hidden>
Date: Thu Aug 17 12:07:10 2017 -0500

    Add tip for destroying containers

    Tip added to detroy and recreate containers

    Change-Id: I5debe0f3e44f97782944381cff988c847c0fe4ca
    Closes-Bug: #1709631

Changed in openstack-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible 17.0.0.0b1

This issue was fixed in the openstack/openstack-ansible 17.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible 17.0.0.0b2

This issue was fixed in the openstack/openstack-ansible 17.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.