Commit Graph

30 Commits

Author SHA1 Message Date
Tomi Juvonen 244fb3ced0 Detailed session information and enhancements
- Add GET /v1/maintenance/{session_id}/detail
- Add 'maintenance.session' event. This can be used
  to track workflow. It gives you percent of hosts
  maintained.

Other enhancements:
- Add Sample VNFM for OpenStack: vnfm.py
  (Kubernetes renamed to vnfm_k8s.py)
- Add Sample VNF for OpenStack:
  maintenance_hot_tpl.yaml
- Update testing instructions (tools)
- Update documentation
- Add more tools for testing:
  - fenix_db_reset (flushed the database)
  - set_config.py (set the AODH / Ceilometer config)
- Add admin tool: infra_admin.py
  This tool can run maintenance workflow and
  track its progress
- Make sure everything is written in database.
  If Fenix is restarted, it initialise existing
  'ongoing' workflows from database. More functions
  to database API and utilization in example workflows.

story: 2004336
Task: #27922

Change-Id: I794b11a8684f5fc513cb8f5affcd370ec70f3dbc
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2020-04-17 13:05:21 +03:00
Tomi Juvonen ef8bbb388b Add instructions to test workflows
story: 2007441
Task: #39114

Change-Id: I91636f9cf6a4568badc7314bed9101da62924c2b
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2020-03-20 10:32:42 +02:00
Tomi Juvonen d06820b452 Add test cases
story: 2007441
Task: #39098

- Some initial test cases
- DB cases enhanced DB error handling
- API error handling also improved
- Tools README.md bug
- New requirements cahanges for testing

Change-Id: I7f83c6472d1a86fa62e38cab2856be6c0d6bb259
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2020-03-19 16:17:56 +02:00
Tomi Juvonen 4d1a100ba7 Kubernetes workflow
- Add Kubernetes workflow
- Add Sample VNFM to test against
- Add sample application (VNF)
- Add testing instructions
- Update documentation

Details in: fenix/tools/README.md

Also fixes to:
- Api error handling
- Exceptions
- DB API
- some other minor bugs.

story: 2007301
Task: #38778

Change-Id: Ia37dfe7ea57935e73868da89aaa9a413721078ad
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2020-03-13 12:42:56 +02:00
Tomi Juvonen d6f1f7bc2d Ability to continue failed session
-API to update session state after session failed
-Thread exception passed to parent
-Session DB knows previous state
-Changing state will save previous state to help
 continue session after a failure
-API error codes documented better

Story: 2005583
Task: #30772

Change-Id: Ifd5eb29a1d3d969b2d9b9648d823e80b435f7cb3
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>PI schema validation
2020-02-12 16:04:09 +02:00
Tomi Juvonen 76fdc1aba5 API schema validation
Story: 2007278
Task: #38717

Change-Id: I7a6fc62e8f2c0c3cc21560f9f889d0fe136ca33e
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2020-02-11 11:24:28 +02:00
Tomi Juvonen b703a90ba0 Disable empty and to be empty computes before instance actions
When praparing to maintenance we make empty compute hosts
or we already have some. All these computes have to have
nova-compute disabled, so when making empty compute nodes
the instances moving will not land to these computes.

Change-Id: I11a68efab2b10572f43a1cf985743c984c3b0b6e
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2020-01-29 14:19:59 +02:00
Tomi Juvonen 2244f44f03 VNF workflow implementation
- New VNF workflow
- ETSI FEAT03 changes
- Drop py27 support

story: 2006838
Task: #37413

Change-Id: Icfe89d4f2b04791f65674a4fd5d8fb63e0a54f70
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2020-01-17 08:40:26 +02:00
Tomi Juvonen d2913eacd3 WIP: bug with python3 support and other new relations
Tested with new Doctor changes to support fuel installer
and using python3

Change-Id: I5c2e9d2f3b0d5569c79dc5d7d7d88308f6444b73
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2019-11-07 08:39:06 +02:00
Tomi Juvonen cc55962d52 Flask to WSGI and security
This adds a lot of stuff related changing from API from Flask to
WSGI and adding security.

This is mostly api side. There will more changes to add testing
and engine side changes. API parameter validation can also be
done later.

story: 2004882
Task: #29163
story: 2003844
Task: #26635

Change-Id: Id373440affd2d625933da2a6dbeb6354acd75e1e
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2019-06-27 16:09:19 +03:00
Tomi Juvonen 879d73ed78 Add DevStack plugin
Adding what is needed to have Fenix running in DevStack

Default workflow dependent configuration needs to be documented
Separately. Those might be ssh capability for Fenix service
user and AODH configuration. Test case should also add those in
future.

story: 2005166
Task: #29900

Change-Id: Ifb6602b67f098bcffdc2c03c31fdf868ab61b653
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2019-05-20 14:50:58 +03:00
Tomi Juvonen 46e13601a5 Add live migration support
story: 2005585
Task: #30774

