Commit Graph

51 Commits

Author SHA1 Message Date
Ghanshyam Mann fad90f977b Update python classifier in setup.cfg
As per the current release tested runtime, we test
python version from 3.8 to 3.11 so updating the
same in python classifier in setup.cfg

Change-Id: Ic2fd571c7dd6493d40395b710a8434963b7c20b4
2024-01-03 23:55:24 -08:00
Zuul 106f023573 Merge "Add xilinx fpga driver" 2022-08-23 08:20:28 +00:00
zhangbailin 68c558645c Drop py3.6 and py3.7 from Cyborg
In zed cycle, OpenStack projects and oslo lib
has dropped the py3.6 and py3.7 support

- https://governance.openstack.org/tc/reference/runtimes/zed.html

With oslo not supporting the py3.6 and py3.7, we disscussed in cyborg
team, and we will remove the py3.6 and py3.7 support too.

Closes-Bug: #1977636
Change-Id: Ib934e50ee6e89cb1e2b4cbf8390eee2baa30effd
2022-06-04 14:52:44 +08:00
ericxiett 2c2ab34ee3 Add xilinx fpga driver
This patch implemented Xilinx FPGA driver in cyborg. Currently can
 bind xilinx card to guest, and support programming.

Implements: blueprint add-xilinx-fpga-driver
Change-Id: I8cf48f64a0754ff13da2dddc4fabc601087b14b1
2022-02-17 10:46:08 +00:00
Ghanshyam Mann 6699919069 Updating python testing classifier as per Yoga testing runtime
Yoga testing runtime[1] has been updated to add py39
testing as voting. Unit tests update are handled by the
job template change in openstack-zuul-job

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/820286

this commit updates the classifier in setup.cfg file.

[1] https://governance.openstack.org/tc/reference/runtimes/yoga.html

Change-Id: I7006d6484aca8dfc3c96812d564f1a385f339f0d
2021-12-14 02:40:41 +00:00
Yandong Xuan 1d47500d41 setup.cfg: Replace dashes with underscores
Resolves warnings like the following:

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

Change-Id: I48b452c2413a854b8171814112fc31285728a0d6
2021-04-26 15:47:27 +08:00
Zuul 2e6e87c5f6 Merge "Revert "remove py37"" 2021-03-12 01:32:24 +00:00
zhangbailin 19b7d147ea Add NVMe SSD driver
This patch implemented NVMe SSD driver in Cyborg.
The Inspur NVMe SSD driver provides the discover and report proposal of
Inspur NVMe SSD disks, then we can use these disks binding and unbinding
with VM like PGPU to accelerator the io rate for the VM. The Inspur NVMe
SSD doesnot support virtualization, one disk can be only bind to one VM.

The spec is already commit. Please see:
https://specs.openstack.org/openstack/cyborg-specs/specs/wallaby/approved/nvme-ssd-driver-proposal.html

Please check the test report in the following link:
https://wiki.openstack.org/wiki/Cyborg/TestReport/InspurNVMeSSD

Co-Authored-By: Wenping Song <songwenping@inspur.com>

Change-Id: Ic474814b780e9beca6f19df50c9ce4c5553850a1
2021-03-02 08:36:40 +08:00
Zuul 82d1ed968b Merge "Add intel NIC driver" 2021-02-07 08:45:36 +00:00
Xinran Wang e3caf5cb0a Add intel NIC driver
This patch implements a new driver for Intel Nic Card. It
can discover the device and report it to Placement service with
CUSTOM_NIC resource class and specific traits.

Operator should specify the device and correspond profile in a
config file so that nic's driver can read the info from this
file.

Please check the test report in the following link:
https://wiki.openstack.org/wiki/Cyborg/TestReport/IntelNic

Change-Id: Ida0ba8f24b9e226da7f3d7a85fc372247e5281a5
Implements: blueprint sriov-smartnic-support
2021-02-04 08:40:23 +00:00
wangzihao ced87f798b Revert "remove py37"
This reverts commit 4f04cfa4cf.

Reason of revert :Python 3.7 *is* supported because it falls
in the range of supported Python versions (3.6-3.8) [1].

