Ansible precheck tasks

Registered by Sam Yaple

There are many scenarios that can cause a deploy to fail. We can't fix all of these inline with the playbook runs, but we can check their presents _before_ we deploy. The work items listed below should be explanatory to the type of things we will be checking.

There are a few things we can do with the information we get. We can attempt to solve them (stopping services, cleaning up files, modprobing etc) or fail and inform the user so they can take action.

Blueprint information

Status:
Complete
Approver:
Sam Yaple
Priority:
Medium
Drafter:
Sam Yaple
Direction:
Approved
Assignee:
Vladislav Belogrudov
Definition:
Approved
Series goal:
Accepted for newton
Implementation:
Implemented
Milestone target:
milestone icon newton-3
Started by
Sam Yaple
Completed by
Steven Dake

Related branches

Sprints

Whiteboard

View the ironic neutron check for an example of the config precheck we could do. --SamYaple

http://docs.openstack.org/liberty/config-reference/content/firewalls-default-ports.html - the ports we should check. Possible solutions can use curl,netstat,lsof. I think lsof is more general - we will get a list of ports and grep them in aforementioned set. --vbel

Docker service - do we stick to the idea of standard install, i.e. checking service via cli 'service'? 'service' module of Ansible is not useful in this context because it is disruptive. --vbel

libvirt service can be trickier to detect because one can run it with local socket - /var/run/libvirt/libvirt-sock or /var/run/libvirt/libvirt-sock-ro. Both still can be detected. Just another pattern like ports. --vbel

what would be the file hierarchy to do these checks? precheck.yml beside site.yml? or precheck folder? precheck can include main.yml + ports.yml, sockets.yml, services.yml, etc. --vbel

We also need to check if kvm module is loaded on the compute nodes. -- Hui
We could just modprobe kvm in start up script though I would make a more sophisticated check that kvm really is wanted (thinking about xen, hyperv, esxi) --vbel
Do we need to install like pip, docker-py as in the requirement.txt? I think it would be nice to build a system from scratch. - Hui

Please keep the status of the work items up to date vbel. --sdake

moving to newton-3 expected to be released on 2016-09-02. Please try to finish it before that otherwise it will be moved to Octata. - coolsvap

Gerrit topic: https://review.openstack.org/#q,topic:bp/precheck-tasks,n,z

Addressed by: https://review.openstack.org/239882
    Add playbook for hosts pre-deployment checks (ports, services)

Gerrit topic: https://review.openstack.org/#q,topic:prechecks,n,z

Addressed by: https://review.openstack.org/269471
    prechecks: check ansible version on deployment host

Addressed by: https://review.openstack.org/269900
    Update docker and docker-py reqs

Addressed by: https://review.openstack.org/269470
    prechecks: remove the docker max version check

(?)

Work Items

Work items:
Check if ports are in-use for all services: DONE
Ensure Docker and docker-py are installed and the appropriate versions: DONE
Ensure Docker service is running: DONE
Ensure config options are set/non-conflicting: TODO

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.