Commit Graph

113 Commits

Author SHA1 Message Date
OpenDev Sysadmins 897086a08c OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:39:22 +00:00
Ian Wienand ab3c3ae8f0 Replace openstack.org git:// URLs with https://
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.

This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.

This update should result in no functional change.

For more information see the thread at

 http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html

Change-Id: Id659cb140604149854a6d8d3ddce3c74a65f3b2d
2019-03-24 20:33:23 +00:00
Nguyen Hai b9a0c0a2dc import zuul job settings from project-config
This is a mechanically generated patch to complete step 1 of moving
the zuul job settings out of project-config and into each project
repository.

Because there will be a separate patch on each branch, the branch
specifiers for branch-specific jobs have been removed.

Because this patch is generated by a script, there may be some
cosmetic changes to the layout of the YAML file(s) as the contents are
normalized.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I319ab1749d81d17602d7cd7c433322dd91122200
Story: #2002586
Task: #24291
2018-08-17 14:47:50 +09:00
zhipengh df22e984ed queens release doc fix part 3
Add Jinghan's devstack guide to doc

Change-Id: I782943a3a102132612a3a6803e12e5f95f0bb359
Signed-off-by: zhipengh <huangzhipeng@huawei.com>
(cherry picked from commit 54ec660a57)
2018-02-14 17:06:52 +00:00
Andreas Jaeger 6c1f52a8f4 It's releasenotes - plural
Releasenotes builds in OpenStack requires a directory called
releasenotes/source - rename files.

Note that tox.ini is already correct, so with this change "tox -e
releasenotes" works.

Fix warning about RST problems.

Change-Id: Ic2b393e4a5c5324e184030dc1d21d0dc27aa060e
(cherry picked from commit 5b4b9a382c)
2018-02-14 11:27:31 +00:00
Zuul 2ee005a46f Merge "queens release doc fix part 2" into stable/queens 2018-02-14 11:18:46 +00:00
zhipengh 8d0ea4fea2 queens release doc fix part 2
Add releasenote for queens in the right way

Update 1: fix trivial error on L148

Update 2: fix indention

Update 3: fix various places Andreas helped to point out

Change-Id: Ie692a428459c872c2069f3a377469c788e1f18c5
Signed-off-by: zhipengh <huangzhipeng@huawei.com>
(cherry picked from commit 50e6fcdf81)
2018-02-14 10:43:08 +00:00
Andreas Jaeger dc97819b21 Remove ChangeLog
This is not needed to be under version control, remove it.

pbr generates it automatically as needed.

Change-Id: I76abd7738448034d9cabe2bcc39564af9976512c
(cherry picked from commit 6765d265b2)
2018-02-14 10:41:40 +00:00
Andreas Jaeger 7b37d78bc5 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
(cherry picked from commit 6881e76a91)
2018-02-14 09:10:02 +00:00
zhipengh e42d5342b9 Add release pkg related files
Change-Id: I88a259c05b5e13dbe06f0f00c4f73cbc413cd3ee
Signed-off-by: zhipengh <huangzhipeng@huawei.com>
(cherry picked from commit fe04417036)
2018-02-10 04:11:21 +00:00
Zuul a437d56680 Merge "add test case for agent resource tracker" 2018-02-08 15:52:48 +00:00
Zuul e6d198a60e Merge "Added Unit tests for object Accelerator and Deployable" 2018-02-08 15:17:31 +00:00
Zuul c95b5e1686 Merge "bug fix: missing i18n._()" 2018-02-08 15:09:17 +00:00
Zuul ce8b3091b6 Merge "bug fix: rename accelerator to Accelerator" 2018-02-08 14:26:52 +00:00
Shaohe Feng a35598b1a5 bug fix: devstack adds cyborg account and endpoint.
Co-Authored-By: Jinghan Sun <jinghan.sun@intel.com>

Change-Id: I01f0e79fbbc85b0e8318baf0fca11fd0036277ec
2018-02-08 10:57:42 +00:00
Shaohe Feng 709f79ce6d bug fix: rename accelerator to Accelerator
When run:
$ python -m unittest cyborg.tests.unit.accelerator.drivers.modules.test_generic

