Refactor interface logic:
* remove interface_properties
* CRUD operations for NIC attributes
* default values for NIC meta and attributes
Change-Id: I26106f1b55c704a9e79d01fadc48c88a92ccc414
Implements: blueprint nics-and-nodes-attributes-via-plugin
Currently the nodes which need provisioning and then deployment avoid role
restrictions check because of their 'not ready for deployment'
status. This commit adds unprovisioned nodes to the list of checked
nodes.
Change-Id: I7b19d1beeb71849e2def465127873821a4f93052
Closes-Bug: #1605472
Instead of wide callbacks process_deployment or process_provision
implemented methods to patch deployemnt or provision info per
cluster or node.
The code of extensions and tests was updated accordingly.
Also added helper to mark methods of extension as deprecated.
the extension load behaviour was modified, instead of fail operation
when extension cannot be loaded, the nailgun only write error in log
that extension is not loaded and continue operation.
Partial-Bug: 1596987
Change-Id: I577c8ffc105734e12646ca7c6a4fe4927e70b119
DocImpact
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
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
* remove node_extension_call from everywhere Nailgun
core source code
* remove volume_manager Node property (models)
* moved volume and disk releated data manipulations to
volume manager extension pipeline
* removed no longer valid tests
* added new extension callback for pre deployment check
* fix some tests
* moved volume_manger specific tests to volume_manger module
* marked 'skip test' to some tests which are no longer
valid in current places but they valuable and should be moved
to volume_manager module in next patches
implements: blueprint data-pipeline
Change-Id: I8edd25166e5eccf914eb92882b6b4a7b3fff6a89
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
That checks that if DPDK enabled:
* only network with neutron/private role assigned to DPDK enabled interface
* hugepages are configured
* hypervisor is kvm
Partial-Bug: #1559224
Related to blueprint support-dpdk
Change-Id: I68797a30431f4c618b59471033b1c0b5bbacba95
Earlier, we had only one deployment engine called
granular_deployment or role-based deployment.
It constructed a deployment graph in Nailgun and
did its sanity checking twice - before
deployment task starts and when the graph is contsructed.
Now, when we have task-based deployment by default with which
Astute does graph sanity checking, this check cannot be done
before task starts as engine choice is made now within the deployment
serializer. So, now we have 2 ways of doing this - call an engine, RBD
will call corresponding tasks serializer which will do graph acyclic check.
Change-Id: If081ce7a462bc5ced9459ba619d26aecf22f4916
Closes-bug: #1560555
Hypervisor type should be checked on pre-deployment stage
as only KVM hypervisor is compatible with SRIOV feature.
Change-Id: Ideec889ade22ab7736a84644f8376f6f2a2e68f0
Partial-bug: #1563254
Added new status for cluster:
* partially_deployed - the nodes of cluster has different statuses.
Change-Id: I5be8c4ed5f58e2c6545a7f06b8eab1ae37c8575f
Closes-Bug: 1542201
This patch removes validation of the number of controllers
in a cluster from pre-deployment task.
Closes-bug: #1538233
Change-Id: I5325af73367d6c3edab873a8080cd8a7e24e9692
What was done:
* new field to node group orm model class added - boolean flag 'default';
* alembic migration for 8.0 version updated respectively;
* code that operates on default node group changed in regard of new
attribute;
* checking logic of CheckBeforeDeploymentTask._validate_network_template
refactored;
* related tests updated.
Change-Id: If751ea8d11fe7d7d01616e695998f3c276a12b5c
Closes-Bug: #1508973
The ID was sent only when it is possible, without any guarantees.
Because some of tasks do not have ID by its nature. for example
plugins pre/post deployment tasks.
Change-Id: Ib0e0e334e99140eccedb63114bb1377c5f07a9fb
Closes-Bug: #1527596
- Moved all Task Role related constants to Enum TASK_ROLES
- Renamed consts.MASTER_ROLE to consts.MASTER_NODE_UID
Change-Id: I292f0f5471e295564a318530f5397e4c438cb40a
Closed-Bug: #1526688
This change introduces:
* NovaNetworkManager80
* ironic/api network role
* ironic/baremetal network role with VIP and iptables rules
Added separate fixture for network template.
Tests updated.
Partially Implements: blueprint fuel-integrate-ironic
Change-Id: Ib867f843951f7b86be31a9ffe4cf54c56127157b
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
Network groups can be created at any time so there is no guarantee
that it will exist when a template is uploaded. Before updating the
network group's VLAN the existence of the network group is checked.
Networks are reassigned for all nodes when a new network group is
created. A new pre-deployment check was added to validate that all
network groups required by a network template exist.
Change-Id: I28d3df4db0fe69f5b4fc9af491f0aae1f695901f
Closes-bug: #1509543
We should know is task handled by orchestrator or not.
For instance, we should send stop_deployment task only if
provision or deploy tasks are handled by the orchestrator.
Task status 'pending' added into Task DB model and
handled in stop deployment, provisioning, deployment and
apply cluster changes task managers.
Nailgun Task object update function changed for bubble 'running'
status to parent task.
Locking of all cluster tasks calls removed for deadlocks
exclusion.
Consts used instead hardcoded tasks statuses in part of tests.
Co-Authored-By: Alexandra Morozova <astepanchuk@mirantis.com>
Depends-On: Ib054517696dc4e53487557b09b75ebfcb1255ecb
Depends-On: Idedb061b7b5c4dca4a0ca7adcaa570cecbb691af
Change-Id: I15ebeb85226c832923f9476bb91fa19c0ff87a4f
Closes-Bug: #1498827
When a node is added to a cluster with a network template
networks will be mapped to NICs based on transformations
in the template. Any bonds will be created in the database.
Any time the cluster's network template is changed the NIC
mapping will be recreated.
Change-Id: I2b52444f3019241362e5a957bf191645b94ebaa7
Closes-bug: #1493391
ErrorsFactory had __getattr__ method that was used to always
return any error (if it doesn't existed, it created a new one).
This was causing "hasattr" to return 'True' for every check.
Due to this any code, that wanted to check for some unique attributes
in ErrorsFactory was working incorrectly. This was the case for
a py.test library when scannig code when looking for tests.
Now this behavior has been removed. This uncovered new bugs
which was fixed.
Change-Id: I3c9be96dbcc535ea9c730d29b065479cc318fd9f
Closes-Bug: #1497664
test_vlan_range
The test has been failing because JSON schema validates restriction in
order that depends on PYTHOHASHSEED. So the fix is to use proper
values with only one incorrect value.
test_non_default_bridge_mapping
The test has been failing because we have a suffix generation for
bridges implemented via counter. We generate a bridge name with a
suffix iterating over networks, and PYTHONHASHSEED affects order of
iteration. So the fix is to do not test bridge names strictly, but
just most important limits.
test_update_networks_meta
The test has been failing because dictionarie's .update() method do
not perform recursive update, and removes some needed keys
(such as 'name') so next network lookup may fail.
TestDeleteIBPImagesTask
The test has been failing because CMD line has files to remove, and
their order depend on PYTHONHASHSEED (since they are extracted as
.keys() from some dictionary structure). So the fix is to perform
smart check for the command line, not strict one.
Closes-Bug: #1496448
Change-Id: I882bbf53f48c842070cb336b1185c40a3dfacc6b
Signed-off-by: Igor Kalnitsky <igor@kalnitsky.org>
Add remove_images_resp handler to deal with DeleteIBPImagesTask
separetely from ClusterDeletionTask. Until now, because of the fix
of #1454781 we used only one Task instance to those two tasks
which was causing that (on astute response) the second one was already
cleaned up from db.
Change-Id: Ic686dd1da48b3b4cd679220d9c1ca05df05d105d
Closes-Bug: #1488467
Sometimes we have situation when requires or required_for
uses task id which not described in system. In such case
nailgun should show places where it happens
Change-Id: I8004e18a396328f3051f4878da138c7a286450f0
Closes-Bug: #1477258
Target images should be removed if env removal occurs.
Implemented by conditional execution of DeleteIBPImagesTask
after DeletionTask.
DeleteIBPImagesTask will be skipped if cluster doesn't use IBP
or opetating system is not Ubuntu.
Change-Id: I79ec69696311a33924a6271bca6dcb3295373a62
Closes-Bug: #1454781
Since 'oslo.config' and 'oslo.serialization' namespaces are deprecated, they
are swapped with 'oslo_config' and 'oslo_serialization' correspondingly.
Lower bounds of supported versions are updated as well.
Change-Id: I133c7676da504933d03e147af3a239d6559d5aac
Closes-Bug: #1478900
Serializer switching between general and template is added also.
When template is loaded, template serializer is being used.
General serializer is in use otherwise.
Change-Id: I1820d3cd80a33b292f9e2b75d8f0dea3bad7c8ac
Implements: blueprint templates-for-networking
Add new handler SnapshotDownload which returns empty response
with X-Accel-Redirect header. Nginx reads this header and
serves actuall snapshot file.
Also changed 'reverse' function location, let it be more
available for other modules.
Change-Id: Id46b533e8d2a8021d1fbb2e5d4284508e1181704
Implements: blueprint snapshot-download-with-auth
It's a first step of extracting volume manager
from the core and its refactoring.
Implements blueprint: volume-manager-refactoring
Change-Id: I5ddd5e9027b9f06f4d493e1b70cabf27518406b1
jsonutils is now in separate library, and the oslo.serialization will be
used from now on.
Change-Id: I28b6b70e437f154cf1b9ce0b15b0c3e716d170ee
Depends-On: https://review.openstack.org/#/c/158674/
Closes-Bug: #1400661
Recently, we used to return error message for incorrect neutron config
without error HTTP status code. In other words, the "202 Accepted" was
always returned regardless it was successful or not.
Since now, tbe "400 Bad Request" will be returned in case of error and
"200 OK" in case of success (there's no reason to return "202 Accepted"
for synchronous task).
Change-Id: I9ad16fceb930332b427773dec32bd84d30fb1fd3
Closes-Bug: #1404821
* added performance test
* improved assign_vip
* improved geting controllers in CheckBeforeDeployment
* improved checking untagged networks
* changed name of property default_group on to default_group_id
* correct tests and add new
Change-Id: Iba10fdae455c3f19a71cbcdc88f8cd370ffd1993
Closes-Bug: #1384623
Fixed CheckBeforeDeploymentTask._check_network() method to properly
compare quantity of public IPs and nodes that require them.
Tests added.
Closes-Bug: 1376426
Change-Id: I9b3278286a9d67aff784e5c241db1dc299a2f94e
We need to forbid remove all controllers even you add new one at the
same time, since it affects cluster's availability.
Change-Id: I9d1ac51981d0516937aa21e04e66e2cca03022ef
Closes-Bug: #1367001
Details:
- add new node attribute: fail_if_error (boolean);
- add list of critical nodes for multinodes and HA mode.
- do not mark non-reported nodes as error nodes in deployment case.
Change-Id: I657ea6a02b20505e47527618e14c64fc9b48a6b4
Related-Bug: #1251634
What is done:
- most methods from TaskHelper class moved to objects.Task;
- code that was dependent on TaskHelper's methods updated
- unit and integration tests updated
What is missed:
- TaskHelper class is still in use as far as it holds several common use
helper function (in future will be moved to utils module);
Change-Id: Iff2f2a4d277590db25c6f801f20ae75433937411
Implements: blueprint nailgun-task-helpers-refactoring