[1] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019648.html

Change-Id: I08350e42b304db74f9d2cc6a6665e732018be88f
2021-01-14 14:22:31 +08:00
XinxinShen 4f04cfa4cf remove py37
Remove python3.7 from setup.cfg, since Wallaby's python
supported runtimes are python 3.6 and python 3.8[1]:

[1]: https://governance.openstack.org/tc/reference/runtimes/wallaby.html

Change-Id: I9d2eb1ed962ece148f164634e94999ae9dc00591
2021-01-03 15:53:27 +08:00
Ghanshyam Mann af49d0b30a Change default policy file from JSON to YAML
As Cyborg is switching to new policy, this is required
to avoid breaking the existing deployment using policy
file in json format and relying on default value of
'CONF.oslo_policy.policy_file'.

Default value of 'CONF.oslo_policy.policy_file' config option
has been changed from 'policy.json' to 'policy.yaml'. If new default
file 'policy.yaml' does not exist but old default 'policy.json' exist
then fallback to use old default file.

An upgrade checks is added to check the policy_file format and
fail upgrade checks if it is JSON formatted.

Added a warning in policy doc about JSON formatted file is deprecated,
also removed all the reference to policy.json file in doc as well as
in tests.

Related Blueprint: https://blueprints.launchpad.net/oslo.policy/+spec/policy-json-to-yaml

Change-Id: I865227e516dc7505c463ac279309169d95ea6a22
2020-09-18 14:16:31 +00:00
Yumeng Bao 270d12e9a8 Add new default rules and mapping in policy base class
Cyborg Policy Default Refresh is one of the planned blueprints for victoria
release, the specification[0] has been merged in ussuri. To be brief, we need
to do the followings to incorporate authorization scopes into cyborg:
1. Add protection test for all APIs.
   A protection test is similar to an API test, but purely focused on the
   authoritative outcome.In other words, protection testing is sufficient when
   we can assert that a user is or isn’t allowed to do or see something. For
   example, users with a reader role on the system or a project shouldn’t be
   able to make writable changes.
2. Add the following applicable seven personas to cyborg and mark old
   ones as deprecated roles:
   * project reader
   * project member
   * project admin
   * system reader
   * system admin
   * system admin or owner
   * system or project reader
3. Rewrite check string(authorization rules) using new personas for all APIs
4. Update policy documentation on cyborg-doc page

This patch refreshed cyborg default RBAC policy to scoped RBAC policy, and
reorganized the policy framework into a more logical way:
    1) added seven personas to basic policies and marked legacy roles
       as deprecated ones.
    2) extract API_policies from policy.py to indenpendent policy files
    3) extract authorize_wsgi.py out from policy.py

[0]https://specs.openstack.org/openstack/cyborg-specs/specs/ussuri/approved/policy-defaults-refresh.html

Story: 2007024
Task: 40835

Change-Id: I948d0202ddcd82a532c4de2c1850893cbfaf003d
2020-09-11 14:27:15 +08:00
Zuul 21c43211d3 Merge "Add Inspur FPGA driver" 2020-09-10 06:12:04 +00:00
songwenping 3108d28eb3 Add Inspur FPGA driver
Please see the test report in https://wiki.openstack.org/wiki/Cyborg/TestReport/InspurFPGA
This patch implemented Inspur FPGA driver in Cyborg. Currently we don't
support program with this card by Cyborg, the operator can bind the card
to guest and use it in guest, so BSP data reported is ignored now.

The spec is already merged. Please see:
https://specs.openstack.org/openstack/cyborg-specs/specs/victoria/approved/inspur-fpga-driver-proposal.html

Story: 2007772
Task: 39997

Change-Id: I7cc3482a4a6ac6fb0ca6965b7ce18bc37b122f63
2020-09-08 20:37:06 +08:00
Xinran Wang d560ec1fc3 Add a new driver for Intel QAT card
Please see the test report in https://wiki.openstack.org/wiki/Cyborg/TestReport/IntelQAT.
This patch implemented Intel QAT driver in Cyborg. The spec is already merged.
Please see:
https://specs.openstack.org/openstack/cyborg-specs/specs/victoria/approved/qat-driver-proposal.html

