This patch adds an ability to re-assign a set of the given nodes at
once. This feature was technically available but not exposed to the
client. A groupped re-assigning allows to effectively re-provision nodes
by creating an atomic task in Astute.
Change-Id: I4a7c7e35d844683ef73ad7f8459d1892e80e0a64
Related-Bug: #1616925
Changing of an operating system for clouds nodes is not supported and is
not tested at all. That's why this additional validation was added.
Change-Id: Ibf6db17f783879eff88e2366dfdb0a2871e2aa0a
Nodes roles should be checked in CheckBeforeDeploymentTask,
because it's possible to deploy node with conflicting roles
or with incompatible role. Roles release metadata will be
used for roles checks, this metadata contains restrictions.
Since `depends` is not used anymore, it's changed to
`restrictions` in assignment validator.
Change-Id: Ibba7951968cbafd59fff0d516e74f9dd9e454edc
Closes-Bug: #1573006
(cherry picked from commit 3482a5d7a9417c268a526cf511e114be94c884be)
New handler triggers copying of VIPs from given original cluster to new
one. The reason for separation of this action from copying of network
configuration is that accordion to [1] copying of existing VIPs/allocation
of new ones will not take effect for new cluster unless it has assigned
nodes. Thus in context of cluster upgrade procedure VIP transfer must be
done after node reassignment, and as long as nodes are being operated on
one by one it would be not efficient to call VIP copying method after
each such reassignment.
Tests updated accordingly.
[1]: https://review.openstack.org/#/c/284841/
Change-Id: I33670e8f2561be6fe18cec75bfc7ecc056ae2f6b
Closes-Bug: #1552744
In some upgrade scenarios when shadow environments are used some of
nodes should not be reprovisioned during this procedure. It is useful in
combination when control plane nodes are reprovisioned and data plane
nodes are updated in place.
The update_cluster_assignment method of the objects.Node class was
changed to accept roles and pending_roles for node during the
reassignment. It allows to specify proper roles by the upgrade
extention.
The NodeReassignHandler handler accepts two additional parameters in the
request body:
- reprovision = True (default) - allows to skip the reprovision step
- roles = [] (default) - allows to specify new roles or preserve the
current roles if empty
Two additional methods were added to NailgunClusterAdapter and
NailgunReleaseAdapter respectively.
Change-Id: Iedb20a904e58f5b9a86eb47de8d8d317dc3cc61b
Blueprint: upgrade-major-openstack-environment
Closes-Bug: #1558655
This patch also renames names of variables in tests of the
cluster_upgrade extension from more specific names that contain versions
of releases to least specific names.
Change-Id: Ic02b4426c1bb0bf38ba06cfeb54255043ebc8481
Closes-Bug: #1555339
Remove code related to registration in Mirantis tracking system and
using Mirantis server to collect statistics.
Change-Id: Ie1243a8b12368a0d61cd51da2d5ab6cce3eeea65
Related to blueprint remove-vendor-code
Depends-On: Id67d6201cb23e371dc42ec6e818bcbc2ca0fde31
The patching mostly done for tests for nailgun components adhering to
the release version. E.g. network serializers. Some tests are forced to
create environments of 8.0 version. The change is needed to resolve
possible issues with the tests when network roles metadata is changed
drastically and is not compatible with mentioned components.
Partial-Bug: #1517874
Change-Id: I55607157ae7767ffdfd1d855b872630832706e8e
is_deployable doesn't really give any additional information for a
release, it is removed. To make change API-backward-compatible, it is
retained as a property dependent on release.state.
New state is added - manageonly, for environments that are not able to
be deployed, but can still be managed.
Change-Id: I518a0114730a2f227c9ef035a376f9a90d3d5bbd
Closes-bug: #1503303
DocImpact
The node_id property is a required property to perform the re-assigning
a node with a given ID from one cluster to another.
Change-Id: I2442442260f19833db239b01856d0ff4f63ecfbb
Closes-Bug: #1483239
The patch adds method that assigns a node to an upgrade cluster without
deleting it from DB. This allows to keep ID of the node and IP addresses
assigned to it. The node is booted into the bootstrap image as soon as
it moves to an upgrade cluster.
Implements blueprint: nailgun-api-env-upgrade-extensions
Co-Authored-By: Artur Svechnikov <asvechnikov@mirantis.com>
Change-Id: If10fadd149a32317420778607146d9d12108d3f9
The patch adds an extension which implements the procedure of upgrading
clusters from one major release to another. As a first step of the
procedure the extension provides an ability to create a seed cluster
with the same settings as the original.
Implements blueprint: nailgun-api-env-upgrade-extensions
Change-Id: I22d51a3ffd51a7c88bdcbde0eef6f47b65def1c8
Since there are a couple of places where models for
restrictions is initialized, it's moved to cluster object.
Also, comments from previous commit
(Ibba7951968cbafd59fff0d516e74f9dd9e454edc) are fixed
It's refactoring bug is not needed.
Change-Id: Ic499a5deefb12740ebedc630b024dae0b4248ec5
Nodes roles should be checked in CheckBeforeDeploymentTask,
because it's possible to deploy node with conflicting roles
or with incompatible role. Roles release metadata will be
used for roles checks, this metadata contains restrictions.
Since `depends` is not used anymore, it's changed to
`restrictions` in assignment validator.
Change-Id: Ibba7951968cbafd59fff0d516e74f9dd9e454edc
Closes-Bug: #1573006
nailgun.errors have a huge set of exceptions but without hierarchy. This
patch remove exception generation from dict and make it explicitly with
python classes and add some exceptions hierarchy. Now all network errors
inherit from NetworkException and same for other exceptions.
Change-Id: I9a2c6b358ea02a16711da74562308664ad7aed97
Closes-bug: #1566195
New handler triggers copying of VIPs from given original cluster to new
one. The reason for separation of this action from copying of network
configuration is that accordion to [1] copying of existing VIPs/allocation
of new ones will not take effect for new cluster unless it has assigned
nodes. Thus in context of cluster upgrade procedure VIP transfer must be
done after node reassignment, and as long as nodes are being operated on
one by one it would be not efficient to call VIP copying method after
each such reassignment.
Tests updated accordingly.
[1]: https://review.openstack.org/#/c/284841/
Change-Id: I33670e8f2561be6fe18cec75bfc7ecc056ae2f6b
Closes-Bug: #1552744
In some upgrade scenarios when shadow environments are used some of
nodes should not be reprovisioned during this procedure. It is useful in
combination when control plane nodes are reprovisioned and data plane
nodes are updated in place.
The update_cluster_assignment method of the objects.Node class was
changed to accept roles and pending_roles for node during the
reassignment. It allows to specify proper roles by the upgrade
extention.
The NodeReassignHandler handler accepts two additional parameters in the
request body:
- reprovision = True (default) - allows to skip the reprovision step
- roles = [] (default) - allows to specify new roles or preserve the
current roles if empty
Two additional methods were added to NailgunClusterAdapter and
NailgunReleaseAdapter respectively.
Change-Id: Iedb20a904e58f5b9a86eb47de8d8d317dc3cc61b
Blueprint: upgrade-major-openstack-environment
Closes-Bug: #1558655
This patch also renames names of variables in tests of the
cluster_upgrade extension from more specific names that contain versions
of releases to least specific names.
Change-Id: Ic02b4426c1bb0bf38ba06cfeb54255043ebc8481
Closes-Bug: #1555339
Remove code related to registration in Mirantis tracking system and
using Mirantis server to collect statistics.
Change-Id: Ie1243a8b12368a0d61cd51da2d5ab6cce3eeea65
Related to blueprint remove-vendor-code
Depends-On: Id67d6201cb23e371dc42ec6e818bcbc2ca0fde31
The patching mostly done for tests for nailgun components adhering to
the release version. E.g. network serializers. Some tests are forced to
create environments of 8.0 version. The change is needed to resolve
possible issues with the tests when network roles metadata is changed
drastically and is not compatible with mentioned components.
Partial-Bug: #1517874
Change-Id: I55607157ae7767ffdfd1d855b872630832706e8e
is_deployable doesn't really give any additional information for a
release, it is removed. To make change API-backward-compatible, it is
retained as a property dependent on release.state.
New state is added - manageonly, for environments that are not able to
be deployed, but can still be managed.
Change-Id: I518a0114730a2f227c9ef035a376f9a90d3d5bbd
Closes-bug: #1503303
DocImpact
The node_id property is a required property to perform the re-assigning
a node with a given ID from one cluster to another.
Change-Id: I2442442260f19833db239b01856d0ff4f63ecfbb
Closes-Bug: #1483239
The patch adds method that assigns a node to an upgrade cluster without
deleting it from DB. This allows to keep ID of the node and IP addresses
assigned to it. The node is booted into the bootstrap image as soon as
it moves to an upgrade cluster.
Implements blueprint: nailgun-api-env-upgrade-extensions
Co-Authored-By: Artur Svechnikov <asvechnikov@mirantis.com>
Change-Id: If10fadd149a32317420778607146d9d12108d3f9
The patch adds an extension which implements the procedure of upgrading
clusters from one major release to another. As a first step of the
procedure the extension provides an ability to create a seed cluster
with the same settings as the original.
Implements blueprint: nailgun-api-env-upgrade-extensions
Change-Id: I22d51a3ffd51a7c88bdcbde0eef6f47b65def1c8