Commit Graph

176 Commits

Author SHA1 Message Date
OpenDev Sysadmins 9604eb1508 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:52:01 +00:00
jacky06 e8f3525cd3 Update hacking version
Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: I682333b289738848694636ca994dba005e9690cf
2019-03-20 23:47:40 +08:00
zhouxinyong a2377ac834 Update url in HACKING.rst
Change-Id: I47acf85b242e76b2146c4a055502fec283c69a50
2018-11-16 00:58:26 +08:00
naichuans 12c68d0210 os-xenapi: change dom0 uuid get function
The control domain id of slave nodes in xenserver pools is not 0,
so the old cmd would fail. Change the cmd to fix it.

Change-Id: I2814a1421fd5825d88609057b48fa61254a944cc
Closes-Bug: #1783238
2018-07-24 02:14:19 +00:00
Zuul 5e6c2740ec Merge "Replace file() with open() for Python 3 compatibility" 2018-07-23 09:09:39 +00:00
Zuul 1f3c3c5b86 Merge "os-xenapi: add utility to setup guest VM logs" 2018-07-17 09:09:14 +00:00
naichuans 8e3b52feac os-xenapi: add utility to setup guest VM logs
Add code to copy guest logs to /var/logs/xen/guest and set rotation

Change-Id: Ied7dadad2c3b7b6e9a05cf49d1ad16eac5cf9204
2018-07-16 09:47:06 +00:00
Vu Cong Tuan 0101e2e932 Replace file() with open() for Python 3 compatibility
The built-in named 'file' has been removed since Python 3.0 [1]
This patch replaces it by 'open' which is the same under Python 2 and 3.

[1] https://docs.python.org/release/3.0/whatsnew/3.0.html#builtins

Change-Id: Id39efad099358a76743693cc6e32bddca57e8e45
2018-07-05 10:44:00 +07:00
Zuul 8d5288c2c4 Merge "Remove the restriction that SR must be FS based SR" 2018-06-15 03:19:15 +00:00
Huan Xie 61c451e896 Change neutron firewall driver to ovs
When neutron firewall driver changed to iptables_hybrid, the CI
always fail, change it back as our OVS backend is 2.3.2 which
doesn't support such function

Change-Id: Ieacba606afcf7fb026dfa892da4ededa8ef8a4a2
2018-06-07 10:21:43 +00:00
Jianghua Wang 7d248c9c92 Remove the restriction that SR must be FS based SR
We can support non-FS based SR with the supporting on VDI streaming
feature. And VDI steaming will be the default image handler. So
this commit is to change the installation script to allow no-FS
SR types. For the VDI streaming feature, please check the depends-on.

Depends-On: I0ad8e34808401ace9b85e1b937a542f4c4e61690
Change-Id: Iea687f17ab12e30e8dc55cbecdcfd8991d402fc8
2018-04-27 01:36:46 +00:00
Doug Hellmann 783ee4af30 uncap eventlet
We will manage the eventlet version using constraints now. See the
thread starting at
http://lists.openstack.org/pipermail/openstack-dev/2018-April/129096.html
for more details.

In order to change the requirements file we also need to fix the lower
constraints settings so that they comply with policy, so this patch also
includes those changes.

Change-Id: If5be7eb462360c92c7274ddb4f204631bdc02555
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-19 10:22:51 -04:00
wangqi fc3d9c9a12 Replace py33 with py35
We support py35 now.so it is no need to keep
the supoort for py33.so drop py33

Change-Id: I3dd8a7d79cf1fe1aa9373c5d5e8732386ffa8772
2018-04-18 10:07:47 +00:00
Zuul e071ac72b2 Merge "VDI-Streaming: support customizing compress level" 2018-04-18 07:56:13 +00:00
Zuul af534d522a Merge "Avoid using the module of future in xapi plugin" 2018-04-18 07:56:12 +00:00
Jianghua Wang 13bda2280f VDI-Streaming: support customizing compress level
As uploading image, it will compress the vdh file and generate the
gzipped tar file. This commit will change it to use default compress
level as 6; and also allow the API's user to specify a customizing
compress level basing on demand.

Change-Id: If343326d7a501b25662fecb0b57d7637acabe250
2018-04-18 03:20:07 +00:00
Jianghua Wang e2888457c5 Update README for devstack tool to support LTSR only
Change-Id: I464384d9ae6c3fb634df311dec81bbaff6521316
2018-04-09 08:35:37 +00:00
Jianghua Wang 6953134a13 Avoid using the module of future in xapi plugin
In XenServer's dom0 (e.g. XS7.0/7.1), the module of future is
not available. So this commit is to avoid using *future*. Instead
it import check_output from different modules basing if *future*
module is available of not.