Story: 2008025
Task: 40679

Change-Id: Ibef3a5327a838b4867ed8d93951f6138c9f76a7d
Co-Authored-By: Jintao Wang(jintao.wang@intel.com)
2020-08-28 09:25:08 +00:00
Zuul f3b6cbc695 Merge "Remove translation sections from setup.cfg" 2020-05-14 04:09:27 +00:00
Zuul 3201c5b687 Merge "Add py38 package metadata" 2020-04-27 12:27:19 +00:00
zhangbailin e045686210 Remove translation sections from setup.cfg
These translation sections are not needed anymore, Babel can
generate translation files without them.

Change-Id: I6777384b40a0e54381823e4738e8c7ae6433275c
2020-04-26 19:45:12 +08:00
zhangbailin 771dab06e6 Update docs building
update requirements of openstackdocstheme and Sphinx for python 3.

Remove Babel, it's not needed anymore See
http://lists.openstack.org/pipermail/openstack-discuss/2020-April/014227.html

Change-Id: Ie8cf945f17427a9427755dff2f43c36777548c3d
2020-04-26 19:39:55 +08:00
zhangbailin cd97b0e52e Add py38 package metadata
Now that we are running the Victoria tests that include a
voting py38, we can now add the Python 3.8 metadata to the
package information to reflect that support.

Change-Id: Ie55ebf3d5492068ea804461c15e19a204995b3ff
2020-04-26 18:10:27 +08:00
zhangbailin 782cf4cb5f Cleanup py27 support
This commit cleanup below:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement

This commit also change the home-page refer to
https://docs.openstack.org/cyborg/latest/

Change-Id: I8eaa4d7bbdc8eea67f3c367d482ed80753284825
2020-04-05 09:39:28 +08:00
Arthur Dayne 6b9ab023e1 Stop testing python2.7
Python 2.7 support has been dropped. Last release of Cyborg to support
py2.7 is OpenStack Train. The minimum version of Python now
supported by Cyborg is Python 3.6.

Depends-On: https://review.opendev.org/#/c/691766/
Change-Id: Ie87ef7727b50d8d5ca43f0283c5688199c35412e
2019-11-19 02:09:08 -05:00
Yumeng Bao 477b4f9a55 remove rootwrap in cyborg
On one hand, as discussed in this patch[0], rootwap was intented
to be replaced by privsep, especially for new project.
On the other hand, we need remove rootwrap to fix the following
cyborg-tempest job failure in patch [0]:
cannot stat '/opt/stack/cyborg/etc/cyborg/rootwrap.d/*.filters':
No such file or directory

[0]:https://review.opendev.org/#/c/673957/

Change-Id: I1aaf38da3a68c656616c7d701b8f815e17ed0152
2019-09-24 00:30:25 -07:00
Shogo Saito 38119f675e python3 patch (including zuul config)
Fix points are extracted in following methods.

1st: check with sixer:
    change unicode function to use sixer lib.
2nd: check & fix manually.
    2-1: as_dict() function
         fix as_dict() to work in py3 env.
    2-2: delete unnecessary as_dict() call in response to the change in as_dict()
    2-3: fix all_pfs_have_vf() to be able to treat both list and iterator,
         because filter() function returns list in py2, iterator in py3.
    2-4: To treats map() in same way in py2/3 env , wrap map() with list()  in P6,P7
    2-5: add python3.7 to setup.cfg
    2-6: add py3 tests, as voting

Change-Id: Ibfdec7258c731ee45ce1b9bdba4b2024cea78a12
Story: #2003219
Task: #23418
2019-09-13 09:27:22 -07:00
Yikun Jiang c18731f3e9 Add Huawei Ascend driver
This patch adds the Huawei Ascend driver.

Change-Id: I105f34de9ad95db2e98ac41836e686bafda6c0a5
2019-09-03 09:13:31 +00:00
Zuul 8c26ba4696 Merge "Add the fake driver" 2019-08-09 22:07:46 +00:00
Yikun Jiang 658334455b Add the fake driver
This patch add the fake driver, this driver can be configured
in cyborg.cfg to enable it:

