summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--INFO22
-rw-r--r--INFO.yaml1
-rw-r--r--devstack/README.rst4
-rw-r--r--devstack/local.conf.sample120
-rw-r--r--docs/development/overview/functest_scenario/doctor-scenario-in-functest.rst10
-rw-r--r--docs/development/overview/testing.rst3
-rw-r--r--docs/release/release-notes/release-notes.rst208
-rw-r--r--docs/release/release-notes/releasenotes_gambia.rst303
-rw-r--r--doctor_tests/admin_tool/fenix/Dockerfile33
-rwxr-xr-xdoctor_tests/admin_tool/fenix/run32
-rw-r--r--doctor_tests/common/constants.py4
-rw-r--r--doctor_tests/installer/apex.py21
-rw-r--r--doctor_tests/installer/base.py7
-rw-r--r--doctor_tests/installer/common/set_fenix.sh52
-rw-r--r--doctor_tests/scenario/fault_management.py4
-rw-r--r--doctor_tests/scenario/maintenance.py41
-rw-r--r--tox.ini1
17 files changed, 686 insertions, 180 deletions
diff --git a/INFO b/INFO
deleted file mode 100644
index 823d1d9..0000000
--- a/INFO
+++ /dev/null
@@ -1,22 +0,0 @@
-Project: Fault Management project (doctor)
-Project Creation Date: December 2, 2014
-Project Category: Requirement
-Lifecycle State: Mature
-Primary Contact: Tomi Juvonen (tomi.juvonen@nokia.com)
-Project Lead: Tomi Juvonen (tomi.juvonen@nokia.com)
-Jira Project Name: Fault Management project
-Jira Project Prefix: DOCTOR
-Mailing list tag: [doctor]
-IRC: Server:freenode.net Channel:#opnfv-doctor
-Repository: doctor
-
-Committers:
-Dong Wenjuan (ZTE, dong.wenjuan@zte.com.cn)
-Tomi Juvonen (Nokia, tomi.juvonen@nokia.com)
-
-Link to TSC approval of the project: http://meetbot.opnfv.org/meetings/opnfv-meeting/2014/opnfv-meeting.2014-12-02-14.58.html
-Link(s) to approval of committer update:
-http://lists.opnfv.org/pipermail/opnfv-tsc/2015-June/000905.html
-http://lists.opnfv.org/pipermail/opnfv-tech-discuss/2015-June/003165.html
-http://lists.opnfv.org/pipermail/opnfv-tech-discuss/2016-June/011245.html
-http://lists.opnfv.org/pipermail/opnfv-tech-discuss/2016-July/011771.html
diff --git a/INFO.yaml b/INFO.yaml
index 4bc41cf..97acb69 100644
--- a/INFO.yaml
+++ b/INFO.yaml
@@ -39,6 +39,7 @@ committers:
company: 'ZTE'
id: 'dongwenjuan'
tsc:
+ # yamllint disable rule:line-length
approval: 'http//meetbot.opnfv.org/meetings/opnfv-meeting/2014/opnfv-meeting.2014-12-02-14.58.html'
changes:
- type: 'removal'
diff --git a/devstack/README.rst b/devstack/README.rst
index 91e8abf..aaa18a7 100644
--- a/devstack/README.rst
+++ b/devstack/README.rst
@@ -18,7 +18,9 @@ OPNFV Doctor in DevStack.
enable_plugin osprofiler https://git.openstack.org/openstack/osprofiler
enable_plugin doctor https://git.opnfv.org/doctor
-to the ``[[local|localrc]]`` section.
+to the ``[[local|localrc]]`` section. Or, you can copy the local.conf.sample::
+
+ cp /<path-to-doctor>/devstack/local.conf.sample ${DEVSTACK_DIR}/local.conf
.. note:: The order of enabling plugins matters.
diff --git a/devstack/local.conf.sample b/devstack/local.conf.sample
new file mode 100644
index 0000000..2967714
--- /dev/null
+++ b/devstack/local.conf.sample
@@ -0,0 +1,120 @@
+# Sample ``local.conf`` for user-configurable variables in ``stack.sh``
+
+# NOTE: Copy this file to the root DevStack directory for it to work properly.
+
+# ``local.conf`` is a user-maintained settings file that is sourced from ``stackrc``.
+# This gives it the ability to override any variables set in ``stackrc``.
+# Also, most of the settings in ``stack.sh`` are written to only be set if no
+# value has already been set; this lets ``local.conf`` effectively override the
+# default values.
+
+# This is a collection of some of the settings we have found to be useful
+# in our DevStack development environments. Additional settings are described
+# in https://docs.openstack.org/devstack/latest/configuration.html#local-conf
+# These should be considered as samples and are unsupported DevStack code.
+
+# The ``localrc`` section replaces the old ``localrc`` configuration file.
+# Note that if ``localrc`` is present it will be used in favor of this section.
+[[local|localrc]]
+
+# Minimal Contents
+# ----------------
+
+# While ``stack.sh`` is happy to run without ``localrc``, devlife is better when
+# there are a few minimal variables set:
+
+# If the ``*_PASSWORD`` variables are not set here you will be prompted to enter
+# values for them by ``stack.sh``and they will be added to ``local.conf``.
+ADMIN_PASSWORD=devstack
+DATABASE_PASSWORD=$ADMIN_PASSWORD
+RABBIT_PASSWORD=$ADMIN_PASSWORD
+SERVICE_PASSWORD=$ADMIN_PASSWORD
+
+# ``HOST_IP`` and ``HOST_IPV6`` should be set manually for best results if
+# the NIC configuration of the host is unusual, i.e. ``eth1`` has the default
+# route but ``eth0`` is the public interface. They are auto-detected in
+# ``stack.sh`` but often is indeterminate on later runs due to the IP moving
+# from an Ethernet interface to a bridge on the host. Setting it here also
+# makes it available for ``openrc`` to include when setting ``OS_AUTH_URL``.
+# Neither is set by default.
+HOST_IP=127.0.0.1
+#HOST_IPV6=2001:db8::7
+
+
+# Logging
+# -------
+
+# By default ``stack.sh`` output only goes to the terminal where it runs. It can
+# be configured to additionally log to a file by setting ``LOGFILE`` to the full
+# path of the destination log file. A timestamp will be appended to the given name.
+LOGFILE=$DEST/logs/stack.sh.log
+
+# Old log files are automatically removed after 7 days to keep things neat. Change
+# the number of days by setting ``LOGDAYS``.
+LOGDAYS=2
+
+# Nova logs will be colorized if ``SYSLOG`` is not set; turn this off by setting
+# ``LOG_COLOR`` false.
+#LOG_COLOR=False
+
+
+# Using milestone-proposed branches
+# ---------------------------------
+
+# Uncomment these to grab the milestone-proposed branches from the
+# repos:
+#CINDER_BRANCH=milestone-proposed
+#GLANCE_BRANCH=milestone-proposed
+#HORIZON_BRANCH=milestone-proposed
+#KEYSTONE_BRANCH=milestone-proposed
+#KEYSTONECLIENT_BRANCH=milestone-proposed
+#NOVA_BRANCH=milestone-proposed
+#NOVACLIENT_BRANCH=milestone-proposed
+#NEUTRON_BRANCH=milestone-proposed
+#SWIFT_BRANCH=milestone-proposed
+
+# Using git versions of clients
+# -----------------------------
+# By default clients are installed from pip. See LIBS_FROM_GIT in
+# stackrc for details on getting clients from specific branches or
+# revisions. e.g.
+# LIBS_FROM_GIT="python-ironicclient"
+# IRONICCLIENT_BRANCH=refs/changes/44/2.../1
+
+# Swift
+# -----
+
+# Swift is now used as the back-end for the S3-like object store. Setting the
+# hash value is required and you will be prompted for it if Swift is enabled
+# so just set it to something already:
+SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5
+
+# For development purposes the default of 3 replicas is usually not required.
+# Set this to 1 to save some resources:
+SWIFT_REPLICAS=1
+
+# The data for Swift is stored by default in (``$DEST/data/swift``),
+# or (``$DATA_DIR/swift``) if ``DATA_DIR`` has been set, and can be
+# moved by setting ``SWIFT_DATA_DIR``. The directory will be created
+# if it does not exist.
+SWIFT_DATA_DIR=$DEST/data
+
+# OPNFV Doctor
+# ------------
+
+# Enable the required plugins
+# The order of enabling plugins matters
+enable_plugin aodh http://git.openstack.org/openstack/aodh
+enable_plugin panko https://git.openstack.org/openstack/panko
+enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer
+enable_plugin osprofiler https://git.openstack.org/openstack/osprofiler
+enable_plugin doctor https://git.opnfv.org/doctor
+
+# To enable Python 3
+# USE_PYTHON3=True
+
+# To enable Congress as Doctor Inspector
+# enable_plugin congress https://git.openstack.org/openstack/congress
+
+# To enable Neutron port data plane status
+# Q_ML2_PLUGIN_EXT_DRIVERS=data_plane_status
diff --git a/docs/development/overview/functest_scenario/doctor-scenario-in-functest.rst b/docs/development/overview/functest_scenario/doctor-scenario-in-functest.rst
index 9f92b5b..4505dd8 100644
--- a/docs/development/overview/functest_scenario/doctor-scenario-in-functest.rst
+++ b/docs/development/overview/functest_scenario/doctor-scenario-in-functest.rst
@@ -59,7 +59,7 @@ Doctor testing can also be triggered by tox on OPNFV installer jumphost. Tox
is normally used for functional, module and coding style testing in Python
project.
-Currently, 'Apex', 'Daisy', 'Fuel' and 'local' installer are supported.
+Currently, 'Apex', 'MCP' and 'local' installer are supported.
Fault management use case
@@ -172,9 +172,11 @@ Maintenance test case
Maintenance test case is currently running in our Apex CI and executed by tox.
This is because the special limitation mentioned below and also the fact we
-currently have only sample implementation as a proof of concept. Environmental
-variable TEST_CASE='maintenance' needs to be used when executing
-"doctor_tests/main.py". Test case workflow can be seen in :numref:`figure-p3`.
+currently have only sample implementation as a proof of concept and we also
+support unofficial OpenStack project Fenix. Environment variable
+TEST_CASE='maintenance' needs to be used when executing "doctor_tests/main.py"
+and ADMIN_TOOL_TYPE='fenix' if want to test with Fenix instead of sample
+implementation. Test case workflow can be seen in :numref:`figure-p3`.
.. figure:: ./images/Maintenance-workflow.png
:name: figure-p3
diff --git a/docs/development/overview/testing.rst b/docs/development/overview/testing.rst
index a4b9ffa..663d4c3 100644
--- a/docs/development/overview/testing.rst
+++ b/docs/development/overview/testing.rst
@@ -38,6 +38,8 @@ export TEST_CASE with different values:
export TEST_CASE='fault_management'
#Maintenance (requires 3 compute nodes)
export TEST_CASE='maintenance'
+ #Use Fenix in maintenance testing instead of sample admin_tool
+ export ADMIN_TOOL_TYPE='fenix'
#Run both tests cases
export TEST_CASE='all'
@@ -61,7 +63,6 @@ In OPNFV Apex jumphost you can run Doctor testing as follows using tox:
.. code-block:: bash
- #Before Gambia: overcloudrc.v3
source overcloudrc
export INSTALLER_IP=${INSTALLER_IP}
export INSTALLER_TYPE=${INSTALLER_TYPE}
diff --git a/docs/release/release-notes/release-notes.rst b/docs/release/release-notes/release-notes.rst
index 142bfac..7f7a198 100644
--- a/docs/release/release-notes/release-notes.rst
+++ b/docs/release/release-notes/release-notes.rst
@@ -2,35 +2,32 @@
.. http://creativecommons.org/licenses/by/4.0
-This document provides the release notes for Gambia of Doctor.
+This document provides the release notes for Hunter of Doctor.
Important notes
===============
-In Gambia release, Doctor has been working with our second use case over
-maintenance. Design guideline is now done and test case exists with sample
-maintenance workflow code implemented in Doctor. Work has also started to have
-the real implementation done in the OpenStack Fenix project
-https://wiki.openstack.org/wiki/Fenix.
+In Hunter release, Doctor has been working with fault management alarming
+enhancement and maintenance use case to upstream.
-Doctor CI testing has now moved to use tox on jumphots instead of running test
-through features container. Also in Apex we use OpenStack services running in
-containers. Functest daily testing supports Doctor fault management test case
-for Apex, Daisy and Fuel installers. This testing is done through features
-container.
+OpenStack Fenix (unofficial project) has been futher worked to implement the
+infrastructure rolling maintenance in interaction with VNFM. Doctor CI testing
+also supports maintenance testing with Fenix latest master version.
-In this release, Doctor has not been working with the fault management use case as
-the basic framework has been already done. However, we might need to get back to
-it later to better meet the tough industry requirements as well as requirements
-from edge, containers and 5G.
+MCP and Apex installers are currently supported. In MCP we test fault management
+without the enhanced alarm. In Apex we test fault management with alarm
+enhancement with sample implementation. Apex is also used for maintenance use
+case testing. Congress inspector support is not working.
+In this release, Doctor has not yet been working to look outside OpenStack.
+We might need to get back to this later to better meet the tough industry
+requirements as well as requirements from edge, containers and 5G.
Summary
=======
-Gambia Doctor framework uses OpenStack Queens integrated into its test cases.
-Compared to the previous release, the Heat project is also being used in the
-maintenance test case.
+Hunter Doctor framework uses OpenStack Rocky integrated into its test cases.
+For testing, we use Doctor CI on OPNFV installers.
Release Data
============
@@ -40,152 +37,94 @@ Doctor changes
+------------------------------------------+----------------------------------------------------------+
| **commit-ID** | **Subject** |
+------------------------------------------+----------------------------------------------------------+
-| 5b3f5937e7b861fca46b2a6b2d6708866b800f95 | fix building docs |
+| b19b69d731cfb5a87f7c928cc898ea04ec85cec6 | Fix tox to clean python cache |
+------------------------------------------+----------------------------------------------------------+
-| 2ca5924081ce4784f599437707bd32807aa155ce | Fix SSH client connection reset |
+| 364d2c2344be5775a0eef6fe19fda125d2c8853d | Handle the exception for running the profiler |
+------------------------------------------+----------------------------------------------------------+
-| baac6579556f8216b36db0d0f87f9c2d4f8b4ef5 | Support Apex with services in containers |
+| e6c857ba931a03fb7bfb49746cc4a7eb5b6ce6e1 | Hunter release documentation |
+------------------------------------------+----------------------------------------------------------+
-| 23bf63c4616040cb0d69cd26238af2a4a7c00a90 | fix the username to login undercloud in Apex |
+| 73605c5c34b97ab56306bfa9af0f5888f3c7e46d | Support Fenix as admin tool |
+------------------------------------------+----------------------------------------------------------+
-| 61eb3927ada784cc3dffb5ddd17f66e47871f708 | Local Documentation Builds |
+| 33293e9c23a21ad3228f46d2063f18c915eb2b79 | Wrong yamllint disable command |
+------------------------------------------+----------------------------------------------------------+
-| 0f1dd4314b9e0247d9af7af6df2410462423aeca | Updated from global requirements |
+| d82ab34f15a9b67185c85c6afc5562bc8b72cb8b | Add local.conf.sample for devstack deployment of Doctor |
+------------------------------------------+----------------------------------------------------------+
-| 2d4a9f0c0a93797da6534583f6e74553a4b634be | Fix links to remove references to submodules |
+| 7ecc40b445b2aa42f0680c96dc672accf4e40ba0 | Hi, the automation job failed. |
+------------------------------------------+----------------------------------------------------------+
-| 3ddc2392b0ed364eede49ff006d64df3ea456350 | Gambia release notes |
+| 2cd1ca4463121e2354fd920af2b26c65848fb9e2 | Remove Ryota from committers |
+------------------------------------------+----------------------------------------------------------+
-| 825a0a0dd5e8028129b782ed21c549586257b1c5 | delete doctor datasource in congress when cleanup |
+| f31ab961c594595772b0c3d4bd40a0d9491fc6cb | Removing committers |
+------------------------------------------+----------------------------------------------------------+
-| fcf53129ab2b18b84571faff13d7cb118b3a41b3 | run profile even the notification time is larger than 1S |
+| c653d95c67436698296e238396bf5d8370e3169a | Update to INFO file |
+------------------------------------------+----------------------------------------------------------+
-| 495965d0336d42fc36494c81fd15cee2f34c96e9 | Update and add test case |
+| e6708c869855ab69f9b53959befd82bb2f32f9ad | Bug - Testing in Apex with OpenStack master fails |
+------------------------------------------+----------------------------------------------------------+
-| da25598a6a31abe0579ffed12d1719e5ff75f9a7 | bugfix: add doctor datasource in congress |
+| e1c5dd0158d5168738fcc9918d24c04ca724b056 | remove to set ceilometer config in MCP |
+------------------------------------------+----------------------------------------------------------+
-| f9e1e3b1ae4be80bc2dc61d9c4213c81c091ea72 | Update the maintenance design document |
+| d673e9218a53e047edc5ff6cd047ac6db5112651 | Support Fenix and sample implementation accordingly |
+------------------------------------------+----------------------------------------------------------+
-| 4639f15e6db2f1480b41f6fbfd11d70312d4e421 | Add maintenance test code |
+| 916e4931a56c1a5d41d46148609bf348d4326d37 | fix the configparser for Python 2 and 3 Compatibility |
+------------------------------------------+----------------------------------------------------------+
-| b54cbc5dd2d32fcb27238680b4657ed384d021c5 | Add setup and cleanup for maintenance test |
+| 4075b417e973adb257ae39ff5c25aa182a2af3ea | index.rst was blank |
+------------------------------------------+----------------------------------------------------------+
-| b2bb504032ac81a2ed3f404113b097d9ce3d7f14 | bugfix: kill the stunnel when cleanup |
+| dafdfcfad6866d7c413d4b8d5a9d25f3ab1f76dc | Minor docs updates |
+------------------------------------------+----------------------------------------------------------+
-| eaeb3c0f9dc9e6645a159d0a78b9fc181fce53d4 | add ssh_keyfile for connect to installer in Apex |
-+------------------------------------------+----------------------------------------------------------+
-| dcbe7bf1c26052b0e95d209254e7273aa1eaace1 | Add tox and test case to testing document |
+
+Releng changes
+
+------------------------------------------+----------------------------------------------------------+
-| 0f607cb5efd91ee497346b7f792dfa844d15595c | enlarge the time of link down |
+| **commit-ID** | **Subject** |
+------------------------------------------+----------------------------------------------------------+
-| 1351038a65739b8d799820de515178326ad05f7b | bugfix: fix the filename of ssh tunnel |
+| cc290b2f937a2edbd60a5d2d1e20f333dfc7eb88 | Doctor to run Fenix as admin tool |
+------------------------------------------+----------------------------------------------------------+
-| e70bf248daac03eee6b449cd1654d2ee6265dd8c | Use py34 instead of py35 |
+| 488c558492201aacd359305a7afa3d5640a90b0e | Add parameter of `DEPLOY_SCENARIO` for doctor |
+------------------------------------------+----------------------------------------------------------+
-| 2a60d460eaf018951456451077b7118b60219b32 | add INSPECTOR_TYPE and TEST_CASE to tox env |
+| 30478e1e193485cce93164e9877002b811acf950 | remove `SSH_KEY` parameter from `doctor-slave-parameter` |
+------------------------------------------+----------------------------------------------------------+
-| 2043ceeb08c1eca849daeb2b3696d385425ba061 | [consumer] fix default value for port number |
+| 513b05275cbac2ff98950bb0a384a275dd8884f5 | Parpare ssh_key for MCP in doctor |
+------------------------------------------+----------------------------------------------------------+
-Releng changes
-
-+------------------------------------------+-----------------------------------------------------------------------+
-| **commit-ID** | **Subject** |
-+------------------------------------------+-----------------------------------------------------------------------+
-| c87309f5a75ccc5d595f708817b97793c24c4387 | Add Doctor maintenance job |
-+------------------------------------------+-----------------------------------------------------------------------+
-| bd16a9756ffd0743e143f0f2f966da8dd666c7a3 | remove congress test in Daisy |
-+------------------------------------------+-----------------------------------------------------------------------+
-| c47aaaa53c91aae93877f2532c72374beaa4eabe | remove fuel job in Doctor |
-+------------------------------------------+-----------------------------------------------------------------------+
-| ab2fed2522eaf82ea7c63dd05008a37c56e825d0 | use 'workspace-cleanup' plugin in publisher |
-+------------------------------------------+-----------------------------------------------------------------------+
-| 3aaed5cf40092744f1b87680b9205a2901baecf3 | clean the workspace in the publisher |
-+------------------------------------------+-----------------------------------------------------------------------+
-| 50151eb3717edd4ddd996f3705fbe1732de7f3b7 | run tox with 'sudo' |
-+------------------------------------------+-----------------------------------------------------------------------+
-| a3adc85ecb52f5d19ec4e9c49ca1ac35aa429ff9 | remove inspector variable form job template |
-+------------------------------------------+-----------------------------------------------------------------------+
-| adfbaf2a3e8487e4c9152bf864a653a0425b8582 | run doctor tests with different inspectors in sequence |
-+------------------------------------------+-----------------------------------------------------------------------+
-| 2e98e56224cd550cb3bf9798e420eece28139bd9 | add the ssh_key info if the key_file is exist |
-+------------------------------------------+-----------------------------------------------------------------------+
-| c109c271018e9a85d94be1b9b468338d64589684 | prepare installer info for doctor test |
-+------------------------------------------+-----------------------------------------------------------------------+
-| 57cbefc7160958eae1d49e4753779180a25864af | use py34 for tox |
-+------------------------------------------+-----------------------------------------------------------------------+
-| 3547754e808a581b09c9d22e013a7d986d9f6cd1 | specify the cacert file when it exits |
-+------------------------------------------+-----------------------------------------------------------------------+
-| ef4f36aa1c2ff0819d73cde44f84b99a42e15c7e | bugfix: wrong usage of '!include-raw' |
-+------------------------------------------+-----------------------------------------------------------------------+
-| 0e0e0d4cb71fb27b1789a2bef2d3c4ff313e67ff | use tox instead of functest for doctor CI jobs |
-+------------------------------------------+-----------------------------------------------------------------------+
-| 5b22f1b95feacaec0380f6a7543cbf510b628451 | pass value to parameters |
-+------------------------------------------+-----------------------------------------------------------------------+
-| 44ab0cea07fa2a734c4f6b80776ad48fd006d1b8 | Doctor job bugfix: fix the scenario |
-+------------------------------------------+-----------------------------------------------------------------------+
-| 17617f1c0a78c7bdad0d11d329a6c7e119cbbddd | bugfix: run doctor tests parallelly |
-+------------------------------------------+-----------------------------------------------------------------------+
-| 811e4ef7f4c37b7bc246afc34ff880c014ecc05d | delete 'opnfv-build-ubuntu-defaults' parameters for doctor verify job |
-+------------------------------------------+-----------------------------------------------------------------------+
-| 0705f31ab5bc54c073df120cbe0fe62cf10f9a81 | delete the 'node' parameter in 'doctor-slave-parameter' macro |
-+------------------------------------------+-----------------------------------------------------------------------+
-| 304151b15f9d7241db8c5fea067cafe048287d84 | fix the default node label for doctor test |
-+------------------------------------------+-----------------------------------------------------------------------+
-| a6963f92f015a33b44b27199886952205499b44c | Fix project name |
-+------------------------------------------+-----------------------------------------------------------------------+
-| f122bfed998b3b0e0178106a7538377c609c6512 | add a default value for SSH_KEY |
-+------------------------------------------+-----------------------------------------------------------------------+
-
Version change
^^^^^^^^^^^^^^
Module version changes
~~~~~~~~~~~~~~~~~~~~~~
-- OpenStack has changed from Pike-1 to Queens-1
+- OpenStack has changed from Queens-1 to Rocky-1 since previous Gambia release.
Document version changes
~~~~~~~~~~~~~~~~~~~~~~~~
-These documents have been updated in Gambia release
+These documents have been updated in Hunter release
- Testing document
docs/development/overview/testing.rst
-- Doctor scenario in functest
+- Doctor scenario in functest:
docs/development/overview/functest_scenario/doctor-scenario-in-functest.rst
-- Maintenance design guideline
- docs/development/design/maintenance-design-guideline.rst
Reason for version
^^^^^^^^^^^^^^^^^^
-Documentation is updated due to tox usage in testing and adding maintenance
-use case related documentation.
+Documentation is updated due to maintenance use case testing using Fenix.
Feature additions
~~~~~~~~~~~~~~~~~
-+--------------------+--------------------------------------------------------+
-| **JIRA REFERENCE** | **SLOGAN** |
-+--------------------+--------------------------------------------------------+
-| DOCTOR-106 | Maintenance scenario |
-+--------------------+--------------------------------------------------------+
-| DOCTOR-125 | Maintenance design document according to our test case |
-+--------------------+--------------------------------------------------------+
-| DOCTOR-126 | Use Tox instead of Functest for doctor CI jobs |
-+--------------------+--------------------------------------------------------+
-| DOCTOR-127 | Maintenance test POD |
-+--------------------+--------------------------------------------------------+
-| DOCTOR-130 | Apex with containers |
-+--------------------+--------------------------------------------------------+
-
-
++--------------------+----------------------------------------------------------+
+| **JIRA REFERENCE** | **SLOGAN** |
++--------------------+----------------------------------------------------------+
+| DOCTOR-129 | Maintenance use case implementation in OpenStack Fenix |
++--------------------+----------------------------------------------------------+
+| DOCTOR-131 | Support Fenix and sample implementation accordingly |
++--------------------+----------------------------------------------------------+
+| DOCTOR-132 | Integrate with MCP |
++--------------------+----------------------------------------------------------+
+| DOCTOR-133 | Doctor fault management with notification from Inspector |
++--------------------+----------------------------------------------------------+
Deliverables
------------
-
Software deliverables
=====================
@@ -226,18 +165,17 @@ Doctor CI results with TEST_CASE='fault_management' and INSPECTOR_TYPE=sample
+--------------------------------------+--------------+
| **TEST-SUITE** | **Results:** |
+--------------------------------------+--------------+
-| INSTALLER_TYPE='Apex' | SUCCESS |
-+--------------------------------------+--------------+
-| INSTALLER_TYPE='Compass' | N/A |
-+--------------------------------------+--------------+
-| INSTALLER_TYPE='Daisy' | SUCCESS |
-+--------------------------------------+--------------+
-| INSTALLER_TYPE='Fuel' | No POD |
+| INSTALLER_TYPE='Apex' 1) | SUCCESS |
+--------------------------------------+--------------+
-| INSTALLER_TYPE='Joid' | N/A |
+| INSTALLER_TYPE='Fuel' 2) | SUCCESS |
+--------------------------------------+--------------+
| INSTALLER_TYPE='Local' | N/A |
+--------------------------------------+--------------+
+1) Uses enhanced alarming worked in DOCTOR-133
+2) Uses alarm from Nova reset server state API generated notification. API call
+ can take a lot of time and alarm might take over a second. This also happens
+ with different installer and for more Telco grade performance we need the
+ enhanced alarming.
Doctor CI results with TEST_CASE='fault_management' and INSPECTOR_TYPE=congress
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -245,19 +183,13 @@ Doctor CI results with TEST_CASE='fault_management' and INSPECTOR_TYPE=congress
+--------------------------------------+--------------+
| **TEST-SUITE** | **Results:** |
+--------------------------------------+--------------+
-| INSTALLER_TYPE='Apex' | FAILED |
-+--------------------------------------+--------------+
-| INSTALLER_TYPE='Compass' | N/A |
-+--------------------------------------+--------------+
-| INSTALLER_TYPE='Daisy' | N/A |
-+--------------------------------------+--------------+
-| INSTALLER_TYPE='Fuel' | No POD |
+| INSTALLER_TYPE='Apex' 1) | FAILED |
+--------------------------------------+--------------+
-| INSTALLER_TYPE='Joid' | N/A |
+| INSTALLER_TYPE='Fuel' | N/A |
+--------------------------------------+--------------+
| INSTALLER_TYPE='Local' | N/A |
+--------------------------------------+--------------+
-
+1) Takes over one second because Nova reset server state error API is too slow
Doctor Functest results with TEST_CASE='fault_management'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -267,14 +199,8 @@ Doctor Functest results with TEST_CASE='fault_management'
+--------------------------------------+--------------+
| INSTALLER_TYPE='Apex' | skipped |
+--------------------------------------+--------------+
-| INSTALLER_TYPE='Compass' | N/A |
-+--------------------------------------+--------------+
-| INSTALLER_TYPE='Daisy' | skipped |
-+--------------------------------------+--------------+
| INSTALLER_TYPE='Fuel' | skipped |
+--------------------------------------+--------------+
-| INSTALLER_TYPE='Joid' | N/A |
-+--------------------------------------+--------------+
| INSTALLER_TYPE='Local' | N/A |
+--------------------------------------+--------------+
@@ -288,12 +214,16 @@ Doctor CI results with TEST_CASE='maintenance'
| **TEST-SUITE** | **Results:** |
+--------------------------------------+--------------+
| INSTALLER_TYPE='Apex' | SUCCESS |
+| ADMIN_TOOL_TYPE='sample' | |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Apex' | SUCCESS |
+| ADMIN_TOOL_TYPE='fenix' | |
+--------------------------------------+--------------+
Doctor Functest results with TEST_CASE='maintenance'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-N/A - Needs special target and currently there is only sample implementation
+N/A - Needs special target environment with at least 3 compute nodes
References
==========
diff --git a/docs/release/release-notes/releasenotes_gambia.rst b/docs/release/release-notes/releasenotes_gambia.rst
new file mode 100644
index 0000000..142bfac
--- /dev/null
+++ b/docs/release/release-notes/releasenotes_gambia.rst
@@ -0,0 +1,303 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+
+This document provides the release notes for Gambia of Doctor.
+
+Important notes
+===============
+
+In Gambia release, Doctor has been working with our second use case over
+maintenance. Design guideline is now done and test case exists with sample
+maintenance workflow code implemented in Doctor. Work has also started to have
+the real implementation done in the OpenStack Fenix project
+https://wiki.openstack.org/wiki/Fenix.
+
+Doctor CI testing has now moved to use tox on jumphots instead of running test
+through features container. Also in Apex we use OpenStack services running in
+containers. Functest daily testing supports Doctor fault management test case
+for Apex, Daisy and Fuel installers. This testing is done through features
+container.
+
+In this release, Doctor has not been working with the fault management use case as
+the basic framework has been already done. However, we might need to get back to
+it later to better meet the tough industry requirements as well as requirements
+from edge, containers and 5G.
+
+
+Summary
+=======
+
+Gambia Doctor framework uses OpenStack Queens integrated into its test cases.
+Compared to the previous release, the Heat project is also being used in the
+maintenance test case.
+
+Release Data
+============
+
+Doctor changes
+
++------------------------------------------+----------------------------------------------------------+
+| **commit-ID** | **Subject** |
++------------------------------------------+----------------------------------------------------------+
+| 5b3f5937e7b861fca46b2a6b2d6708866b800f95 | fix building docs |
++------------------------------------------+----------------------------------------------------------+
+| 2ca5924081ce4784f599437707bd32807aa155ce | Fix SSH client connection reset |
++------------------------------------------+----------------------------------------------------------+
+| baac6579556f8216b36db0d0f87f9c2d4f8b4ef5 | Support Apex with services in containers |
++------------------------------------------+----------------------------------------------------------+
+| 23bf63c4616040cb0d69cd26238af2a4a7c00a90 | fix the username to login undercloud in Apex |
++------------------------------------------+----------------------------------------------------------+
+| 61eb3927ada784cc3dffb5ddd17f66e47871f708 | Local Documentation Builds |
++------------------------------------------+----------------------------------------------------------+
+| 0f1dd4314b9e0247d9af7af6df2410462423aeca | Updated from global requirements |
++------------------------------------------+----------------------------------------------------------+
+| 2d4a9f0c0a93797da6534583f6e74553a4b634be | Fix links to remove references to submodules |
++------------------------------------------+----------------------------------------------------------+
+| 3ddc2392b0ed364eede49ff006d64df3ea456350 | Gambia release notes |
++------------------------------------------+----------------------------------------------------------+
+| 825a0a0dd5e8028129b782ed21c549586257b1c5 | delete doctor datasource in congress when cleanup |
++------------------------------------------+----------------------------------------------------------+
+| fcf53129ab2b18b84571faff13d7cb118b3a41b3 | run profile even the notification time is larger than 1S |
++------------------------------------------+----------------------------------------------------------+
+| 495965d0336d42fc36494c81fd15cee2f34c96e9 | Update and add test case |
++------------------------------------------+----------------------------------------------------------+
+| da25598a6a31abe0579ffed12d1719e5ff75f9a7 | bugfix: add doctor datasource in congress |
++------------------------------------------+----------------------------------------------------------+
+| f9e1e3b1ae4be80bc2dc61d9c4213c81c091ea72 | Update the maintenance design document |
++------------------------------------------+----------------------------------------------------------+
+| 4639f15e6db2f1480b41f6fbfd11d70312d4e421 | Add maintenance test code |
++------------------------------------------+----------------------------------------------------------+
+| b54cbc5dd2d32fcb27238680b4657ed384d021c5 | Add setup and cleanup for maintenance test |
++------------------------------------------+----------------------------------------------------------+
+| b2bb504032ac81a2ed3f404113b097d9ce3d7f14 | bugfix: kill the stunnel when cleanup |
++------------------------------------------+----------------------------------------------------------+
+| eaeb3c0f9dc9e6645a159d0a78b9fc181fce53d4 | add ssh_keyfile for connect to installer in Apex |
++------------------------------------------+----------------------------------------------------------+
+| dcbe7bf1c26052b0e95d209254e7273aa1eaace1 | Add tox and test case to testing document |
++------------------------------------------+----------------------------------------------------------+
+| 0f607cb5efd91ee497346b7f792dfa844d15595c | enlarge the time of link down |
++------------------------------------------+----------------------------------------------------------+
+| 1351038a65739b8d799820de515178326ad05f7b | bugfix: fix the filename of ssh tunnel |
++------------------------------------------+----------------------------------------------------------+
+| e70bf248daac03eee6b449cd1654d2ee6265dd8c | Use py34 instead of py35 |
++------------------------------------------+----------------------------------------------------------+
+| 2a60d460eaf018951456451077b7118b60219b32 | add INSPECTOR_TYPE and TEST_CASE to tox env |
++------------------------------------------+----------------------------------------------------------+
+| 2043ceeb08c1eca849daeb2b3696d385425ba061 | [consumer] fix default value for port number |
++------------------------------------------+----------------------------------------------------------+
+
+Releng changes
+
++------------------------------------------+-----------------------------------------------------------------------+
+| **commit-ID** | **Subject** |
++------------------------------------------+-----------------------------------------------------------------------+
+| c87309f5a75ccc5d595f708817b97793c24c4387 | Add Doctor maintenance job |
++------------------------------------------+-----------------------------------------------------------------------+
+| bd16a9756ffd0743e143f0f2f966da8dd666c7a3 | remove congress test in Daisy |
++------------------------------------------+-----------------------------------------------------------------------+
+| c47aaaa53c91aae93877f2532c72374beaa4eabe | remove fuel job in Doctor |
++------------------------------------------+-----------------------------------------------------------------------+
+| ab2fed2522eaf82ea7c63dd05008a37c56e825d0 | use 'workspace-cleanup' plugin in publisher |
++------------------------------------------+-----------------------------------------------------------------------+
+| 3aaed5cf40092744f1b87680b9205a2901baecf3 | clean the workspace in the publisher |
++------------------------------------------+-----------------------------------------------------------------------+
+| 50151eb3717edd4ddd996f3705fbe1732de7f3b7 | run tox with 'sudo' |
++------------------------------------------+-----------------------------------------------------------------------+
+| a3adc85ecb52f5d19ec4e9c49ca1ac35aa429ff9 | remove inspector variable form job template |
++------------------------------------------+-----------------------------------------------------------------------+
+| adfbaf2a3e8487e4c9152bf864a653a0425b8582 | run doctor tests with different inspectors in sequence |
++------------------------------------------+-----------------------------------------------------------------------+
+| 2e98e56224cd550cb3bf9798e420eece28139bd9 | add the ssh_key info if the key_file is exist |
++------------------------------------------+-----------------------------------------------------------------------+
+| c109c271018e9a85d94be1b9b468338d64589684 | prepare installer info for doctor test |
++------------------------------------------+-----------------------------------------------------------------------+
+| 57cbefc7160958eae1d49e4753779180a25864af | use py34 for tox |
++------------------------------------------+-----------------------------------------------------------------------+
+| 3547754e808a581b09c9d22e013a7d986d9f6cd1 | specify the cacert file when it exits |
++------------------------------------------+-----------------------------------------------------------------------+
+| ef4f36aa1c2ff0819d73cde44f84b99a42e15c7e | bugfix: wrong usage of '!include-raw' |
++------------------------------------------+-----------------------------------------------------------------------+
+| 0e0e0d4cb71fb27b1789a2bef2d3c4ff313e67ff | use tox instead of functest for doctor CI jobs |
++------------------------------------------+-----------------------------------------------------------------------+
+| 5b22f1b95feacaec0380f6a7543cbf510b628451 | pass value to parameters |
++------------------------------------------+-----------------------------------------------------------------------+
+| 44ab0cea07fa2a734c4f6b80776ad48fd006d1b8 | Doctor job bugfix: fix the scenario |
++------------------------------------------+-----------------------------------------------------------------------+
+| 17617f1c0a78c7bdad0d11d329a6c7e119cbbddd | bugfix: run doctor tests parallelly |
++------------------------------------------+-----------------------------------------------------------------------+
+| 811e4ef7f4c37b7bc246afc34ff880c014ecc05d | delete 'opnfv-build-ubuntu-defaults' parameters for doctor verify job |
++------------------------------------------+-----------------------------------------------------------------------+
+| 0705f31ab5bc54c073df120cbe0fe62cf10f9a81 | delete the 'node' parameter in 'doctor-slave-parameter' macro |
++------------------------------------------+-----------------------------------------------------------------------+
+| 304151b15f9d7241db8c5fea067cafe048287d84 | fix the default node label for doctor test |
++------------------------------------------+-----------------------------------------------------------------------+
+| a6963f92f015a33b44b27199886952205499b44c | Fix project name |
++------------------------------------------+-----------------------------------------------------------------------+
+| f122bfed998b3b0e0178106a7538377c609c6512 | add a default value for SSH_KEY |
++------------------------------------------+-----------------------------------------------------------------------+
+
+Version change
+^^^^^^^^^^^^^^
+
+Module version changes
+~~~~~~~~~~~~~~~~~~~~~~
+
+- OpenStack has changed from Pike-1 to Queens-1
+
+Document version changes
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+These documents have been updated in Gambia release
+
+- Testing document
+ docs/development/overview/testing.rst
+- Doctor scenario in functest
+ docs/development/overview/functest_scenario/doctor-scenario-in-functest.rst
+- Maintenance design guideline
+ docs/development/design/maintenance-design-guideline.rst
+
+Reason for version
+^^^^^^^^^^^^^^^^^^
+
+Documentation is updated due to tox usage in testing and adding maintenance
+use case related documentation.
+
+Feature additions
+~~~~~~~~~~~~~~~~~
+
++--------------------+--------------------------------------------------------+
+| **JIRA REFERENCE** | **SLOGAN** |
++--------------------+--------------------------------------------------------+
+| DOCTOR-106 | Maintenance scenario |
++--------------------+--------------------------------------------------------+
+| DOCTOR-125 | Maintenance design document according to our test case |
++--------------------+--------------------------------------------------------+
+| DOCTOR-126 | Use Tox instead of Functest for doctor CI jobs |
++--------------------+--------------------------------------------------------+
+| DOCTOR-127 | Maintenance test POD |
++--------------------+--------------------------------------------------------+
+| DOCTOR-130 | Apex with containers |
++--------------------+--------------------------------------------------------+
+
+
+
+Deliverables
+------------
+
+
+Software deliverables
+=====================
+
+None
+
+Documentation deliverables
+==========================
+
+https://git.opnfv.org/doctor/tree/docs
+
+Known Limitations, Issues and Workarounds
+=========================================
+
+System Limitations
+^^^^^^^^^^^^^^^^^^
+
+Maintenance test case requirements:
+
+- Minimum number of nodes: 1 Controller, 3 Computes
+- Min number of VCPUs: 2 VCPUs for each compute
+
+Known issues
+^^^^^^^^^^^^
+
+None
+
+Workarounds
+^^^^^^^^^^^
+
+None
+
+Test Result
+===========
+
+Doctor CI results with TEST_CASE='fault_management' and INSPECTOR_TYPE=sample
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
++--------------------------------------+--------------+
+| **TEST-SUITE** | **Results:** |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Apex' | SUCCESS |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Compass' | N/A |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Daisy' | SUCCESS |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Fuel' | No POD |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Joid' | N/A |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Local' | N/A |
++--------------------------------------+--------------+
+
+Doctor CI results with TEST_CASE='fault_management' and INSPECTOR_TYPE=congress
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
++--------------------------------------+--------------+
+| **TEST-SUITE** | **Results:** |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Apex' | FAILED |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Compass' | N/A |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Daisy' | N/A |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Fuel' | No POD |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Joid' | N/A |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Local' | N/A |
++--------------------------------------+--------------+
+
+
+Doctor Functest results with TEST_CASE='fault_management'
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
++--------------------------------------+--------------+
+| **TEST-SUITE** | **Results:** |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Apex' | skipped |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Compass' | N/A |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Daisy' | skipped |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Fuel' | skipped |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Joid' | N/A |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Local' | N/A |
++--------------------------------------+--------------+
+
+Note: Installer Functest does not currently test features or skips running the
+project test cases
+
+Doctor CI results with TEST_CASE='maintenance'
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
++--------------------------------------+--------------+
+| **TEST-SUITE** | **Results:** |
++--------------------------------------+--------------+
+| INSTALLER_TYPE='Apex' | SUCCESS |
++--------------------------------------+--------------+
+
+Doctor Functest results with TEST_CASE='maintenance'
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+N/A - Needs special target and currently there is only sample implementation
+
+References
+==========
+
+For more information about the OPNFV Doctor latest work, please see:
+
+https://wiki.opnfv.org/display/doctor/Doctor+Home
diff --git a/doctor_tests/admin_tool/fenix/Dockerfile b/doctor_tests/admin_tool/fenix/Dockerfile
new file mode 100644
index 0000000..90039b0
--- /dev/null
+++ b/doctor_tests/admin_tool/fenix/Dockerfile
@@ -0,0 +1,33 @@
+FROM gliderlabs/alpine:3.5
+
+ARG BRANCH=master
+ARG OPENSTACK=master
+
+EXPOSE 12347
+
+RUN echo "Building Fenix container against OpenStack $OPENSTACK" && \
+ echo "Building Fenix with $BRANCH" && \
+ mkdir /etc/fenix && \
+ mkdir -p /var/tmp/fenix
+WORKDIR /var/tmp/fenix
+COPY fenix*.conf /etc/fenix/
+RUN apk --no-cache add ca-certificates && \
+ apk --no-cache add --update python3 sshpass py-pip git curl && \
+ apk --no-cache add --virtual .build-deps --update \
+ python-dev python3-dev build-base linux-headers libffi-dev \
+ openssl-dev libjpeg-turbo-dev && \
+ curl https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK > upper-constraints.txt && \
+ pip install --upgrade pip && \
+ pip install alembic aodhclient ast decorator \
+ eventlet flask Flask-RESTful importlib \
+ keystoneauth1 logging python-novaclient oslo.config oslo.db \
+ oslo.log oslo.messaging oslo.serialization oslo.service \
+ oslotest oslo.utils pbr pymysql setuptools six sqlalchemy \
+ wsgiref -cupper-constraints.txt && \
+ git clone https://git.openstack.org/openstack/fenix -b $BRANCH /fenix && \
+ rm -fr /var/tmp/fenix
+COPY run /fenix
+COPY overcloudrc /fenix
+WORKDIR /fenix
+RUN python setup.py install
+CMD ./run
diff --git a/doctor_tests/admin_tool/fenix/run b/doctor_tests/admin_tool/fenix/run
new file mode 100755
index 0000000..2a2e37c
--- /dev/null
+++ b/doctor_tests/admin_tool/fenix/run
@@ -0,0 +1,32 @@
+#!/bin/sh
+. overcloudrc
+
+# Start the first process
+nohup python /fenix/fenix/cmd/engine.py > /var/log/fenix-engine.log&
+status=$?
+if [ $status -ne 0 ]; then
+ echo "Failed to start engine.py: $status"
+ exit $status
+fi
+
+# Start the second process
+nohup python /fenix/fenix/cmd/api.py > /var/log/fenix-api.log&
+status=$?
+if [ $status -ne 0 ]; then
+ echo "Failed to start api.py: $status"
+ exit $status
+fi
+
+echo "started Fenix: engine and api"
+while sleep 60; do
+ ps aux |grep "cmd/engine.py" |grep -q -v grep
+ PROCESS_1_STATUS=$?
+ ps aux |grep "cmd/api.py" |grep -q -v grep
+ PROCESS_2_STATUS=$?
+ # If the greps above find anything, they exit with 0 status
+ # If they are not both 0, then something is wrong
+ if [ $PROCESS_1_STATUS -ne 0 -o $PROCESS_2_STATUS -ne 0 ]; then
+ echo "One of the processes has already exited."
+ exit 1
+ fi
+done
diff --git a/doctor_tests/common/constants.py b/doctor_tests/common/constants.py
index 088ff63..201f3fc 100644
--- a/doctor_tests/common/constants.py
+++ b/doctor_tests/common/constants.py
@@ -12,6 +12,10 @@ from collections import namedtuple
Host = namedtuple('Host', ['name', 'ip'])
+def is_fenix(conf):
+ return conf.admin_tool.type == 'fenix'
+
+
class Inspector(object):
CONGRESS = 'congress'
SAMPLE = 'sample'
diff --git a/doctor_tests/installer/apex.py b/doctor_tests/installer/apex.py
index 79c59e9..3ec2100 100644
--- a/doctor_tests/installer/apex.py
+++ b/doctor_tests/installer/apex.py
@@ -9,6 +9,8 @@
import time
from doctor_tests.common.constants import Inspector
+from doctor_tests.common.constants import is_fenix
+from doctor_tests.common.utils import get_doctor_test_root_dir
from doctor_tests.common.utils import SSHClient
from doctor_tests.installer.base import BaseInstaller
@@ -19,6 +21,7 @@ class ApexInstaller(BaseInstaller):
cm_set_script = 'set_config.py'
nc_set_compute_script = 'set_compute_config.py'
cg_set_script = 'set_congress.py'
+ fe_set_script = 'set_fenix.sh'
cm_restore_script = 'restore_config.py'
nc_restore_compute_script = 'restore_compute_config.py'
cg_restore_script = 'restore_congress.py'
@@ -40,6 +43,8 @@ class ApexInstaller(BaseInstaller):
self.log.info('Setup Apex installer start......')
self.key_file = self.get_ssh_key_from_installer()
self._get_overcloud_conf()
+ if is_fenix(self.conf):
+ self._copy_overcloudrc_to_controllers()
self.create_flavor()
self.set_apply_patches()
self.setup_stunnel()
@@ -53,6 +58,11 @@ class ApexInstaller(BaseInstaller):
key_path = '/home/stack/.ssh/id_rsa'
return self._get_ssh_key(self.client, key_path)
+ def _copy_overcloudrc_to_controllers(self):
+ for ip in self.controllers:
+ cmd = "scp overcloudrc %s@%s:" % (self.node_user_name, ip)
+ self._run_cmd_remote(self.client, cmd)
+
def _get_overcloud_conf(self):
self.log.info('Get overcloud config details from Apex installer'
'......')
@@ -90,6 +100,7 @@ class ApexInstaller(BaseInstaller):
def set_apply_patches(self):
self.log.info('Set apply patches start......')
+ fenix_files = None
set_scripts = [self.cm_set_script]
@@ -104,6 +115,10 @@ class ApexInstaller(BaseInstaller):
if self.conf.test_case != 'fault_management':
if self.use_containers:
restart_cmd += self._set_docker_restart_cmd("nova-scheduler")
+ if is_fenix(self.conf):
+ set_scripts.append(self.fe_set_script)
+ testdir = get_doctor_test_root_dir()
+ fenix_files = ["Dockerfile", "run"]
else:
restart_cmd += ' openstack-nova-scheduler.service'
set_scripts.append(self.nc_set_compute_script)
@@ -118,6 +133,12 @@ class ApexInstaller(BaseInstaller):
for node_ip in self.controllers:
client = SSHClient(node_ip, self.node_user_name,
key_filename=self.key_file)
+ if fenix_files is not None:
+ for fenix_file in fenix_files:
+ src_file = '{0}/{1}/{2}'.format(testdir,
+ 'admin_tool/fenix',
+ fenix_file)
+ client.scp(src_file, fenix_file)
self._run_apply_patches(client,
restart_cmd,
set_scripts,
diff --git a/doctor_tests/installer/base.py b/doctor_tests/installer/base.py
index df781ee..7e2658e 100644
--- a/doctor_tests/installer/base.py
+++ b/doctor_tests/installer/base.py
@@ -209,8 +209,13 @@ class BaseInstaller(object):
except:
client.scp(script_abs_path, script_name)
try:
- cmd = 'sudo %s %s' % (python, script_name)
+ if ".py" in script_name:
+ cmd = 'sudo %s %s' % (python, script_name)
+ else:
+ cmd = 'sudo chmod 700 %s;sudo ./%s' % (script_name,
+ script_name)
ret, output = client.ssh(cmd)
+ self.log.info('Command %s output %s' % (cmd, output))
except:
ret, output = client.ssh(cmd)
diff --git a/doctor_tests/installer/common/set_fenix.sh b/doctor_tests/installer/common/set_fenix.sh
new file mode 100644
index 0000000..a660af7
--- /dev/null
+++ b/doctor_tests/installer/common/set_fenix.sh
@@ -0,0 +1,52 @@
+#!/usr/bin/env bash
+
+##############################################################################
+# Copyright (c) 2018 Nokia Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# Config files
+echo "[DEFAULT]" > fenix.conf
+echo "[DEFAULT]" > fenix-api.conf
+echo "port = 12347" >> fenix.conf
+echo "port = 12347" >> fenix-api.conf
+grep -m1 "^transport" /var/lib/config-data/puppet-generated/nova/etc/nova/nova.conf >> fenix.conf
+grep -m1 "^transport" /var/lib/config-data/puppet-generated/nova/etc/nova/nova.conf >> fenix-api.conf
+echo "[database]" >> fenix.conf
+MYSQLIP=`grep -m1 "^connection=mysql" /var/lib/config-data/puppet-generated/nova/etc/nova/nova.conf | sed -e "s/.*@//;s/\/.*//"`
+echo "connection=mysql+pymysql://fenix:fenix@$MYSQLIP/fenix?read_default_group=tripleo&read_default_file=/etc/my.cnf.d/tripleo.cnf" >> fenix.conf
+
+# Mysql pw
+MYSQLPW=`cat /var/lib/config-data/mysql/etc/puppet/hieradata/service_configs.json | grep mysql | grep root_password | awk -F": " '{print $2}' | awk -F"\"" '{print $2}'`
+
+# Fenix DB
+[ `mysql -uroot -p$MYSQLPW -e "SELECT host, user FROM mysql.user;" | grep fenix | wc -l` -eq 0 ] && {
+ mysql -uroot -p$MYSQLPW -hlocalhost -e "CREATE USER 'fenix'@'localhost' IDENTIFIED BY 'fenix';"
+ mysql -uroot -p$MYSQLPW -hlocalhost -e "GRANT ALL PRIVILEGES ON fenix.* TO 'fenix'@'' identified by 'fenix';FLUSH PRIVILEGES;"
+}
+mysql -ufenix -pfenix -hlocalhost -e "DROP DATABASE IF EXISTS fenix;"
+mysql -ufenix -pfenix -hlocalhost -e "CREATE DATABASE fenix CHARACTER SET utf8;"
+
+# Remove previous container
+for img in `docker image list | grep "^fenix" | awk '{print $1}'`; do
+ for dock in `docker ps --all -f "ancestor=$img" | grep "$img" | awk '{print $1}'`; do
+ docker stop $dock; docker rm $dock;
+ done;
+ docker image rm $img;
+done
+
+# Build Fenix container and run it
+chmod 700 run
+docker build --build-arg OPENSTACK=master --build-arg BRANCH=master --network host /home/heat-admin -t fenix | tail -1
+docker run --network host -d --name fenix -p 12347:12347 -ti fenix
+if [ $? -eq 0 ]; then
+ echo "Fenix start: OK"
+else
+ echo "Fenix start: FAILED"
+fi
+# To debug check log from fenix container
+# docker exec -ti fenix tail -f /var/log/fenix-engine.log
diff --git a/doctor_tests/scenario/fault_management.py b/doctor_tests/scenario/fault_management.py
index a110b88..5216aa8 100644
--- a/doctor_tests/scenario/fault_management.py
+++ b/doctor_tests/scenario/fault_management.py
@@ -209,6 +209,10 @@ class FaultManagement(object):
detected = self.monitor.detected_time
notified = self.consumer.notified_time
+ if None in [vmdown, hostdown, detected, notified]:
+ self.log.info('one of the time for profiler is None, return')
+ return
+
# TODO(yujunz) check the actual delay to verify time sync status
# expected ~1s delay from $trigger to $linkdown
relative_start = linkdown
diff --git a/doctor_tests/scenario/maintenance.py b/doctor_tests/scenario/maintenance.py
index a2129f6..7c2c17e 100644
--- a/doctor_tests/scenario/maintenance.py
+++ b/doctor_tests/scenario/maintenance.py
@@ -142,22 +142,39 @@ class Maintenance(object):
(self.conf.admin_tool.ip,
self.conf.admin_tool.port,
self.endpoint))
-
- # let's start maintenance 20sec from now, so projects will have
- # time to ACK to it before that
- maintenance_at = (datetime.datetime.utcnow() +
- datetime.timedelta(seconds=30)
- ).strftime('%Y-%m-%d %H:%M:%S')
- data = {'hosts': maintenance_hosts,
- 'state': 'MAINTENANCE',
- 'maintenance_at': maintenance_at,
- 'metadata': {'openstack_version': 'Rocky'},
- 'workflow': 'default'}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'}
- ret = requests.post(url, data=json.dumps(data), headers=headers)
+ retries = 12
+ while retries > 0:
+ # let's start maintenance 20sec from now, so projects will have
+ # time to ACK to it before that
+ maintenance_at = (datetime.datetime.utcnow() +
+ datetime.timedelta(seconds=30)
+ ).strftime('%Y-%m-%d %H:%M:%S')
+
+ data = {'state': 'MAINTENANCE',
+ 'maintenance_at': maintenance_at,
+ 'metadata': {'openstack_version': 'Rocky'},
+ 'workflow': 'default'}
+
+ if self.conf.admin_tool.type == 'sample':
+ data['hosts'] = maintenance_hosts
+ else:
+ data['hosts'] = []
+ try:
+ ret = requests.post(url, data=json.dumps(data),
+ headers=headers)
+ except:
+ if retries == 0:
+ raise Exception('admin tool did not respond in 120s')
+ else:
+ self.log.info('admin tool not ready, retry in 10s')
+ retries = retries - 1
+ time.sleep(10)
+ continue
+ break
if ret.status_code != 200:
raise Exception(ret.text)
return ret.json()['session_id']
diff --git a/tox.ini b/tox.ini
index 2242637..8f734fc 100644
--- a/tox.ini
+++ b/tox.ini
@@ -34,6 +34,7 @@ passenv =
SSH_KEY
changedir = {toxinidir}/doctor_tests
commands = doctor-test
+ /bin/find {toxinidir} -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
[testenv:pep8]
changedir = {toxinidir}