Change-Id: Ib75b2b7965e63033ea933f7cb4a4a54a2f48ef75
Partial-Bug: #1762130
2018-04-08 09:21:55 +00:00
Jianghua Wang 3e3b38e74a VDI-streaming: support non-default SR
If the SR is not the default one, the nova option of "sr_matching_filter"
can be used to get proper SR. In order to support it with VDI streaming,
we should add a new parameter - sr_ref which will be passed down by
nova code.

Change-Id: I624ee58f9c630f1712e066f3523ee6db45775e5c
2018-03-29 13:10:44 +00:00
Zuul bac77ee5af Merge "add lower-constraints job" 2018-03-27 07:46:41 +00:00
OpenStack Proposal Bot 754c313d8a Updated from global requirements
Change-Id: I7dbae7e21615c83bfc9176f2b15bf2c12612b6b3
2018-03-26 08:20:50 +00:00
Doug Hellmann 1a73872a28 add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: Ife046ce4b1056284d1151c84f83697d5690aff62
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 17:31:13 -04:00
Zuul 916791f317 Merge "Updated from global requirements" 2018-03-22 13:57:16 +00:00
Jianghua Wang ed9c448971 Make os-xenapi package as universal
Now os-xenapi is compatible with both python2 and python3.
This patch is to change the package of os-xenapi as universal.

Change-Id: Ia1314de1b49e17c841b9cc7bf5677dbc092ca62d
2018-03-22 11:22:04 +00:00
Jianghua Wang 4e26270ea8 Fix random failures in test_glance
We had some change in source code (glance.py) to make os-xenapi
be compitable with both py2 and py3. But the modules in the UT
have not been changed accordingly. So some mocks on module's
method don't take effective.
This commit is to fix the failures in test_glance.

Change-Id: I42cbe4f5dc5cec5d28394b9502196ff9c9bb8761
Closes-Bug: 1757928
2018-03-22 04:01:44 +00:00
OpenStack Proposal Bot b8a0e9db06 Updated from global requirements
Change-Id: I05229064777fb40854920c7280a3349d025abc49
2018-03-15 07:46:22 +00:00
Jianghua Wang f45f75b406 Move the Devstack installation guide to sub dir: tools
The top README will show in the package home in pypi. With this
*Devstack Installaction* guide in the README, it makes the page
messed-up. I think it's better to move it to the sub directory
where the relative installation tools are located.

Change-Id: Iff4bdc5353f76c14d03f7b6d3a12b46e06fd8c71
2018-03-12 10:28:35 +00:00
Jianghua Wang 9f31d2af8f Add reno for xenapi_bootstrap
Change-Id: I23f5bb48ce01cbb2a2a1aa4b5d7971db61a12ead
2018-03-12 10:26:53 +00:00
Zuul 5696d0bd00 Merge "Fix for py3 compat" 2018-02-27 21:38:58 +00:00
Jianghua Wang 2c0eb79cd7 Use module name (__name__) for getLogger()
We usually use a period-separated hierarchical module name as
the logger's name. But we have three scripts are using a hardcoded
name. This commit is to change them to use __name__ to make them
consistent with others. By using the period-separated hierarchical
module name, it's easier to know which module generated the log
lines so it's also easier to get the file name.

