Commit Graph

12 Commits (06659759f1213df23f1d456503b1dd2ea8e90963)

Author SHA1 Message Date
coldmoment ba8ad5e37f Add a hacking rule for string interpolation at logging
String interpolation should be delayed to be handled
by the logging code, rather than being done at the point
of the logging call.
See the oslo i18n guideline

Change-Id: I8a4f5f896865aebbff88ee894f0081e58cfce9ef
6 years ago
yuanpeng 71d25456d2 Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.


Change-Id: If1f4bd2f6be967368f52fb367c5a428d3eb58a9d
6 years ago
Spyros Trigazis 97d5e6ebe7 Move scale managers at driver level
Following up cluster drivers implementation, move the scale managers
at driver level. This change is needed to add the driver field

Change-Id: Ia854f2354c51b5fa47095bb4cb118416f3f01a33
Implements: blueprint bay-drivers
6 years ago
fengbeihong fc55b01678 Fix magnum cluster-update error
Closes-Bug: #1636050
Change-Id: I498b0ff477f451e48a95881b8b63f3840016ac3f
7 years ago
Wenzhi Yu 4a7d265aeb Implement mesos cluster smart scale down
We currently allow Magnum to scale down mesos cluster by removing nodes
from the cluster's ResourceGroup by updating the heat stack that created
the cluster. The problem with this approach is that Heat decides which
nodes to delete, and all containers on that node will also be deleted.

The smart cluster scale down feature has been implemented for k8s bays(
for k8s cluster, we'll ask Heat to delete nodes that have NO CONTAINERS
on them).

This patch proposes a similar implementation for a mesos cluster.

Change-Id: I00cda7f35c9db978bdc604cf86603ef58e339256
Implements: blueprint mesos-smart-bay-scale-down
7 years ago
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
7 years ago
Eli Qiao b0ce382cf1 Use bay to init K8sAPI instead of bay_uuid
This patch aimed to reduce db call count when we invode k8sAPI.

For those user using bay name to do pod/rc/service operations, we
can saving a db call.

Change-Id: I1488d0526e1d444cb681b408f8a13ce25b4aee6f
7 years ago 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
7 years ago
Hongbin Lu 39270aefaf Fixed a DBerror on reducing node_count on bay
The method "create_k8s_api" expects a bay_uuid argument, but a bay
was passed, which causes the error.

Change-Id: I9cbf6c11bf62ea938624adf6f8c050097dab91ca
Closes-Bug: #1539356
7 years ago
Ton Ngo 4bfed61fe3 Migrate to Kubernetes Release 1
Kubernetes Release 1.0 was announced at OSCON

A new Fedora Atomic image has been built with version 1.0.4 and
this series of patches will update the templates, scripts, documents
to work with the new image.

The api has also been changed from v1beta3 to v1 and the beta
api is no longer available, so the interface between Magnum and
Kubernetes master are updated as well in this series of patches.

This particular patch will bring up a V1 cluster with the
bay-create command.  Because the switch to the V1 API requires
all the code changes to be applied at once, this patch pulls
in portion of 3 patches together.  The changes include:

1. devstack plugin downloads the new image.

2. k8s conductor and other code calls the new V1 client and
k8s methods.

3. Configuration for k8s services and docker updated with
new parameters.

4. Minion registration and example code updated to V1.

5. Functional tests updated to V1.

6. Gate test setup points to the new image.

Co-Authored-By: Hongbin Lu <>

Change-Id: I046931ad491e8b7ee45943852901eac5c3df913e
Partially-Implements: blueprint kubernetes-v1
8 years ago
Joe Cropper 16688d42a7 Clean up miscellaneous help strings
This patch makes some general cleanup changes to help strings to tidy
up various areas of the code. No functional impacts result from the
changes within this patch.

Closes-Bug: #1477837
Change-Id: I25a81059e974ac0083bb439f1cd37fb82157b3bb
8 years ago
Hongbin Lu 3e6816a575 Implement bay smart scale down
We currently allow Magnum to scale down bays by removing nodes from
the Bay's ResourceGroup by updating the heat stack that created the bay.
The problem with this approach is that Heat decides which node to delete,
and all containers on that node will also be deleted. This patch make
the selection process smarter: we ask Heat to delete Bay node(s)
that have NO CONTAINERS on them.

Change-Id: Ic4d754dfe358dd8aad020bc3b80a4c9f3f1525fc
Implements: blueprint magnum-smart-bay-scale-down
8 years ago