It will report the follow error:
  File "cyborg/tests/unit/accelerator/drivers/modules/test_generic.py", line 20, in <module>
    from cyborg.accelerator.drivers.generic_driver import GenericDriver as generic
  File "cyborg/accelerator/drivers/generic_driver.py", line 24, in <module>
    from cyborg.accelerator import accelerator
  File "cyborg/accelerator/accelerator.py", line 23, in <module>
    class accelerator(Base):
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative/api.py", line 64, in __init__
    _as_declarative(cls, classname, cls.__dict__)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative/base.py", line 88, in _as_declarative
    _MapperConfig.setup_mapping(cls, classname, dict_)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative/base.py", line 103, in setup_mapping
    cfg_cls(cls_, classname, dict_)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative/base.py", line 125, in __init__
    clsregistry.add_class(self.classname, self.cls)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative/clsregistry.py", line 65, in add_class
    module.add_class(classname, cls)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative/clsregistry.py", line 172, in add_class
    existing.add_item(cls)
AttributeError: '_ModuleMarker' object has no attribute 'add_item'

That's because:
_ModuleMarker will add the module name and class name in to same contents dict.
_MultipleClassMarker refers to multiple classes of the same name within _decl_class_registry.
It has add_item attribute.
_ModuleMarker refers to a module name within _decl_class_registry.
It does not have add_item attribute.

So the class name should be different with module name.

REF:
https://github.com/zzzeek/sqlalchemy/blob/master/lib/sqlalchemy/ext/declarative/clsregistry.py

Change-Id: I8d8aa8809f6afd5b9eaace832a06ba7f3770e652
2018-02-08 09:31:23 +00:00
Shaohe Feng a1a5ad95cd bug fix: missing i18n._()
Change-Id: If1de4e857dd3b08dc9db754341cbe008291dd990
2018-02-08 06:22:23 +00:00
Shaohe Feng 805f96d1e1 add test case for agent resource tracker
Co-Authored-By: Dolpher Du <Dolpher.Du@intel.com>

Change-Id: I17a69fca393367c4dc4d1fd27bcb4984d6ce6ad0
2018-02-07 15:43:46 +00:00
zhipengh 2e78e10e5a queens release doc fix part 1
More patches might follow

Update 0(pacth 1):
1.remove unnecessary files
2.reorg doc directory

Update 1(patch 2):
add releasenotes and cleanup the internal-api spec

Update 2(patch 3):
1.added a new releasenote for generic-driver
2.fixed errors in the other four earlier releasenotes
3.add comment in cyborg/object/accelerator.py and deployable.py to
let user better know the meanings of the table entries.

Change-Id: I45a104f9f77a0a163008657c681cf109f941dd11
Signed-off-by: zhipengh <huangzhipeng@huawei.com>
2018-02-07 20:53:38 +08:00
Zuul 74dfb65aa8 Merge "Provide reference implementation for Cyborg" 2018-02-05 07:42:47 +00:00
Rushil Chugh 71e4a39f93 Provide reference implementation for Cyborg
This patch proposes to provide a reference implementation
for other drivers

Change-Id: I997b817ef58b77aa439e14902dc0ee104a163b66
2018-02-05 00:28:50 -05:00
Zuul 4e9dd99c29 Merge "Add Cyborg SPDK Driver" 2018-02-05 04:07:44 +00:00
Li Liu 2ae19254bb Added Unit tests for object Accelerator and Deployable
Change-Id: I9cf93306e7770172a95825d320de15e2d60c4d45
2018-02-04 18:31:50 -05:00
Zuul 6ee7ed802f Merge "FPGA driver support" 2018-02-04 17:18:52 +00:00
Zuul af5dd8e1ed Merge "aggent support resource tracker for FPGA" 2018-02-04 17:09:07 +00:00
heluwei 488cc340ef Add Cyborg SPDK Driver
SPDKDRIVER is a virtual interface which provides common methods
for specific drivers (such as: VHOSTDRIVER, NVMFDRIVER, etc.).
For this reason, the Cyborg agent should invoke these drivers
via py-spdk[0] to communicate with the backend SPDK-base app server.
The py-spdk is management lib for SPDK applications which need to
be imported into the cyborg, so we put the pyspdk lib into cyborg/
cyborg/accelerator/drivers/spdk/util/. There are some unit tests
we added in cyborg/cyborg/tests/unit/accelerator/drivers/spdk/.
Now We are first implementing the unit tests of
test_discover_accelerator() and test_accelerator_list(),
and the rest will be added later.

For example:
When the Cyborg agent call the NVMFDRIVER.discover_accelerator(),
the return value we get is:
{
    'server': 'nvmf_tgt',
    'bdevs': [{
       "num_blocks": 131072,
       "name": "nvme1",
       "block_size": 512,
       ......
     }]
    'subsystems': [{
       "core": 0,
       "nqn": "nqn.2018-01.org.nvmexpress.discovery",
       "hosts": [],
       ......
     }]
}

[0] The implementation of py-spdk is subbmitted to
https://review.gerrithub.io/#/c/379741/, please visit it.

