It is implemented by updating the Heat stack with the new node_count
Partially implements: blueprint update-node-count
Change-Id: I2c331043bb6e6fce14fc82932dcd9c3677448598
This variable is concurrently read and write, so it needs to be local.
In addition, it needs to be incremented on each 'poll_and_check'.
Change-Id: I02ab50c7c005e11df9b9b84b0241323e24b9c295
Closes-Bug: 1419586
Moved poll_and_checkout out of method bay_create. This allows code
to be reused by other methods in the class.
Partially implements: blueprint update-node-count
Change-Id: I6b9073fa9f8e6cfb8f28ce0d6d6b8997ad1d4309
Oslo team is recommending everyone to use the direct imports and
not use the Oslo namespaces. So switch all our code to use oslo_*
instead of "from oslo." or "import oslo" or "from oslo"
NOTE: some of the tests still have mocks referring to oslo.utils
@mock.patch('oslo.utils.timeutils.utcnow')
as the tests break otherwise. We should do this later.
Closes-bug: #1419385
Change-Id: I8e3fbeb833cddc3f55674a0e781ffe69d5033ad4
newer hacking has rules for the following:
H105 Don't use author tags
H238 old style class declaration, use new style (inherit from `object`)
W292 no newline at end of file
So we need to clean them up and stop ignoring them
Change-Id: I12b995cf87d6bc0938298f397b41a4693627bb4b
If the Heat stack has already been deleted by a different context,
then there is no reason to check the results of the rc/pod/service
deletion. They will always fail, resulting in an undeleteable object.
Worse, the bay becomes undeletable.
Change-Id: Ie98b9effaa15e8849aa66d8476838c293af80150
Closes-bug: #1412204
If the Heat stack has already been deleted by the user, it shouldn't
block the bay from being deleted. Instead just ignore that Heat
exception and continue on deleting the bay as if the Heat stack
had already been deleted (because it has, or Heat has suffered data loss)
Change-Id: I38da49044f155105502a7e1bcccff45cde29fa86
Closes-Bug: 1412204
Prior to this patch, Magnum would delete stacks that entered the
FAILED state. This resulted in the information about why the
orchestration failed being lost to the user, and only avaialble
in the system logs.
Instead, keep the stack around so it can be inspected and delete
it when the bay is deleted.
Change-Id: Ie61b84ee00ea4f96580f5725e72ca35b855e0417
Closes-Bug: 1412213
If baymodel.apiserver_port is None, _retrive_k8s_master_url method return
invalid k8s master address. This fixes it.
Change-Id: Ieb907fbdb8a81b6b7a69f4d13549a24c3b58e6f8
Closes-Bug: #1411518
Pod, Service and ReplicationController have data and definition_url attribute,
but it's name is needlessly long.
This fixes it to more appropriate attribute name.
Change-Id: I64e8922ef8f6fc0dc4a7fda02aa0913ca15177e4
To retrieve a k8s address correctly, this parses stack output values.
Sequence of outputs seems have no particular order.
Change-Id: I2ab74528a0914d4bd63ce65a5c62211ccc6d723a
In this time, our heat-template doesn't support apiserver_port parameter.
So this parameter causes failing to create a stack.
This patch removes this parameter to use.
Change-Id: I8edd23a9464fed45c87f14aaa0d3609ad7f07fc2
In the output of kubecluster.yaml, master_address is the 0th value
and minion_addresses is the 2nd value
Change-Id: I5c0c481c37ad3f2b23dfe0f1c6c70ce74c3290f1
The image needs to be pulled so that it's available for
subsequent inspect and create calls.
Change-Id: I7f2731911a3fc71fbbf3b408b39e57b7521db81f
Closes-bug: #1408101
Now kube_utils.py supports creation/updating from k8s resource data.
User will be able to updload pod/service/replication_controller data to
create or update resource.
Change-Id: I98f7ab2eab7ac9e68c4e4a313a61f7d39b7596b2
This patch is adding some comments for why adding delete logic
in bay_create for bay_k8s_heat.py
Closes-Bug: #1407832
Change-Id: I7cb103e5370f1c367b20272918314231e65f35e7
kubeutils.py support k8s master endpoint url to connect remote k8s cluster.
In this change, some method signatures are refactored for future works.
Change-Id: Ie065abeef3c65ea429b799a932fe39d868fabcbf
This tests create and delete at the AMQP level and makes certain the AMQP
code is being called. This does not actually test the connection to the
handlers, which would be more like a functional test.
This test case purpose is meant to introduce pain when changing the
interface. The interface should not be changed, a new version should
be implemented.
Change-Id: Icfca04df842497515c20138ba58694805b266b55
This contains temporary implementation of updating master_address, refactoring
rpc handler and some tests.
Change-Id: Idc88795908441d987d9bb63292daccae523f7cbf
the rpcapi does not need ctxt for pod create. This results in an error
creating the POD complaining about incorrect number of parameters.
Change-Id: I98adb0c68fbcc527cd012ff353e4fd831297658b
The rpcapi client does not need ctxt. the rpcapi delivery will generate
a context automatically via the RPC subsystem.
Change-Id: Iac1e8937a24db193db94cf20307fdabba408037f