Commit Graph

18 Commits (65e132a734f005f090a384bfa129482d195c6d6e)

Author SHA1 Message Date
German Eichberger 686303e79d Amphora logging
Configure rsyslog to forward logs to a target host

Co-Authored-By: Michael Johnson <>
Story: 1665069
Task: 33646

Change-Id: I00703f86555cbb574b943794b14a36fbc644f1b2
2019-06-14 09:02:26 -07:00
Michael Johnson 80ddbaeef4 Align logging in the amphora
This patch configures the primary components of the amphora to log
to syslog using consistent logging facilities.
By default, user traffic logs will go to LOG_LOCAL0 and the amphora
processes (haproxy, keepalived, etc.) will log to LOG_LOCAL1.

This is a patch supporting log offloading.

Change-Id: Ifda91e0310e812e34f1e398dd3176af8a9c58f89
Story: 1665069
Task: 5486
2019-06-13 12:42:18 -07:00
Zuul 59660fb365 Merge "Force amp-agent communication to TLSv1.2" 2019-06-03 13:56:23 +00:00
Adam Harwell 5b831f2a5b Force amp-agent communication to TLSv1.2
Also allow configuration of this minimum.
The previous default of SSLv2/3 is very insecure.

Change-Id: If34c7c34d9a6a77685fb177976dc2070760c7b37
2019-05-14 14:02:57 -07:00
Carlos Goncalves c4faac25de Add Python 3.7 support
In order to support Python 3.7, pylint has to be updated to 2.0.0
minimum. Newer versions of Pylint enforce additional checkers which can
be addressed with some code refactoring rather than silently ignoring
them in pylintrc; except useless-object-inheritance which is required to
be silented so that we stay compatible with Python 2.x.

Story: 2004073
Task: 27434

Change-Id: I52301d763797d619f195bd8a1c32bc47f1e68420
2019-05-14 17:11:22 +00:00
WangBinbin 039395f7ee Replace six.iteritems() with .items()
we should avoid using six.iteritems to achieve iterators.
We can use dict.items instead, as it will return iterators in PY3 as well.
And dict.items/keys will be more readable.

In py2, the performance about list should be negligible

Change-Id: I153d91e884ef0ea0a760527f3dab2b8d5ed3e38e
2017-03-13 02:56:27 +08:00
Adam Harwell bf8aac5561 Amphora-agent should log to a distinct location
This patch sets up a seperate log file for the amphora-agent
and logrotate to manage this new log.

Co-Authored-By: Adam Harwell <>
Co-Authored-By: Michael Johnson <>
Change-Id: Ia7b057642d7a567d685d989d1c689d5f3481e73e
2016-12-16 22:02:44 +00:00
Dustin Lundquist 126ec9701e Properly format IPv6 bind address strings
This fixes:
    Error: '::9443' is not a valid port number.

Introduce unit test skeleton for amphora agent.

Change-Id: Ic7aebf0674ba7036356bb3231c26fa309cd4c475
2016-11-29 11:10:03 -08:00
Jenkins 6a67d49642 Merge "Remove CONF.import_group" 2016-11-28 18:29:37 +00:00
Lubosz "diltram" Kosnik 867b350988 Remove CONF.import_group
Remove unneeded import_group lines which are not doing anything and just makes
code harder to understand.

Change-Id: I673dd04dd31ae9771e6af982d184eee0e9cbf2d4
2016-11-21 15:54:15 -06:00
Adam Harwell 48a1e7cbe9 Run amphora agent with gunicorn
Flask's default runner (werkzeug) is plagued with bugs.
If we use gunicorn instead, we should have many less problems!

Depends-On: I211dc771aa95147c0f1d9e6ac1a65a7e164b33c2
Change-Id: I59897167f9285bf013f8a155dd2ea4f799ac1d3f
2016-10-26 17:42:49 +02:00
Nir Magnezi 12d2a0f01b Amphora agent refactor to classes
This patch is a prep work needed for Id99948aec64656a0532afc68e146f0610bff1378
which comes to Fix the amphora-agent support for RH based Linux flavors.

This is a pure refactor. Functions were gathered under classes (making
them methods) so state, such as the operating system flavor, can be preserved
throughout the entire amphora agent process lifecycle.

Related-Bug: #1548070

Change-Id: Ic149211dba8ea78e08cb06b6e1f65da00a6571c7
2016-09-19 14:26:29 +03:00
ZhiQiang Fan 632ab41a03 [Trivial] Remove unnecessary executable privilege
They are modules, should be imported rather than running in shell,
hence not require for executable privilege.

Change-Id: I869d73411ec8e308a80d780e10e77dcc48097d42
2016-05-21 13:17:04 +00:00
caoyue 1f5031fedc Remove unused logging import
it's obviously the code was copied from other place,
let's make it perfect.

Change-Id: I4f24622c497dd65d1d8a3e829a5ef8c4978f6a46
2016-01-15 16:29:01 +08:00
Bertrand Lallau d5e0811926 Add Guru Meditation Report feature
Oslo_reports enables OpenStack projects to dump Guru Meditation
Reports with useful debugging information to files or stderr.

Closes-Bug: #1514504
Change-Id: Id35fb7dc8c31f304cbf1d9cca0d21b9d5e97865a
2015-11-13 12:03:19 +01:00
Carlos D. Garza ccd7865350 Implement UDP heartbeat sender and receiver
Used binary compressed encoding of json dumped object. To reduce
the size needed to send heart beats incase some stats objects
start getting sent later on. Also used sha256 instead of sha1
with hmac.

Co-Authored-By: Michael Johnson <>
Co-Authored-By: German Eichberger <>
Co-Authored-By: Carlos Garza <>
Partially implements: health-manager
Change-Id: I932c693101b94c9132e1741291610508876eab43
2015-09-09 06:48:24 +00:00
German Eichberger 0df52a7a84 Adds the reload on cert change
Adds the functionality to reload the REST agent  when
the certificat to communicate with the controller

Change-Id: Ifda7ddce5979237b8c00a22a24f73d3c6f993f07
2015-08-06 08:43:07 -07:00
German Eichberger 40440b8a0b Implements the haproxy amphora agent api server
- Added configuration
- Added uploading of haproxy config
- Added start, stop, reload (async)
- Added get_details
- Fixed returns of API -- they are now all spec conform
- Added info, get haproxy file
- Added function to get listener status
- Added class to parse haproxy stats socket
- Added methods to handle certs
- Added client cert validation to the sever
- Added script to generate example certs
- Added init script for agent
- Added network and vip plugging
- Added devstack stuff
- Added diskimage scripts; upstart ini file

Change-Id: Ib1db8da9e019e68e9a0f4a16a622b8b1286afd3e
Implements: blueprint amphora-api
2015-06-02 18:13:39 +00:00