The upstream OpenStack default node type changed yesterday
from Ubuntu Xenial to Bionic. We have a number of jobs pegged
directly to py35 which is no longer available in Bionic.
We can either pin the py35 jobs to Xenial nodes or update them
to py36 or py37. OpenStack is supporting both of those for the
Stein release, since StarlingX does not have any position on
Python 3 versions (yet!) I am suggesting we move straight to py37
and in the case of issues now make these jobs non-voting until
any incompatibilities are resolved.
Change-Id: I99b6fdb4fe319e51fc5bf0a2d33e67c57bfec01f
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
The sw-patch init script is called by the 'sw-patch install-local'
command with a restart option to trigger the patch-agent to
install patches, as there is no communications between the
patch-agent and patch-controller at this point. However, the
init script was not checking for failures reported by the
patch-agent when it tries to install patches.
In the case of #1819496, the lighttpd server was not running,
due to a temporary config change at the time. As a result, the
patch-agent was unable to communicate with the patching repo,
and failed to install the patch. Because the init script was
not checking for failures, the failure went unreported to the user.
This update adds checks to the sw-patch init script, in order
to report the failure back to the user.
Change-Id: Id8d69bef3a5c6c2f81d56f4b26752d084f9a7ff2
Closes-Bug: 1819496
Signed-off-by: Don Penney <don.penney@windriver.com>
The wsgiref.simple_server is used by patching for handling
API requests. When uploading files, the server opens a file
handle for the temporary resource, but does not close it.
Instead, it's left to periodic garbage collection to free the
resources. Until garbage collection, however, this means
disk space is still in use for the deleted temporary file,
as the handle is left open.
This update adds a call to gc.collect() after the call
to simple_server.handle_request() to immediately free all
unused resources.
Change-Id: Ie39213dad540448cede46cc8e580d31582419dcc
Closes-Bug: 1797977
Signed-off-by: Don Penney <don.penney@windriver.com>
Put everything in /usr/local and allow that to be overridden to
a user-writable dir and not require sudo.
Also set the stx-devstack-update job voting, at this time it only runs
on devstack/* changes.
Change-Id: If68ff63585690c7f6c17174797723fb6d43d4473
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
Use network-online.target rather than network.target for
patching services dependencies. This is to ensure that
all interfaces, such as LAG for example, are up before
the patch services attempt any communications to esnure
there are no unrecoverable disruptions.
Change-Id: I7a20e6faaa6c9fffee0636cc5cb474b98dc88253
Closes-Bug: 1798093
Signed-off-by: Don Penney <don.penney@windriver.com>
Adding simple unit tests to tsconfig.
- test the behaviour when build.info is not present
- test the behaviour when platform.conf is not present
- test the behaviour when both files are found
This works in py27 and py35.
Coverage for tsconfig is 100%
Added requirements.txt and test-requirements.txt
Added a setup.cfg file so that the wheel can be
built in universal mode (python 2 and 3)
Properly set some of the setup.cfg variables.
These unit tests are wired into zuul.
Story: 2004515
Task: 29783
Change-Id: Ifb4f5403592ccc9223659bb188055ffeccc113b5
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This makes some cleanup changes to the DevStack plugin for the
change to master and bionic.
* Define values for precedence handling by the upstream devstack playbook
* Add STX_INST_DIR for a deterministic install location
* Update the linters job in tox.ini to correctly include the devstack plugin
Change-Id: Ida3a6c07d49510a6ec0276e83a3f966b826de26e
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
Added API reference manual to the api-ref/source dir for stx-update.
This represents the converted old-style files to the newer
OpenStack supported RST files.
This change was introduced and abandoned:
https://review.openstack.org/#/c/605278/
Reason was a confussion during the split of the old API into the new
API scheme.
Change-Id: Ic64509c2fd51a659f156e6cbc847e160d4c339e3
Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
This unsuppresses the flake8 check
H301 more than one import per line
This has no functional change.
It just enables the check and fixes the imports
Story: 2004515
Task: 29377
Change-Id: I15e13703949c5dfe27ff6f68be5dfcf467ffbe80
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
Update conf.py for release notes to include the project
variable, set to the project name. This is so the string
above the left nav renders the project name.
Story: 2004900
Task: 29232
Change-Id: I2c60b94b61884a1f366b57d197b69dcee38761ef
Signed-off-by: Kristal Dale <kristal.dale@intel.com>
Baseline changes to comply with OpenStack API documentation
from OpenStack Documentation Contributor Guide [0]:
- [1] How to document your OpenStack API service
This change was introduced and then reverted due to this abandoned
commit:
https://review.openstack.org/#/c/605278/
Reason was a confussion during the split of old API into the new
API scheme.
[0] https://docs.openstack.org/doc-contrib-guide
[1] https://docs.openstack.org/doc-contrib-guide/api-guides.html
Story: 2002712
Task: 26659
Change-Id: Id78d51a67bb155180bfc55908b7cc3ceb503eac7
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
By setting 'hacking' as the dependency, flake8
will include hacking and other checks.
This is the same set used by other openstack
components.
This commit suppresses any of those new checks that
would fail.
H101 Use TODO(NAME)
H102 Apache 2.0 license header not found
H105 Don't use author tags
H237 module posixfile is removed in Python 3
H238 old style class declaration
H301 one import per line
H306 imports not in alphabetical order
H401 docstring should not start with a space
H404 multi line docstring should start without a leading new line
H405 multi line docstring summary not separated with an empty line
It also sets the max line length to be very large.
At a later time, additional commits will fix and un-suppress them.
Story: 2004515
Task: 29303
Change-Id: Id572d5c0ecab1854ca881e34b95459ef563be0f2
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
Add http_port to tsconfig and update patch URL
Story: 2004642
Task: 29263
Depends-On: https://review.openstack.org/#/c/634237/
Change-Id: Ic34a66ae90d345b16922fa6031631dfb04f67afa
Signed-off-by: Tao Liu <tao.liu@windriver.com>
Add INITIAL_CONFIG_COMPLETE_FLAG to tsconfig. This is used by the
affine-tasks script in worker-utils.
Change-Id: I07cc212a3535c7f3715fe381747cfda1140bde90
Story: 2002843
Task: 29125
Signed-off-by: David Sullivan <david.sullivan@windriver.com>
This update adds the new Link Monitor 'lmond' process to the
list of processes in the EXAMPLE_MTCE patching rpm so that
when maintenance is patched lmond will be restarted like all
the other mtce processes.
Change-Id: I717aaab99ad058a5b77a555768201d7cf471b579
Story: 2002823
Task: 28635
Depends-On: https://review.openstack.org/#/c/633264
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
Replace patch compute references to to worker.
Replace the compute configuration flags in tsconfig.
Tests Performed:
Non-containerized deployment
AIO-SX: Sanity and Nightly automated test suite
AIO-DX: Sanity and Nightly automated test suite
2+2 System: Sanity and Nightly automated test suite
2+2 System: Horizon Patch Orchestration
Kubernetes deployment:
AIO-SX: Create, delete, reboot and rebuild instances
2+2+2 System: worker nodes are unlock enable and no alarms
patch_build.sh with the following options:
'--worker', '--worker-lowlatency",
'--controller-worker'
'--controller-worker-lowlatency'
Story: 2004022
Task: 27013
Depends-On: https://review.openstack.org/#/c/624452/
Change-Id: If6f7bb6a73db54203941a9657f9152453d270e86
Signed-off-by: Tao Liu <tao.liu@windriver.com>
This is just enough DevStack to test the plugin.
Depends-On: https://review.openstack.org/613973
Change-Id: I6e34c3c2e400235259cd13cdc7b45ea4baccd4bc
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
A prior update config for python2/3 compatibility resulted
in config values being set as unicode rather than strings. This
ended up breaking patching on IPv6 systems, as the lib,
if_nametoindex function used by patching in configuration of its
multicast addresses does not properly handle unicode.
As a result, the patching daemons were unable to communicate with
each other.
This update to tsconfig/config casts the values as str() to
restore it to the previous behaviour.
Closes-Bug:1800195
Change-Id: Ie7ac29728e81d2e5fcb80cde34d723c1480566d0
Signed-off-by: Sun Austin <austin.sun@intel.com>
This is empty and is being removed from the docs.starlingx.io
api-ref landing page. The review to add content here [0] was
abandoned, this is cleaning up the empty directory.
[0] https://review.openstack.org/#/c/605278/
Change-Id: I35a88672e2c8ef0bc37eb46eba37cd3fbd104a08
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
This update adds hooks to the spec files for the following packages
to generate wheels for the python modules:
- cgcs-patch
- patch-alarm
- requests-toolbelt
- tsconfig
Change-Id: Ibdae0a338a1af493ac522757b61bbd6df1da941e
Story: 2003907
Task: 27529
Signed-off-by: Don Penney <don.penney@windriver.com>
The new flake8 version 3.6.0 introduces new warnings that cause
the check and gate jobs to fail. Locking down the flake8 version
to avoid these surprises in the future. We can later increment
the flake8 version and fix the new warnings in a controlled
manner.
Change-Id: I86c81746f8f8f2fcf5211335f8c42b0c03fcca9e
Partial-Bug: 1799721
Signed-off-by: Bart Wensley <barton.wensley@windriver.com>
* Add pointers in the main doc to api-ref and releasenotes pages
* Add publish-stx-api-ref and publish-stx-releasenotes jobs
* Add search at bottom of api-ref and relnotes pages to trigger the jobs
* Change the default themes to alabaster
Change-Id: Ied2bb5738cb04c539995850810064b03ca937862
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: I798f7f0a99da5ee8ae848049dcd08a36b495bb62
Also set the theme to alabaster until starlingxdocs is ready
Change-Id: I5cc9b7203c5a28057783315da100b3caabf67e19
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
Baseline changes to comply with Release Notes Management
based in Reno [0]:
* Use build-openstack-releasenotes job for release notes
(We can't use the OpenStack releasenotes template as it includes
publish jobs, stx needs its own)
* Add newnote tox environment as convenience for creating new release
notes, re-using the releasenotes venv.
* Remove the unused 'true' tox environment.
[0] https://docs.openstack.org/reno/latest/
Story: 2003101
Task: 26658
Change-Id: I0bce008d3c26859ba7ca72aeec664ed417e22ea1
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
Fix below errors
E128 continuation line under-indented for visual indent
E305 expected 2 blank lines after class or function definition, found 1
E502 the backslash is redundant between brackets
E722 do not use bare except'
E741 ambiguous variable name 'xxxxx'
E999 SyntaxError: invalid token
Change-Id: Ic826a70aed2cda984cbafedae154c4812bfa37b5
Story: 2003429
Task: 24624
Signed-off-by: Sun Austin <austin.sun@intel.com>
Use io.StringIO to replace StringIO.StringIO, and use unicode as StringIO()
can only handle unicode strings.
Story: 2003429
Task: 24618
Change-Id: Ie2ced7bba00d11b1698422cbe495abc0fbab7637
Signed-off-by: chenyan <yan.chen@intel.com>
Signed-off-by: Sun Austin <austin.sun@intel.com>