Change-Id: I2d0e4dc6b58e725584d22ee85961877a870c68a7
2018-02-05 00:57:30 +08:00
zhuli aee55527a9 Implement FPGA data model and corresponding API
This patch implements the Deployables data model and provides corresponding
CRUD REST/RPC API.

Since the CREATE/UPDATE/DELETE method of Deployables should only be used
by internal component, currently keep these in code is just for convenient
test purpose, which will be removed later.

blueprint cyborg-fpga-modelling

Change-Id: I8a028954bd27d015c0b062f730673ea39701774d
2018-02-04 21:45:26 +08:00
Shaohe Feng 5b72422930 FPGA driver support
This patch is not a plugin implementation

Cyborg agent can call driver as follow:
from cyborg.accelerator.drivers.fpga import base
fdriver = base.FPGADriver
 # There maybe more than one vendor fpga card on a host.
venders = fdriver.discover_vendors()
for v in venders:
    dr = fdriver.create(v)
    dr.discover()

intel = base.FPGADriver.create("intel")
intel.program("/fpga/device/path", "/local/path/image")

When call IntelFPGADriver.discover(), we can get the result as follow:
    [{'assignable': False,
      'devices': '0000:5e:00.0',
      'function': 'pf',
      'parent_devices': '',
      'path': '/sys/class/fpga/intel-fpga-dev.0',
      'pr_num': '1',
      'product_id': '0xbcc0',
      'regions': [{'assignable': True,
        'devices': '0000:5e:00.1',
        'function': 'vf',
        'parent_devices': '0000:5e:00.0',
        'path': '/sys/class/fpga/intel-fpga-dev.2',
        'product_id': '0xbcc1',
        'vendor_id': '0x8086'}],
      'vendor_id': '0x8086'},
     {'assignable': True,
      'devices': '0000:be:00.0',
      'function': 'pf',
      'parent_devices': '',
      'path': '/sys/class/fpga/intel-fpga-dev.1',
      'pr_num': '0',
      'product_id': '0xbcc0',
      'vendor_id': '0x8086'}]

Cyborg agent can use it to form it's DB.

Co-Authored-By: Dolpher Du <Dolpher.Du@intel.com>

Change-Id: I132be5ecdb90b385b68b0cdf306d1402ef4bfc04
2018-02-04 12:45:53 +00:00
Shaohe Feng b96d0e2570 aggent support resource tracker for FPGA
use PeriodicTasks to track resources.

Info:
 https://docs.openstack.org/oslo.service/latest/reference/periodic_task.html

Aggent is a bridge for FPGA driver and conductor.
It gets the lastest informations and update them to conductor.

This patch we call conductor API directly instead of object
remotable method.  Will support it in the next version.

This patch depends on the FPGA driver patch and conductor patch.

How to test this patch:
1. apply the fpga driver patch
   https://review.openstack.org/#/c/531129
2. generate a sysfs fpga data
   $ ./cyborg/tests/unit/accelerator/drivers/fpga/intel/prepare_test_data.py
3. Change the SYS_FPGA in cyborg/accelerator/drivers/fpga/intel/sysinfo.py to
   "/tmp/sys/class/fpga"
4. change the SYS_FPGA_PATH in cyborg/accelerator/drivers/fpga/utils.py to
   "/tmp/sys/class/fpga"
5. restart agent.

The unittest for this patch will be in a separated patch, and comes out ASAP.

Co-Authored-By: Dolpher Du <Dolpher.Du@intel.com>

Change-Id: I5e487cf939aa65d0fc79399ddd5d1337a8c2fa98
2018-02-04 11:54:20 +00:00
Zuul b22761ab0d Merge "Zuul: Remove project name" 2018-02-03 01:32:38 +00:00
James E. Blair 3febc582af Zuul: Remove project name
Zuul no longer requires the project-name for in-repo configuration.
Omitting it makes forking or renaming projects easier.

Change-Id: I3066f4fdf016d26f43a34ecd60c64ec6423f31fd
2018-02-02 06:09:51 -08:00
Zuul 6c64f63ba7 Merge "Added NOVA Placement API Client and unit tests. This feature is used for updating the placement DB on NOVA side Cyborg DB should be kept up to date with the placement DB all the time." 2018-01-31 07:48:30 +00:00
Li Liu 34aa0b8b2c Added NOVA Placement API Client and unit tests.
This feature is used for updating the placement DB on NOVA side
Cyborg DB should be kept up to date with the placement DB all
the time.

Here is an example on how to use it:

    from cyborg.services import report as placement_report_client
    p_client = placement_report_client.SchedulerReportClient()

    resource_provider = {'name': 'rp_name', 'uuid': 'uuid'}
    p_client.create_resource_provider(resource_provider)