[agent]
enabled_drivers = fake_driver

It would be used in cyborg test.

Change-Id: I08c63d533fd5dbd4330c68a22d2ecafb38134766
2019-08-09 16:24:53 +08:00
inspurericzhang 1500136025 Mailing lists change openstack-dev to openstack-discuss
Change-Id: Icb8c6dc89c381cdcf73e279248b723bd416acccb
2019-07-01 19:15:21 +08:00
zhangbailin 256d9d4b3c Dropping the py35 testing
All the integration testing has been moved to
Bionic now[1] and py3.5 is not tested runtime for
Train or stable/stein[2].

As per below ML thread, we are good to drop the py35
testing now:
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005097.html

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004647.html
[2]
https://governance.openstack.org/tc/reference/runtimes/stein.html
https://governance.openstack.org/tc/reference/runtimes/train.html

Change-Id: Ib19f54bc790190f9d26164126a528acf78b92f6f
2019-05-18 15:36:18 +08:00
wangzh21 5c4e648159 Add gpu driver
1. Imply gpu driver of passthrough mode.
2. Pre-configure for GPU passthrough(We should move this guide to admin
guide doc later):
a) Edit /etc/default/grub
   Modify GRUB_CMDLINE_LINUX=’… quiet’ to GRUB_CMDLINE_LINUX=’… quiet
   intel_iommu=on’
b) grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
c) Reboot compute node.
d) Check it is successful or not.
   dmesg | grep -e DMAR -e IOMMU
   You would see something echoed.
References:
https://pve.proxmox.com/wiki/Pci_passthrough

3.Remove unused import.
4.Fix spelling mistakes.
5.Fix _match_nova_addr, becase addr in os-acc is like 0000:00:06.0

Story: 2002954
Change-Id: I555b656f80b32eafdc24f9ba81ddc9af416d95e9
2019-03-21 18:01:29 +08:00
wangzh21 ca225fc1bf Add "Report device data to cyborg"
1. Load drivers with stevedore
2. Now update_usage just do the discover, add report data when
   conductor api ready.

Change-Id: Ia813c5a8dd8f29ce689204e52b6e1f691633f5fc
2018-12-16 18:22:49 +08:00
whoami-rajat 79e8f86aa0 Add cyborg-status upgrade check command framework
This adds basic framework for cyborg-status upgrade
check commands. For now it has only "check_placeholder"
check implemented.
Real checks can be added to this tool in the future.

Change-Id: I4a180f9a1b25c75489ad3cfee30a7b55506e0bbd
Story: 2003657
Task: 26126
2018-10-26 19:42:43 +05:30
Yumeng Bao e3746dd7b4 Add WSGI support script for cyborg API
Control Plane API endpoints deployment via WSGI [1] was a community goal
in Pike release. This method provides a series of advantages over that
of running api via a Python command that runs a web server.

This patch add scripts for running API services via WSGI.
The follow-up patch will add the devstack install support.

[1]https://governance.openstack.org/tc/goals/pike/deploy-api-in-wsgi.html

Change-Id: Ifb0ae2fa2143236fb9b38d230f2604e4e560e66e
2018-10-20 08:37:53 +00:00
Yumeng Bao 33b86b8631 Follow the new PTI for document build
In order to follow the new PTI for doc build, this patch:
1)removes unused build_sphinx in setup.cfg
2)move doc dependencies from test-requirements.txt to doc/requirements.txt
3)update tox.ini

For compliance with the Project Testing Interface as described in:
https://governance.openstack.org/tc/reference/project-testing-interface.html