Change-Id: I5dc6db643900a6bfcc427b4b9ee23b5557b091a4
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2019-05-10 03:14:18 +00:00
Tomi Juvonen 24bf1a2563 Support download
Add support for downloading software changes and plugins
Default download directory is /tmp/<session_id>
Download url with filename including 'workflow' or 'actions'
are automatically extracted to /tmp/<session_id>/<workflow|actions>
Plugins will be used straight from those directories is Fenix
did not have a plugin with the same name.
Download directory and content will be automatically removed
when session is deleted by the admin

story: 2004147
Task: #27620

Change-Id: Ia1cce13d268da1888f5d8f02d39099b3c113fb86
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2019-05-01 04:59:21 +03:00
Tomi Juvonen 8a375d8417 Support pre, host, hostype and post action plug-ins
Support different type of action plug-ins
Fix some findings during demo implementation

story: 2003846
Task: #30227

Change-Id: Ie2363d865786afaf64d101f3bf7da97827f6b3e6
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2019-05-01 04:41:21 +03:00
Tomi Juvonen ac9fe415e6 Bug: host type should be nullable
Host type needs to be nullable as it can be given as list where
the type is yet not known.

Change-Id: Ie332281d3050e58fba9ae40cfb5e52b624c49cc5
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2019-03-26 15:22:07 +02:00
Tomi Juvonen 45254745c3 Support for action plug-in
Add ability to give action plug-ins in session creation.
Add handling for action-plug-ins in defautl workflow
Add database support

Dummy action plug-in added to see how it works. Will be removed before this
merges.

Documentation will be updated as review done

Story: 2003846
Task: #29160

Change-Id: I56c77df4937c16f419b6d963f5a5fa0642fc0d43
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2019-01-30 07:57:34 +02:00
Tomi Juvonen 9eadb36061 One click upgrade
Discover all available hosts to be maintained

Story: 2004146
Task: #27619

Change-Id: Id11ab3c2f41dfde49d082fb5338182d2c6ede5a5
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2019-01-29 07:07:14 +02:00
Tomi Juvonen 262c503ae4 Bug: Support older version of nova-client
Change-Id: I1d3f8c485a9db833973dc58fd9d82073af1b0397
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2018-12-27 19:31:06 +02:00
Tomi Juvonen 7024ee5e3e Bug: We might not be able to use novaclient maximum supported version
When building Fenix into container, we use OpenStack master upper constraints.
We get latest novaclient, but Nova server might not be the latest. To use
latest possible version, we need to figure out the latest version supported by
both server and client.

Change-Id: Iebb07202b7e742d9281ec9a1f6b8b522be0f6715
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2018-12-19 18:08:56 +02:00
Tomi Juvonen 9eba5512ea Disable nova-compute for not maintained hosts
By disabling nova-compute all instances created or migrated will only land
on maintaned host that will have nova-compute enabled.
In Nova terms disabled nova-compute also means the host is in maintenance.

Story: 2003848
Task: #26641

Change-Id: I8b05de9bd3653187fc210700b5b39faeb2fffc03
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2018-12-07 09:18:34 +02:00
Zuul fb9e32aae5 Merge "Initial DB support" 2018-12-05 06:59:16 +00:00
Tomi Juvonen 682cbb89e2 Initial DB support
Adding support of database to track maintenance sessions

Story: 2003830
Task: #26599

Change-Id: I45c6d2e6a432f1fc869da031bd44677d39ce5e92
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2018-11-29 13:42:04 +02:00
Tomi Juvonen b2a09d00c2 Bug - Engine init logging from error to info level
Change-Id: I5e7b2ef62910e0873ecec1110299c33d2ebc9677
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2018-11-28 12:05:29 +02:00
Tomi Juvonen 36af47855e Stop workflow on error
Enhance error handling and fail maintenance session with state
MAINTENANCE_FAILED

Story: 2003830
Task: #26600

Change-Id: I6fd1821aa42efce0ddbd1bc1f780c640c026d380
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2018-10-10 17:01:14 +03:00
Zuul e3ceda7232 Merge "Move any Fenix generic functionality out from default workflow" 2018-10-05 05:25:49 +00:00
Tomi Juvonen c5c1e37a7b Move any Fenix generic functionality out from default workflow
Story: 2003929
Task: #26835

Change-Id: Ic09869d9561342d3a7911601e4896af5ad122c81
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2018-10-05 06:25:55 +03:00
Tomi Juvonen 9b61cb3a06 Need up-to-date server info before get_empty_hosts
Story: 2003923
Task: #26823

Change-Id: I46817cf24c9d1e6dde989a8a7e9884b4c1a97292
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2018-10-01 09:07:45 +03:00
Tomi Juvonen 6c884655d2 Fix GET /v1/maintenance/{session}/{project}
API should return instances related to project state

Change-Id: I07e79632b754b0779b49bb64a6916b48b2e84ffe
Story: 2003721
Task: #26387
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2018-10-01 05:38:13 +00:00
Tomi Juvonen 55f0fcdf02 Initial Fenix code
Change-Id: Iaad439a8cbd286ef2266f36f462b7098fd547e3e
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2018-09-07 16:31:48 +03:00
Tomi Juvonen f82511385e Initial Cookiecutter Commit.
Inital commit with minor changes after Cookiecutter

Change-Id: I74f7dca5fa4abc0ae6cfc798f2a5e8fc72895bc1
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
2018-06-27 12:30:02 +03:00