Change-Id: I373ce9b44caf2b9baffb753e6db7ad8789219f4b
2018-02-22 07:46:03 +00:00
Thomas Goirand 3599f53516 Fix for py3 compat
Fixes os_xenapi/dom0/etc/xapi.d/plugins/*.py wrt Python 3 compatibility,
also remove some tests in os_xenapi/tests/plugins/test_glance.py that
are too Py2 centric.

Change-Id: Iab721f6a47dc023f01670076ef7d1de107a913ae
2018-02-21 08:54:22 +01:00
Jianghua Wang 15f56c9f9c Kolla: Include bridge name for host's ipv4s.
Sometime we need to know if a domu's interface is conneted
to a same bridge (network) as dom0's interface. This commit
is to add bridge name for each ipv4 entry in the xenapi facts.

Change-Id: I8a6e1507cfa2c935b18e2fed04abaa06df9b0e51
2018-01-26 10:23:15 +00:00
naichuans ad90523b23 os-xenapi: Fix bugs related with sshclient modifications
SSHClient.ssh will return three values instead of two, modify
related codes to avoid error.

Change-Id: Idbee3d277e1a89aba683ce2dd38649ffa29c55df
2018-01-26 10:12:34 +00:00
naichuans 5ae81fe3fb os-xenapi: Add setting function to support logging
Add function to support logging

Change-Id: I7b77089b38219467a983c78548787d6dfdafade4
2018-01-24 03:00:59 +00:00
Jianghua Wang b1bf53ccd6 XenAPI-Kolla: Gather domU's vifs in facts
This commit is to gather domU's vifs in facts. So that the compute
VM's interfaces' vif information will be included in the xenapi_facts.
When deploy OpenStack on XenServers, the vif information can be used
by deployment scripts (e.g. in Kolla-ansible, it can use the vif's
bridge to support provider networks by setting the bridge mappings).

Change-Id: I9a6bebe19ed488bb2173d5dc2daa14e236411243
2018-01-23 13:30:42 +00:00
Zuul 638faee5fe Merge "os-xenapi: refine ssh client to return error code" 2018-01-22 05:19:23 +00:00
Zuul 374a37662b Merge "os-xenapi: Add utility to enable conntrack service" 2018-01-22 05:14:03 +00:00
naichuans 4f14c344f6 os-xenapi: refine ssh client to return error code
Refine ssh client code to return error code instead of exception

Change-Id: I008a7878440fad07bac9696d2006f276e6d0f5f1
2018-01-22 03:16:50 +00:00
naichuans 02e19615ac os-xenapi: Add utility to enable conntrack service
Add utility to enable conntrack service

Change-Id: I8cd77832ed90c1b7c951d36402b52d9a3e9f9d98
2018-01-22 03:14:42 +00:00
Zuul 9bbdd8edeb Merge "Fix compatibility issue when using netifaces" 2018-01-19 10:55:54 +00:00
Jianghua Wang fd35c7dc3e Fix compatibility issue when using netifaces
Force using unicode before pass the string to ipaddress.IPv4Interface().

Change-Id: Idebb198ad2751a77e7399a3809a3951f6c899dee
Closes-Bug: #1743673
2018-01-19 09:14:34 +00:00
naichuans a925260450 os-xenapi: enable linux bridge on dom0
Add script to remove linux bridge black list to  enable linux
bridge on dom0

Change-Id: I831a9eb4703abd2001f0861ecf7db92d31f60aad
2018-01-17 06:58:11 +00:00
Jianghua Wang f88521682e Introduce command: xenapi_bootstrap for kolla deployment.
This commit introduces a command which can be invoked by kolla
playbook to bootstrap XenAPI - xenapi_bootstrap. This command
will invoke some modules's functions to do needed boostrap
tasks. At the moment it includes:
* configure himn
* configure iptalbes to allow traffic
* install xapi plugins to dom0
* gather XenAPI facts and save them into a file
  The facts file will used others e.g. kolla deployment can
  get facts from it and populate relative configures basing
  on the facts.

Change-Id: Ie2d7d40f2755580aac4a10f3d302190a8bd4fe6f
2018-01-09 14:36:05 +00:00
Jianghua Wang ebefaa7d0a Kolla-on-XenServer: Add dom0's ip addresses into xenapi facts
This commit is to add dom0's IPs in the xenapi facts. So that
kolla-ansible can use the proper IP address for vxlan tunnel or
other places when require dom0's IPs.

Change-Id: Iede11b4a529ff1885b588bf01d7ff15dc6185092
2018-01-09 14:36:05 +00:00
Zuul 12065324bc Merge "os-xenapi: Add script for iptable configure" 2018-01-09 14:08:02 +00:00
naichuans 60e43c9046 os-xenapi: Add script for iptable configure
Add a script to do iptable configuration

Change-Id: I0c984bbb1fecebdee6ca9afac238c0c5ba5e5bd8
2018-01-09 09:02:56 +00:00
Jianghua Wang 870e502850 Refactor for get_xenapi_facts
This commit contains the following changes:
1. remove it from cmd; as there is no need to expose this as a
   separate command. Making this as an util which will be invoked
   by xenapi_bootstrap.
2. rename the general function of get_hostname to be get_remote_hostname
   and move it to common_functions.
3. change the keywords for the facts items to make it more clear.

Change-Id: Ie786b3085c29f9a1faf2c51a1a704ded1010af7b
2018-01-05 09:22:13 +00:00
Zuul e961b45553 Merge "os-xenapi: add unit test for himn utils" 2018-01-04 07:29:47 +00:00
Jianghua Wang aa48f8223a Adding utils to install XAPI plugins to dom0
When deploy OpenStack on XenServer, we need install some XAPI
plugins to dom0. This commit is to add utils for this purpose.
If the os-xenapi version is different from the os-xenapi which
contains the utils. Users can specify the version to the utils.
So that the utils will download the right version of os-xenapi
and copy plugins from there. Otherwise the utils will by default
copy plugins from current installed packages.

Change-Id: I269a444b952f63fd73b3825b23dc95d6e825ce8f
2018-01-03 09:23:02 +00:00
naichuans 6059e681f6 os-xenapi: add unit test for himn utils
Add unit test for himn utils

Change-Id: I5154b5ed3346f8c5d81e117ad09351be4fd7e9ff
2018-01-03 09:00:27 +00:00