Commit Graph

18 Commits

Author SHA1 Message Date
ljhuang 1e571d311d Replace abc.abstractproperty with property and abc.abstractmethod
Replace abc.abstractproperty with property and abc.abstractmethod,
as abc.abstractproperty has been deprecated since python3.3[1]

[1]https://docs.python.org/3.8/whatsnew/3.3.html?highlight=deprecated#abc

Change-Id: Id7b94d3f3c852ba85255ca0b08d2dfc275006bab
2024-03-27 09:50:52 +00:00
Takashi Kajinami 41fa21d43c Remove six from conductor module
This is part of the steps to remove usage of six library, which is no
longer needed since python 2 support was removed.

Change-Id: I9a750de4f1ba7017c9dfd67dbf87be138421d017
2024-02-19 10:43:08 +00:00
Tovin Seven 32d088b2c1 Integrate OSProfiler in Magnum
* Add osprofiler wsgi middleware. This middleware is used for 2 things:
  1) It checks that person who wants to trace is trusted and knows
     secret HMAC key.
  2) It starts tracing in case of proper trace headers
     and adds first wsgi trace point, with info about HTTP request

* Add initialization of osprofiler at start of service
  Currently that includes oslo.messaging notifer instance creation
  to send Ceilometer backend notifications.

* Traces HTTP/RPC/DB API calls

Demo: https://hieulq.github.io/cluster-create-false-new-html.html

Co-Authored-By: Hieu LE <hieulq@vn.fujitsu.com>
Implements: blueprint osprofiler-support-in-magnum
Change-Id: I7d68995aab81d365433950aada078ef1fcd5469b
2017-01-24 07:43:31 +07:00
Spyros Trigazis f997a332da Move monitors at driver level
Following changes for cluster-drivers, move coe specific monitors
at driver level. This change is needed to add the driver field
properly.

Change-Id: Id4658b8f7400bf3c86c8ff81756fb33d1211a0b3
Implements: blueprint bay-drivers
2017-01-23 13:33:37 +01:00
Hieu LE 6d6cfb87b6 Centralize config option: docker section
Centralize config option of docker section.
Replace oslo_conf cfg to magnum.conf.

Change-Id: Ic8b2b2f0f9bfc6b02d75f57fab00c548b9d8f482
Implements: blueprint centralize-config-magnum
2016-09-22 05:57:31 +00:00
Jaycen Grant 729c2d0ab4 Rename Bay DB, Object, and internal usage to Cluster
This is patch 3 of 3 to change the internal usage of the terms
Bay and BayModel.  This patch updates Bay to Cluster in DB and
Object as well as all the usages.  No functionality should be
changed by this patch, just naming and db updates.

Change-Id: Ife04b0f944ded03ca932d70e09e6766d09cf5d9f
Implements: blueprint rename-bay-to-cluster
2016-09-08 13:01:12 -07:00
Cao Xuan Hoang 33bd24252f Clean imports in code
This patch set modifies lines which are importing objects
instead of modules. As per openstack import guide lines, user should
import modules in a file not objects.

http://docs.openstack.org/developer/hacking/#imports

Closes-Bug: #1620161

Change-Id: I7ec9022a6b1cec36c678a2cec2a1856e70a51c68
2016-09-05 09:51:38 +07:00
Jaycen Grant 0b7c6401dd Rename BayModel DB, Object, and internal usage to ClusterTemplate
This patch is the first of 3 patches to change the internal
usage of the terms Bay and BayModel. This patch updates
BayModel to ClusterTemplate. No functionality should be
changed by this patch, just naming and db updates.

Change-Id: I0803e81be6482962be2878a8ea2c7480f89111ac
Implements: blueprint rename-bay-to-cluster
2016-09-01 14:47:39 -07:00
Tom Cammann 40aa6550f1 Remove container object
Following on from removing the k8s specific APIs in
I1f6f04a35dfbb39f217487fea104ded035b75569 the objects associated with
these APIs need removal.

