- Drop bay and baymodel tests
- Drop bay and baymodel from controllers
Depends-On: Ib85e4fda8e4ac467bd49590dc72ba5913bb9a19d
Story: 2009104
Task: 42957
Task: 42959
Signed-off-by: Diogo Guerra <diogo.filipe.tomas.guerra@cern.ch>
Change-Id: Ida2e42c86400438951d9804e3ce122c56a46b94f
Adding the master_lb_enabled option when creating a cluster,
which will benefit both the cloud provider side and the end
user side. For cloud prodiver, they don't have to maintain
separate cluster templates with or w/o master_lb_enabled enabled.
For end user, they can easily use one single template to create
different clusters with different configs.
Task: 39680
Story: 2007634
Change-Id: I0b586f05168ece84fd340ef7493a56688191053d
When using a public cluster template, user still need the capability
to reuse their existing network/subnet, and they also need to be
able to turn of/off the floatingip to overwrite the setting in the
public template. This patch supports that by adding those three
items as parameters when creating cluster.
Story: 2006208
Task: 35797
Change-Id: I11579ff6b83d133c71c2cbf49ee4b20996dfb918
This commit removes the fields node_addresses, master_addresses,
node_count and master_count from the cluster object since this info
will be stored in the nodegroups. At the same time, provides the way
to adapt existing clusters to the new schema.
story: 2005266
Change-Id: Iaf2cef3cc50b956c9b6d7bae13dbb716ae54eaf7
This changes the existing cluster APIs and the cluster conductor to
take into consideration nodegroups:
* create: now creates the default nodegroups for the cluster
* update: updates the default nodegroups of the cluster
* delete: deletes also the nodegroups that belong to the cluster
* cluster_resize: takes into account the nodegroup provided by the API
story: 2005266
Change-Id: I5478c83ca316f8f09625607d5ae9d9f3c02eb65a
Cleaning up comments and logging to make sure they properly adhere
to Openstack standards.
* Consistently use """ instead of ''' for comments.
* Always lazy-load logging parameters.
* Fixed bad log line in cert_manager.
Change-Id: I547f5dfa61609a899aef9b1470be8d8a6d8e4b81
Add flavor_id as an option during cluster create. If not given,
the default is taken from the cluster template.
Add flavor_id in the Cluster object and use that instead
of the one from ClusterTemplate.
Update both magnum and magnum cli documentation to reflect the above changes.
Partial-Bug: #1699245
Change-Id: Ib60c05cce1cf2639ca4740abdd264403033433f9
Add master_flavor_id as an option during cluster create. If not given,
the default is taken from the cluster template.
Add master_flavor_id in the Cluster object and use that instead
of the one from ClusterTemplate.
Update both magnum and magnum cli documentation to reflect the above changes.
Partial-Bug: #1699247
Change-Id: Id1d973167b381538121583a0a9691304b39e98de
Add labels as an option during cluster create. If not given,
the default is taken from the cluster template.
Add labels in the Cluster object and use that instead
of the one from ClusterTemplate.
Update both magnum and magnum cli documentation to reflect the above changes.
Partial-Bug: #1697651
Implements: blueprint flatten-attributes
Change-Id: I8990c78433dcbbca5bc4aa121678b02636346802
Following [1], cluster objects have a docker_volume_size attribute.
If not explicitly set on creation, the value of this attribute should
default to the value of the same field on the cluster's template.
When not provided, the API Cluster object's docker_volume_size field
takes the value wsme.Unset, rather than None.
[1]
79039bb419
Change-Id: Iad5231643c01ec9698c932b59806781034390795
Depends-On: I510ff10d708a237be0cb88d3ff7094d7c81f5875
Closes-Bug: #1702314
Add docker_volume_size as an option during cluster create. If not given,
the default is taken from the cluster template.
Add docker_volume_size in the Cluster object and use that instead
of the one from ClusterTemplate.
Update both magnum and magnum cli documentation to reflect the above changes.
Partial-Bug: #1697648
Implements: blueprint flatten-attributes
Change-Id: Ic6d77e6fdf5b068fa5319b238f4fd98b4d499be4
Magnum API previously passed magnum.objects.cluster.Cluster objects as
the target argument to magnum.common.policy.enforce(). However, enforce()
expects target to be a mutable mapping, as it adds an entry for
trustee_domain_id which is used by the magnum policy.json. This causes
cluster detailed GET requests to fail with the following message:
AttributeError: 'Cluster' object has no attribute 'trustee_domain_id'
This change uses the as_dict() method of the magnum RPC objects to
provide a mutable mapping to the policy enforcer.
Change-Id: I54b136243afff9e0fadae3be4b36cad1679e5721
Closes-Bug: #1689797
Currently cluster-update is rolling back in case of update
failure irrespective of whether the rollback flag set to
True or False. This change fixes the issue by setting the
right parameter type in cluster patch method.
Change-Id: I6c28c583e7e3b98622634ac2381513b442eb57b6
Closes-Bug: #1664781
Keypair can now be added during Cluster create command. This allows
Clusters to be created from the same ClusterTemplate but have
different keypair values when created. If not specified on create
then the value from the ClusterTemplate will be used. Adds keypair_id
to Cluster object and uses of keypair_id will use the value from Cluster
instead of ClusterTemplate.
Added release note for new features in magnum and magnum CLI.
Change-Id: I177a5aa06f881156944a9f74c9ccc3cd2abac492
Implements: blueprint keypair-override-on-create
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
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
Currently bay-show operation does not return bay/cluster
version information. This change contain changes to return
bay/cluster version and container version info.
Change-Id: Ie12b6583e6d85faa3607f87295c04d72698034a5
Closes-Bug: #1613413
This reverts commit 15162ce33a.
Mesos services were not working, so reverted the patch
which renamed slave to agent.
Change-Id: I94a9a36e649f48f8e31386226226261ef459ce25
Closes-Bug: #1617407
Attributes which are mandatory (ie, required for object creation) should
not be removable. However, some attributes (such as baymodel.server_type)
are not required for object creation, but should not be removable if they
are set. This commit does the following:
- rename JsonPatchType.mandatory_attrs to non_removable_attrs to better
describe its meaning,
- change its return type to set-of-strings for faster lookup
- ensure all mandatory attributes on the type being patched are
included in the set of non-removable attributes,
- add a new field, JsonPatchType._extra_non_removable_attrs, which
should be a set of attributes that are not required for creation but
should not be removed if set.
Since the object to be patched does not exist at patch-validation time,
we leave the validation logic in methods of JsonPatchType and
subclasses. This means introspecting the types to be patched.
This patch is copied from ironic [1].
[1] https://review.openstack.org/#/c/240202/9
Change-Id: Ifcfc4e48a05d75b919a33ef463754c199da94a8e
Close-Bug: #1530771
This is the first of several patches to add new Cluster commands
that will replace the Bay terminalogy in Magnum. This patch adds
the new Cluster and ClusterTemplate commands in addition to the
Bay and Baymodel commands. Additional patches will be created
for client, docs, and additional functional tests.
Change-Id: Ie686281a6f98a1a9931158d2a79eee6ac21ed9a1
Implements: blueprint rename-bay-to-cluster
There is a rollback mechanism in heat after the stack
update failed. There should be a rollback mechanism in
magnum after bay update failed.
This patch add new microversion 1.3 to add rollback
support for Magnum bay, user can enable rollback on bay
update failure by specifying microversion 1.3 in header(
{'OpenStack-API-Version': 'container-infra 1.3'}) and
passing 'rollback=True'(http://XXX/v1/bays/XXX/?rollback=True)
when issuing bay update reqeust.
Change-Id: Idd02769f98078702404a11dc9f7a3339ce4e22eb
Partially-Implements: blueprint bay-rollback-on-update-failure
Current implementation of magnum bay operations are synchronous
and as a result API requests are blocked until response from HEAT
service is received. With this change bay-create, bay-update and
bay-delete calls will be asynchronous.
Please note that with this change bay-create/bay-update api calls
will return bay uuid instead of bay object and also microversion
1.2 is added for new behavior.
Change-Id: I4ca1f9f386b6417726154c466e7a9104b6e6e5e1
Closes-Bug: #1588425
Adds the functionality to allow versioning of api methods
based by adding a decorator api_version("min_version",
"max_version"). This is similar to how nova implemented api
versioning but updated to work with pecan.
Change-Id: Ie18d92531487f7c107b5132b3d35f38bd0a37aa0
Implements: blueprint api-versioning
Restrict the length of bay's name to avoid passing a invalid long name
to heat stack.
Reason of 242 is:
stack_name = '%s-%s' % (bay.name, short_id.generate_id())
255 - len(short_id.generate_id()) - 1 = 242
Closes-bug: #1606785
Change-Id: If22a9018ece718f014c40e8059b945ae1a411f5b
Bay name should start with only small or capital letter. Names
can contain small letter([a-z]), capital letter([A-Z]), hypen(-),
digits([0-1]), underscore (_) and periods (.). Names should follow
^[a-zA-Z][a-zA-Z0-9_.-]*$ regular expression.
Change-Id: I7581f0a99cee5708601b11c571a774acbeace3bd
Closes-Bug: #1605561
Mesos community has renamed slave to agent. This change reflect
this renaming in the code.
Change-Id: Ic97a827345b62f812ed63180cd1f5820e2200682
Closes-Bug: #1516188
When an exception was caught and rethrown, it should call 'raise'
without any arguments because it shows the place where an exception
occured initially instead of place where the exception re-raised.
Change-Id: If180215bda5592c0cba92cb2c9b3a61c13d62ccf
This patch adds an environment file and a couple of template resources
to allow the LBaaS resources to be conditionally enabled/disabled.
Change-Id: I40ef0839dca84f398efb02022fa7c1de821fb1a3
Partially-Implements: blueprint decouple-lbaas
Partially-Implements: blueprint bay-with-no-floating-ips
Bay_create_timeout default is 0 and means that magnum create bay
without timeout. But heat create stack with timeout absolutely.
So it is impossible to create bay without timeout. And I had send
a patch which allow heat to create stack without timeout, but the
core of heat did not agree with it.
The patch is: https://review.openstack.org/#/c/334138/
Change-Id: Iebc9915dcf2894a2dbed912244a2c7c308b4d9d7
Closes-bug: #1590636
Add a feature to Magnum to auto-generate human readable names,
like Docker does for un-named containers. Use this feature if
no name is specified upon the creation of a Bay/Baymodel.
Change-Id: I290fb4ad0692c63e6e40af3ec705f205c5ec66d3
Partially-Implements: blueprint auto-generate-name
In order to debug a failing bay creation, users need to know about
interaction with heat, heat architecture and how to debug it.
It would be much better if magnum could propagate some of the error
description into the bay-show status.
This patch proposes a way to do this:
If a bay was in error status('CREATE_FAILED', 'UPDATE_FAILED',
'DELETE_FAILED'), we collect fault info from heat resources of the
bay and put the fault info into 'bay-show' command outputs.
Change-Id: I458f1619243bf44f5f0e7dd2a5d6cd10ed2d0fde
Partially-Implements: blueprint explain-errors
As described in [1], we should pass bay or baymodel as target in
enforce. Otherwise we can not user generic-checks. We need this
check for some situations, for example only allow the user who
creates a bay can delete the bay.
http://docs.openstack.org/developer/oslo.policy/api/
oslo_policy.html#generic-checks
Change-Id: I60f8870dd1a2bb07efbadf5f16a453f0a2e0cb3d
Closes-Bug: #1553914
API like bay-list/container-list/magnum-service-list etc..
there is no rpc call and only access the database in these methods
move them to api controller.
Change-Id: Icdee1c5d3d835efd57238fb4cb8e897485da9b6d
Closes-Bug:#1552131
Now, when we create baymodel with the invalid flavor_id and
master_flavor_id parameters, the baymodel can be created
successfully.
We need to validate the flavor_id and master_flavor before
creating baymodel.
Change-Id: Id6768d8246c97d56e529cbc1cab6c8c7d28ca43a
Closed-Bug: #1547345
Rename get_rpc_resource to get_resource. Because there is no rpc
call in this method.
Change-Id: I4dfba86b9932c9def08959f7fb1df98b7bc41436
Closes-Bug: #1549650
Docker registry, k8s load balancer and volume driver have a similar
need to use trust, so we need to create a trustee for each bay.
Change-Id: If034e74ce2ea80a7faa886d4edf789e576c30eb5
Partially-Implements: blueprint create-trustee-user-for-each-bay
We restrict that only node_count can be modified, this can be moved into
REST API layer before we send request to conductor though rpc.
Besides, remove some bad test case in REST API layer
Change-Id: I5a73488d0c7529ea2e1416a9e41b4893f220a25a