Commit Graph

178 Commits

Author SHA1 Message Date
Ilya Shakhat 113ba244f8 Fix extended plug/unplug commands
Service port configuration is not mandatory for extended plug/unplug
commands. 

Change-Id: I31d4be9d8c91109d01c3c67103edbd15e3db03d8
2020-05-04 20:47:14 +00:00
Ilya Shakhat 1e70f233f7 Extend network commands to operate with inter-service connectivity
Actions 'plug' and 'unplug' are extended to allow operating with
the connectivity between services.

Command format:
plug|unplug <service> service ingress|egress to|from <other service> service

Example:
`unplug nova service egress to db service' - this blocks the outgoing
traffic from nova service processes to port of db service.

Change-Id: Ia9717a76597da6aad408520e45f41fb25d3e0d49
2020-04-23 14:02:13 +04:00
Zuul 94ea1df3da Merge "Document how to use libvirt driver" 2019-07-22 09:59:51 +00:00
Ilya Shakhat cbab3865e8 Document how to use libvirt driver
Change-Id: I5cba6ee970b64f4a63317169c3ab90613fbe0bb6
Closes-Bug: #1836736
2019-07-22 10:54:27 +02:00
Ilya Shakhat ab0930ec6c Fix reboot command
Change-Id: Ie7598a69f336618a6daab66f3854d9ebcebe5b3a
Closes-Bug: #1836736
2019-07-22 10:53:21 +02:00
Zuul 2df8d325f8 Merge "Remove oom method since it has never been implemented" 2019-07-22 08:28:31 +00:00
Ilya Shakhat 1fe946788a Remove oom method since it has never been implemented
Change-Id: I2a0f190f69625cd1e14b0fcac4f06a69b441c20f
2019-07-22 09:48:25 +02:00
Ilya Shakhat e55bd553aa Fix representation of signal.SIG* constants
Pass signals as strings instead of using python constants
which depend on host system and have different types on py27 vs py3.

Change-Id: Ib8d7136bb3aed125a987678672142ce72e33af6f
Closes-bug: #1836736
2019-07-22 09:44:25 +02:00
Ilya Shakhat 82cb432398 Re-implement network faults using standard iptables module
1. Switch from home-made iptables module to the one from Ansible.
2. Allow to choose the direction: ingress (default) or egress.
3. Refactor to use shared schema for ports.

Change-Id: I4904c4abd0dd23ceb48ba4f3c403fa8dc498926b
2019-07-05 12:22:48 +02:00
Ilya Shakhat b53ee47466 Fix service discovery
Change-Id: I992d2b463ee425f36f3ef158df5d802d9ca7c791
2019-05-15 14:08:47 +02:00
Ilya Shakhat f531c0d97b Fix devstack and py27 jobs
* Pin version of sphinx for py27.
* In devstack job manually copy source repos from
  performa organization.

Change-Id: Ie715ee7a1dff53e4b603fdb94ecc4ab7d386a392
2019-05-15 13:23:32 +02:00
Ilya Shakhat c56709b6c1 Fix key management in devstack job
Change-Id: I4fa999b58d0bebb44fac17b30d93056da7bdb589
2019-01-14 09:56:56 +01:00
Ilya Shakhat e1cc109486 Add DevStack plugin
The plugin configures DevStack to be used with os-faults
command-line tools.

Change-Id: I2febc154eb4d8a5aa038b9320d545c02b5f513ac
2019-01-10 10:54:14 +01:00
Zuul cd747e50df Merge "Use bindep to specify binary dependencies" 2019-01-07 16:54:25 +00:00
Ilya Shakhat 956eb44277 Use bindep to specify binary dependencies
Change-Id: I16dcd0bbf891b05b3e252795edac7550fb57be77
2019-01-07 10:52:25 +01:00
ZhijunWei 3815e94721 Update hacking version
Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: I379e5684ada1b0c961260f2017543479080f8c23
2019-01-06 19:04:51 +08:00
Ilya Shakhat 51de6802f1 Add integration test for devstack cloud management driver
Change-Id: Ia69a3e28d65289c561d240476514cf0536c39868
2019-01-02 16:50:13 +01:00
Ilya Shakhat ff78b92048 Tests cleanup
* Remove dependency on ansible and libvirt libraries
* Bump python 3 version to 3.6
* Fix python warnings in the code

Change-Id: If7b495e9c3b2f5031d535954c3c3280e247871a6
2019-01-02 13:28:27 +01:00
Ilya Shakhat 87a80f6af5 Rename `tcpcloud` driver into `saltcloud`
TCPCloud was an internal name of a product owned by a company
acquired by Mirantis.

Change-Id: I6c5d6e7ee5c537c3b82f95abda63129594d3d9b4
2018-12-19 13:46:08 +00:00
Ilya Shakhat 601c49cca0 Unify auth parameters between drivers
Change-Id: I4b5f4f2920e1592459e8ffe6632c4c3cb007acc9
2018-12-19 12:50:43 +00:00
Ilya Shakhat fedc060158 Specify auth parameters in devstack tests
Single-node devstack does not have SSH key for stack user.
In all tests we will use custom os-faults key and connect to localhost
as `stack` user. Tests are also executed as `stack` user explicitly
(by default they are run as zuul user, but we do not want to rely on this).

Change-Id: Ibcc9a406dc850363e651d4023874147db45214f7
2018-12-19 12:24:44 +01:00
Ilya Shakhat 8f7e490c75 Remove deprecated methods
Change-Id: Ie0361a0607d0467bc61eef4b5212c562883db43e
2018-12-17 17:54:46 +01:00
Ilya Shakhat d544fae043 Simplify universal driver
Universal driver is a place-holder of cloud management.
Both services and nodes are configured separately.

Change-Id: Ie60ad757d07a0c96d8aec5516806fa0950748e3a
2018-12-17 14:18:14 +01:00
Ilya Shakhat 037a321506 Modify integration tests job to run on DevStack
Change-Id: I5ae22b3a02bd67534c8acb73c968b36f20008b31
2018-12-17 12:18:53 +01:00
Ilya Shakhat 1c29ed3182 Remove old drivers
Remove Fuel, screen-based DevStack, Pacemaker and Linux service drivers.
Rename devstack_systemd into devstack.
Use common schema for auth parameters.

Change-Id: I38b5f82282b72e969fc08e0948109939c95cf948
2018-11-26 20:44:53 +04:00
Ilya Shakhat b2ca946296 Do not link with Ansible code
Ansible is distributed under GPL-3.0 license and certain restrictions
are applied when its code is imported as Python library. The only safe
way to call GPL code is via general interface, e.g. CLI.

This patch removes all direct linking of Ansible code and executes
all actions via command line. It is now user responsibility to install
Ansible executable on the system.

Change-Id: If879e4ce59bcdac84bc51ea0ac9277783777c80b
2018-11-26 16:56:22 +04:00
Zuul 99d20e9bab Merge "Add docker containers support" 2018-08-17 08:35:35 +00:00
Maxim Babushkin d2514e6993 Add docker containers support
A support for the containers is required for the current releases of
OpenStack.
Add the ability to 'start', 'terminate' and 'restart' the containers.

Change-Id: Ib2beebcfa7017a9b2bb8f16dea49beef6db79d43
2018-08-06 13:31:38 +03:00
Maxim Babushkin 1c9d02cb9d Typo fix in universal driver documantation
Change-Id: I3a46d76fabb9c889aab3664757fb91273fdff208
2018-07-30 11:53:31 +03:00
Nguyen Hung Phuong d47e3cdd8a Replaces yaml.load() with yaml.safe_load()
Yaml.load() return Python object may be dangerous if you receive a YAML
document from an untrusted source such as the Internet. The function
yaml.safe_load() limits this ability to simple Python objects like integers or
lists.

Reference:
https://security.openstack.org/guidelines/ dg_avoid-dangerous-input-parsing-libraries.html

Change-Id: I4f5379e1e17129222a211ac6e6d285c40a0b9bfd
2018-02-13 13:36:37 +07:00
Ilya Shakhat b8e4a30385 Update documentation and examples
Change-Id: Ia6943edb541ab80e8dc7c6f878179e36caeaf5dc
2017-11-03 11:40:32 +01:00
Zuul 622b43d040 Merge "Add integration job for Zuul" 2017-11-02 13:42:47 +00:00
Ilya Shakhat 9534077689 Add integration job for Zuul
Change-Id: I0f4d71322eef32dd9ff14ea14f3287d6c2559a09
2017-11-02 14:11:21 +01:00
Ilya Shakhat 276405ef1c Fix custom module support in Ansible 2.4
Before Ansible 2.4 the location of modules was a ':'-separated
string, but in Ansible 2.4 it is list of paths (and a list MUST
contain more than one item).

This patch adds correct handling for both Ansible versions.

Change-Id: Iab571f9e03e0f27a7720bcea801592d0ab3d3209
2017-11-02 11:17:48 +01:00
Alex_Kholkin acdd04e4e0 Add glance-glare service to the tcpdriver
'glance-glare' service was missing in the tcpcloud.py

Change-Id: Ie09d820c858072d81ebdc345caae4c82af0077ac
2017-11-01 13:25:35 +04:00
Javier Pena a8be2c6e43 Fix for Ansible >= 2.4.0
The Ansible version was capped to < 2.4.0 in [1], since 2.4.0 refactored
the Inventory and VariableManager modules.

This patch aims at adding support for Ansible >= 2.4.0, while keeping
compatibility with earlier versions.

Change-Id: I5722fc8531671e69abe90d64a4bfd988321850b5
Closes-Bug: #1724227
2017-10-18 15:26:41 +02:00
Ilya Shakhat 7782a03a43 Add logging into human API call
Change-Id: Iafcfb0ad429c720088836a911f8e03a0bc35e8ed
2017-10-05 12:04:20 +02:00
Ilya Shakhat cc582c38e2 Universal cloud management driver
A new driver is suitable for the most abstract case. It does not have any
built-in services, all services need to be specified explicitly in
a config file.

By default the Universal driver works with only one node. To specify
more nodes use `node_list` node discovery driver. Authentication
parameters are then overridden by corresponding parameters from node
discovery.

Change-Id: Id6ede38bcf82d121ccba2baaef928fe0e7071938
2017-10-04 11:30:45 +02:00
Ilya Shakhat cd51cbae16 Universal driver for any system services (systemd, upstart, etc.)
This patch introduces `system_service` driver for services supported
by Ansible.

Change-Id: Ib22c7f2a83fb5acf3cb4b5e980ac798abdf54ae3
2017-10-04 10:50:13 +02:00
Ilya Shakhat 44b2593266 Move all service drivers under services/ package
Change-Id: I4e7d46b4a289508dbf35be4cef954bd73806efe7
2017-09-06 11:10:27 +02:00
Ilya Shakhat 4b49c49307 Refactor services module
Change-Id: Ib3ecebb3aa15124a179cb2d98c6dbbe6031fd6a1
2017-09-06 11:10:27 +02:00
Ilya Shakhat da22323dfd Make privilege escalation password configurable
Add parameter `become_password` into node list discovery
and Ansible executor.

Change-Id: Ifa3dc7c84a08171792bb4a18794cf37c2c658d8d
2017-09-05 17:03:06 +02:00
Ilya Shakhat 8bdb893209 Group drivers modules by type
Change-Id: Id5fab5efa5dfbe155e559256faf465b7d0b76706
2017-09-05 11:06:38 +02:00
Jenkins 081499f8a1 Merge "Implement stress injection" 2017-09-01 12:11:10 +00:00
Ilya Shakhat 621515995e Fix process name patterns in DevStack driver
Change-Id: Ida042acea551f94d12f8581f3ff1c0c445d1e5a9
2017-08-31 14:27:18 +02:00
Ilya Shakhat 9cf6337d5e Implement stress injection
Add new type of fault called "stress". When activated this fault
produces load on CPU, disk, memory or kernel of node. The functionality
is implemented with help of stress-ng utility.

Node collection API is extended:
   def stress(self, target, duration=None)

Human API is extended, examples of commands:
 * stress cpu for 20 seconds on controller.domain.tld node
 * stress disk for 10 seconds on all nodes
 * stress memory for 60 seconds on all nodes with keystone service

Change-Id: I8ddb2292b8dd19f476e4a5071259d1a90cbaa37c
Note: 'stress-ng' is required to be installed on target nodes.
2017-08-30 15:09:49 +02:00
Jenkins 2c6f613055 Merge "Add Devstack Systemd driver" 2017-07-31 09:02:59 +00:00
Kyrylo Romanenko f223fceec7 Add Devstack Systemd driver
Since Pike release by default DevStack is run with all the services
as systemd unit files (USE_SCREEN=False).

Changes done in patch:
add devstack_systemd driver;
add SystemdService;
add unit tests;
update documentation.

Co-Author: Kyrylo Romanenko <kromanenko@mirantis.com>
Co-Author: Ilya Shakhat <shakhat@gmail.com>

Change-Id: I136398e3d18bafa87689a97b22a5514f4831d56e
2017-07-20 15:40:12 +02:00
Kyrylo Romanenko 253b66e687 [trivial] Several typos fix in tcpcloud driver
Change-Id: Ibdf42bb104fcfb499dd0a4d42a557fc7e0d8c43f
2017-06-08 16:11:06 +03:00
Kyrylo Romanenko 19989b1625 [trivial] Several typo fixes in devstack driver.
Change-Id: I2b8e7308c06b335442b912ef3ea48f3f27d3d3d3
2017-06-02 18:10:27 +03:00