Remove the container object, drop the db table and remove references to
the container object. The docker_conductor has also been removed as this
was used for managing containers using Magnum objects.

Change-Id: I288fa7a9717519b1ae8195820975676d99b4d6d2
Partially-Implements: blueprint delete-container-endpoint
Co-Authored-By: Spyros Trigazis <strigazi@gmail.com>
2016-08-01 16:16:20 +02:00
ting.wang b9aa042293 Replace string format arguments with function parameters
There are files containing string format arguments inside logging
messages. Using logging function parameters should be preferred.

Change-Id: Id558f66de13146f6ae76a7a69f49721b6c3d6257
Closes-Bug: #1321274
2016-02-20 23:39:33 +08:00
Eli Qiao da89eae7e6 Clean up baymodel query of usage from a bay
For baymodel reference of a bay, we can use bay.baymodel instead of using
bay.baymodel_id to get baymodel object, this patch does a cleanup.

Implemented: blueprint add-baymodel-object-to-bay
Change-Id: I568cc090d37d6666d8d02e87788aa5fff79e46e8
2015-12-21 18:10:31 +08:00
Bharath Thiruveedula 1cfc3d067c Monitor driver for mesos bay type
Add support for computing memory utilization of memory bay

Change-Id: Iadb710f030fca62f4edb42a02209de81e369ce88
Closes-Bug: #1500300
2015-11-13 22:55:28 +05:30
Bharath Thiruveedula 9a2872dea0 use importutils in monitors.py to avoid cyclic imports
* Remove import statements from the method level.
* Use importutils to import COE monitor classes.

Change-Id: Ie343def2c97f96d6a269ee6030a83b4eaf879c1a
Closes-Bug: #1513722
2015-11-06 14:31:15 +05:30
Bharath Thiruveedula 61c9017335 Monitor driver for k8s bay type
Add support for computing memory utilization of k8s bay

Change-Id: I3eecd5e9ceab77bb1877dff2229ba2eb18a5dd76
Closes-Bug: #1500299
2015-11-05 23:30:00 +05:30
Manjeet Singh Bhatia 577688dc93 Improving comment in monitors.py
This patch will improve the comment below abstract method pull_data
which can be defined for pulling data from bay and pod as well but
comment says bay only.

Change-Id: I86cb822dc72bc9805d2c38405012206991110438
2015-11-02 17:20:39 +00:00
Eli Qiao c818df26c0 Fix swarm monitor exception
In docker 1.8 (atomic-6) image, docker inspect returns Memory information
in 'HostConfig section', this patch will adopt that changes.

Depend on: I009d8034335f54063a51b8d1395ddc6891a12346
Change-Id: I63ee2393c106d59286f49f88c85c6cba0a57ae15
Closes-Bug: #1504715
2015-10-13 19:44:58 +00:00
Hongbin Lu 30eacb52c9 Pull metrics by using TLS enabled client
Magnum introduced TLS support in swarm bay, so swarm monitor needs
to use TLS enabled client to pull data.

In addition, this commit eliminates data pulling from the docker
daemon of individual bay nodes, since they are not secured by TLS.
Instead, we always pull from swarm. Due to that, additional text
parsing is needed, since the output of docker.info from swarm is
not well formed.

Change-Id: I121bfa98622c240d5c777901794a35c0d8990345
Closes-Bug: #1503460
2015-10-08 10:45:37 -04:00
Hongbin Lu b88085c93c Implement bay monitoring and notifications
* Implement a bay monitoring framework that provides APIs to pull data from
  bay, and compute metrics based on the data.
* Add support for computing memory utilization of a swarm bay.
* Add a periodic task that sends metrics to ceilometer.

Change-Id: I32730e116c59a4e5f9d1ccb466d464c2fc1f6193
Partially-Implements: blueprint autoscale-bay
Partially-Implements: blueprint magnum-notifications
2015-09-29 14:38:03 -04:00