Now the deployment behaviour is driven by tags rather than role names, i.e. role
name cannot be relied upon.
Change-Id: Icfabeeb0b7fb6a9d697a09c3cf1fa020bbd4c323
Closes-Bug: #1669743
On NIC: XL710 with driver 'i40e' MTU does not take into
account 4 bytes VLAN tag, so we should increase it manually
DocImpact
Change-Id: I3d95db9ec6fae4d8cd397c429d785dbdf1502b21
Partial-Bug: #1587310
Co-Authored-By: Fedor Zhadaev <fzhadaev@mirantis.com>
Plugin name is uses as identifier in sync operations. Plugins data
on the file system can be found only by it's name, so renaming of
the plugin must be denied.
Change-Id: I2864537770f27d3b95d0d093900c1a787fef107c
Closes-Bug: #1649568
This commit switching tasks resolution approach to the tags based one.
Tag - minimal unit what's necessary only for task resolution and can be
mapped to the node through the role interface only. Each role provides set
of tags in its 'tags' field and may be modified via role API. Tag may be
created separately via tag API, but, this tag can not be used unless it's
stuck to the role.
Change-Id: Icd78fd124997c8aafb07964eeb8e0f7dbb1b1cd2
Implements: blueprint role-decomposition
Provide ability for plugins to add additional attributes for nodes.
* Added new NodeAttributesDefaultsHandler handler for getting
default node attributes.
* Added code stuff for getting and updating additional plugin
node attributes.
* Added code stuff to serialize plugin node attributes for orchestrator.
Change-Id: I5c6d6f3c815a034683e624b98fa1f360ab4b491c
Implements: blueprint nics-and-nodes-attributes-via-plugin
A 'tags' attribute has been added to each role in 'roles_metadata'.
Initially all non-controller roles will only have a tag of their own
role name. This will allow existing tasks which do not have tags
associated with them to work correctly. In the abscence of tags a
task's roles will be used to determine which nodes it will run on.
Implements: blueprint role-decomposition
Change-Id: I390580146048b6e00ec5c42d0adf995a4cff9167
* get_assigned_vips function returns assigned VIPs
mapped to IDs (but not names) of network groups,
because different node groups may have the same
name of network groups
* assign_given_vips_for_net_groups function tekes
a dict of VIPs mapped to IDs of network groups
* assigning group to node was changed for support
several node groups
Depends-On: I93e43be60dacc9ba5546cb50ba04a98bd35d276c
Partial-bug: #1612297
Change-Id: I2638279371e91f15090c782fc5fdbb434a2e85f8
Co-Authored-By: Ryan Moe <rmoe@mirantis.com>
Co-Authored-By: Andrew Woodward <awoodward@mirantis.com>
Co-Authored-By: Ilya Kharin <akscram@gmail.com>
(cherry picked from commit 4d6ea865aa)
Also revert detecting error status by error_type,
because there is no gurarantee that error_type is reseted
in all places. need to prepare proper fix for error_type
Change-Id: I6de0b99eced36fa011f1fb45cf56c895b9fa3372
Closes-bug: 1617193
Now it is possible:
* To bring release as plugin
* To define multiple graphs types for the plugin
Change-Id: Idcac14e6f4055ca0e488efc2cc23945036a493d9
Implements-Blueprint: release-as-a-plugin
The transient statuses are not persited in DB because
the status of node should represent the current state
of node, for example: node is provisioned or node is deployed.
The synthetic states: like error, deploying, etc. are used
only for providing additional for user about status of node at this moment.
This statuses can be calculated on demand.
Also node.error_type has type 'String' instead of 'Enum'
Also added handling status 'deleted' in response, which means that node should be deleted from cluster.
Change-Id: If5e79b9274f34e01d2b795491c23361c9050669d
Blueprint: graph-concept-extension
So far Nailgun has a bunch of managers for various tasks (transactions).
The way towards everything-is-a-graph means we won't have hardcoded
transactions and hence requires a new single manager to handle them all.
Transaction manager runs specified graphs on specified nodes within
single transaction (task), so anyone can poll it to check the progress.
Co-Authored-By: Igor Kalnitsky <igor@kalnitsky.org>
Change-Id: I98df7b98a07f64d97b561b85faa8472c3c551346
Blueprint: graph-concept-extension
In the current implementation of the method 'to_list'
all object instances are serialized regardless what
the variable 'iterable' is: None or [].
This patch allows to correctly handle such situations.
In case if the variable 'iterable' is None all object
instances are serialized, otherwise only selected from db.
Change-Id: I7b9913f364cfab085a8c94aec1435286a8e877f3
Closes-Bug: #1609290
This patch clears primary_roles of a node during its reassignment as a
part of an upgrade. Without this fix it is possible to have several
primary roles in a seed cluster during the upgrade. This race condition
leads to some failed deployments during the upgrade. As a result primary
roles have to be cleared during the reassignment of nodes. That allows
to assign primary roles on appropriate nodes rely on the internal logic.
Related-bug: 1599837
Change-Id: Iae5f3090cfbfd1e6033b94720694a94477562328
Size of deployment_info field in tasks table grows as n**2
(depending on number of nodes). If we have 200 nodes, the
size of the structure is about 20Mb. In case of 600 nodes it
would be theoretically about 720Mb, in practice it doesn't fit
into 1Gb.
Good solution is to put common part to separate place. But it's
not so fast. Also it will not help if all nodes will be going to
be deployed with customized deployment info.
Change-Id: Id3154ab423b0863d9cc4952335293bf5fc30df38
Partial-Bug: #1596987
NFV features (DPDK, SR-IOV, NUMA/CPU pinning, HugePages)
can't be checked for old clusters, due to old nailgun-agent.
Old nailgun-agent doesn't send NFV specific information.
So all NFV related checks and functional should be disabled for old
environments.
Change-Id: Ib589d67658f45414b8049398316af5c7298d459e
Closes-Bug: #1594443
Added migration from Fuel 8.0 to 9.0, which adds default rule
to pick bootable disk in volume metadata of release.
Change-Id: I5d151a29bf52ac3a519049c38b2b671c087f968f
Closes-Bug: #1595209
This patch:
* extends current DB model with new entities and provides
related migrations.
* extends plugin sync method to support storing new plugins
attributes.
* provides cosmetic fix for ClusterPlugin model. Lets write table
names in the plural but model names in the singular.
Change-Id: I3edbde1d48461ce3fab7c93f17e2db5332b1f7fb
Implements: blueprint nics-and-nodes-attributes-via-plugin
Now we get last success transaction not only for every task but for
every node in the cluster. The previous version of state collecting
function may lead to false-positive choice of previous deployment
transaction and issues with smart YAQL-based redeployment.
Change-Id: If9e22924acb465487a2fa97534fe50f03a1590a1
Closes-Bug: #1581015
Closes-Bug: #1582269
Adding this flag to specified disk allows user to choose bootable disk
from Fuel UI and CLi.
This change is very important for deployments with multipath connected
block devices. Mainly, it is because, order of disks in UI can change
easly in this case, so we need introduce to user a possibility to
choose bootable disk explicitly.
Change-Id: I22ffe9104d2ec5a6598d496691fffa0087111070
Partial-Bug: #1567450
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
Calls to network manager from object methods have been
moved into callbacks implemented by the network manager
extension.
This commit makes the following new callbacks available
to extensions:
* on_cluster_create: called when a new cluster is created
* on_cluster_patch_attributes: called when a cluster's attributes
are updated
* on_nodegroup_create: called when a node group is created
* on_before_deployment_serialization: called before deployment
serialization begins
* on_before_provisioning_serialization: called before provisioning
serialization begins
* on_remove_node_from_cluster: called when a node is removed from
a cluster
Blueprint: network-manager-extension
Change-Id: I9a3413f54c881edd098e623ea204d12a86695f87
Tests that cover network-related API handlers, validators,
NetworkManager classes or database models have been moved to
the network manager extension.
Change-Id: I8e1d8627da15ca6735dd1efd568d075447ec387c
Blueprint: network-manager-extension
Now we get deployment state from DeploymentHistory model. For every task
we get last success transaction and its state.
Change-Id: I2288bc2bc34023c2ca705f1d3cc6ff48347bf549
Closes-bug: #1572226
Currently root plugin attributes values inconsistent with
specific plugin version attributes provided by client. This patch
fills plugin attributes with proper values for specific plugin version.
Change-Id: I1c85d6e080f8fd16d5b65c1bf670fdfb3ba0ff1b
Closes-Bug: #1573440
/openstack-config/execute/ handler now support
?graph_type=my-graph-name parameter
Change-Id: Iaed6af093f0e2a66db29d2185104bc1e8c80fad2
Partial-Bug: #1567504
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
Get config should check not only a presense
of 'node_id' and 'node_role' fields but their
values to determine the type of opesntack config object.
Related-Bug: #1557462
Closes-Bug: #1573613
Change-Id: I6e3cdd4e545bda0616af7e0e3d63bd21a19f8ae0
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