For more details information, please refer to:
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: Ic700f04b857516ce5b25ce5e0fc431d1f08e24f3
2018-08-11 12:55:49 +08:00
zhipengh c3f97d4b48 Bug fix in setup.cfg for rocky ms2
As Sean and Clark suggested, etc/cyborg/rootwrap.d = etc/cyborg/rootwrap.d/*
has been moved into one line.

Change-Id: I7d51aa158b4918a89fc41b7e931b9ef0465d87ca
Signed-off-by: zhipengh <huangzhipeng@huawei.com>
2018-06-13 08:55:03 +08:00
wangzh21 ae87683acd Fix tox -egenconfig
1.Imply the namespace cyborg
2.Remoeve unused namespace oslo.reports

Change-Id: I61de79aa3b8a97c4a4dd6d92ef7bce951f6efd55
Story: #2002200
Task: #21685
2018-06-10 16:37:40 +08:00
wangzh21 cc9da9a944 Load cyborg-api app with paste_deploy
Change-Id: I3976d05f737e09ceb88c40f65b445bad0b096516
Story: 2002121
Task: 19800
2018-06-07 21:42:52 +08:00
Nguyen Van Trung ac6b70dc6a Add default configuration files to data_files
In order to make it simpler to use the default
configuration files when deploying services
from source, the files are added to pbr's
data_files section so that the files are
included in the built wheels and therefore
deployed with the code. Packaging and deployment
tools can then more easily use the default files
if they wish to.

This pattern is already established with similar
files for neutron and the glance metadefs as has
been mentioned in the related bug report.

Change-Id: I466f235fec7be024f654739a31365724eaf24097
Closes-Bug: #1718356
2018-03-15 23:20:29 +07:00
Andreas Jaeger 6881e76a91 Fix doc build warnings
Fix a couple of warnings that show up when tox -e docs is run.

Also, improve RST formatting and remove extra lines.

Treat warnings as errors to not have those come in again.

Change-Id: I2bdd321a0702168d19ee650c37aabe7f028780c0
2018-02-14 09:30:26 +01:00
zhipengh fe04417036 Add release pkg related files
Change-Id: I88a259c05b5e13dbe06f0f00c4f73cbc413cd3ee
Signed-off-by: zhipengh <huangzhipeng@huawei.com>
2018-02-10 10:51:47 +08:00
shangxiaobj f454e41bf6 Update and replace http with https for doc links in cyborg
1) Update doc links according to OpenStack document migration
2) Use https instead of http for docs links

Change-Id: I5644f38cf56f1e3b6a31252523a3bf28248e9f08
2017-09-12 22:46:46 -07:00
Jenkins 168ea97459 Merge "Cyborg deployment script" 2017-09-11 19:27:17 +00:00
zhuli c6c5ca042f add policy support
Add policy support to determine which user can access which objects
in which way

Change-Id: If959089366ec252d4a7904d0e78733a2bf52fff5
2017-09-03 21:04:20 +08:00
jkilpatr 85ac496ff6 Cyborg deployment script
This deploys cyborg services across various hosts and sets them up
as boot time services configured to access the local rabbit and mysql
instances and then runs some validations to ensure
that everything started correctly.

This does not have any saftey for multi-controller setups yet, right now
if you hand the playbook 3 hosts under 'controller' it will deploy three
api endpoints and three agents. Which probably won't work right.

Change-Id: I79b6b1ce9bb6766d5e608c89504c4bbaeaba5599
2017-08-30 09:27:56 -04:00
zhuli 57e4c042ca add cyborg-conductor & db
1. add conductor rpc
2. add cyborg-conductor command
3. add db and init `accelerators` table
4. add accelerator_create method
5. add cyborg-dbsync command

Change-Id: I07333a4df7a42878dcf950b2b7893a37670da87b
2017-08-21 09:25:48 +08:00
zhuli c7b24fda7f Add cyborg-api command
Change-Id: I392ad0383d5d8299db407df79bd60adbfbd428cd
2017-07-29 04:01:06 -04:00
Arundhati Surpur 8c559f6c3b Removed older version of python added 3.5
In setup.cfg file the python 3.5 is added
In tox.ini the python 3.5 is added

Change-Id: Ifd063c95b0a4daed589805b1363f39ff89d7def8
2017-07-06 11:30:48 +05:30
zhipengh 43e717bd9e Rename old Nomad files to Cyborg
Replace nomad with cyborg in the skeleton, also update
test-requirement.txt

Change-Id: I2b3f54f2591facc6bab7ab8f41fb8c9919b01845
2017-02-05 22:31:28 +08:00