Change-Id: I04f5e3fc283074212841e62dde54df496db535ec
2018-01-29 12:37:26 -05:00
Jinghan Sun 28eb9bb704 Fix bug in cyborg/devstack script
(1) Define undefined local variables.
(2) Correct script commands that create and migrates database

Change-Id: I2c140bedf5e89c88ae1de72511e5068e35fd2fad
Closes-bug: #1744630
2018-01-22 08:40:55 +00:00
Zuul d421f978f0 Merge "Added proposal for fpga modelling" 2018-01-18 02:18:59 +00:00
Zuul 52e31bb6bb Merge "Supplementing accelerator CRUD api" 2018-01-17 15:47:59 +00:00
Li Liu f683bd19d8 Added proposal for fpga modelling
Change-Id: I23dd57fea320aabeac4d1982f5c9d9a818bcbfb5
2018-01-17 09:57:29 -05:00
Zuul 0cb64ac038 Merge "Internal API spec" 2018-01-16 15:45:11 +00:00
Zuul 6590e9a6c9 Merge "Cyborg FPGA driver support" 2018-01-16 15:02:23 +00:00
jkilpatr 9d40c88d0e Internal API spec
This is my attempt at whipping up some internal API calls
for Crushil, there's some assumptions in here we should talk
about. Hopefully this will also be a good place to keep track
of the internal API in general.

Change-Id: I59f3706190d0abed2997a8302717308ea5974ac5
2018-01-16 14:06:14 +00:00
Jinghan Sun c6c40568e3 Let user to setup and run Cyborg by devstack
The related bug was spotted when I tried to setup cyborg environment by devstack but failed to start cyborg.

It is result from the permission change in devstack/lib/cyborg.

Closes-bug: #1742643
Change-Id: I54426aea597119253f07acf243d6616cd27935ac
2018-01-15 08:00:27 +00:00
zhuli b860aef110 Supplementing accelerator CRUD api
with this patch, we are able to do CRUD via accelerator api

POST /accelerators
    Create a new accelerator
GET /accelerators/{uuid}
    Retrieve information about the given accelerator
GET /accelerators
    Retrieve a list of accelerators
PATCH /accelerators/{uuid}
    Update information about the given accelerator
DELETE /accelerators/{uuid}
    Delete the given accelerator

Change-Id: Ibc97ec49f557cac69dfd38f99f28bc7b205732b9
2018-01-14 02:03:24 +08:00
Shaohe Feng 9db9994f57 Cyborg FPGA driver support
Co-Authored-By: Dolpher Du <Dolpher.Du@intel.com>

Change-Id: I5b27063a2644e067da0fb6ddbc39d82b4a9a244e
2018-01-12 08:46:41 +00:00
Zuul 288b7c75f1 Merge "Move legacy jobs to project" 2018-01-02 06:52:00 +00:00
Duong Ha-Quang a2fb9b4f42 Move legacy jobs to project
This patch implements first step in zuulv3 migration guide [1]:

Move jobs to Cyborg repo

[1] https://docs.openstack.org/infra/manual/zuulv3.html#legacy-job-migration-details

Change-Id: I31d5d7aed511aca18c1096b9f5eb7572f683d613
Needed-By: If816cfec5ace8f9fd7293c0749948d2c0dcb817a
Needed-By: I40e9380d049f541bf34488a3010d95f4a6835179
2017-12-29 09:27:59 +01:00
Zuul feacb2e5ab Merge "Fix 500 error when creating accelerators" 2017-12-27 05:38:55 +00:00
Zuul 6aff6027fa Merge "Auto generate cyborg.conf with oslo-config-generator" 2017-12-27 04:31:42 +00:00
zhuli acdfafa083 Fix 500 error when creating accelerators
Change-Id: Id0d5616c8e962699ae6435966a9b79b0aaaef54d
Closes-Bug: #1737575
2017-12-12 00:41:36 +08:00
Nguyen Van Trung be6b4860fd Indicating the location tests directory in oslo_debug_helper
According to [1], we can passing a "-t" argument to
oslo_debug_helper to indicate the directory where tests
are located. This will solves ImportError exception.

[1] https://docs.openstack.org/developer/oslotest/features.html

Change-Id: I13b7a11bc1a3e76709352a248d9eaa64aeba8bc3
2017-12-11 08:10:55 +07:00
zhuli a1e4b44797 Auto generate cyborg.conf with oslo-config-generator
Change-Id: If7cbf3701bb7b5ef0e0536339f8c1df9557f0688
2017-12-08 10:58:25 +08:00