* netgroups mapping was changed (additional argument
for the mapping was added - name of node group)
* copying of node group during cluster cloning was added
Depends-On: I2638279371e91f15090c782fc5fdbb434a2e85f8
Partial-bug: #1612297
Change-Id: Ib1689d7b6d673c0d78434dd047a7ebc520c232e7
Co-Authored-By: Ryan Moe <rmoe@mirantis.com>
Co-Authored-By: Andrew Woodward <awoodward@mirantis.com>
Co-Authored-By: Ilya Kharin <akscram@gmail.com>
due to changes functions get_assigned_vips and
assign_given_vips_for_net_groups in nailgun.network.manager
in the next commit (I2638279371e91f15090c782fc5fdbb434a2e85f8)
Change-Id: I93e43be60dacc9ba5546cb50ba04a98bd35d276c
(cherry picked from commit 2d12209aaa)
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
Since self.env.create always return db object now,
we can use this returned value instead of
self.env.clusters list.
It's a refactoring, so no bug or blueprint.
Change-Id: If7c84cb7124bcf08ef5ff110542012564190fae1
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
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
Name ClusterUpgradeHandler should be used for handling uri
/cluster/<id>/upgrade.
Current handler performs clone of environment for upgrading. Thus, rename
ClusterUpgradeHandler to ClusterUpgradeCloneHandler.
Blueprint: upgrade-major-openstack-environment
Change-Id: I6c98e0882c300d587caa32429b49b22baa9ad82f
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