Update the centos_stable_wheels.inc to remove the patch-alarm
and requests-toolbar wheels, as they are not required for the
image build.
Depends-On: I6852620b05f58509c93877d9d8c5754e9aa64c0e
Change-Id: I7f5c84aea7b32cb4fcebfa60297e48a18b8f87ef
Story: 2005248
Task: 30372
Signed-off-by: Don Penney <don.penney@windriver.com>
This update introduces support for application dependencies on
specified software patches. This allows sysinv to query patch states
and to report application dependencies, to block removal of required
patches.
APIs introduced:
is_applied: Provide a list of patch IDs. Returns True if ALL patches
are in Applied (fully applied/installed) state, False if any are
not.
report_app_dependencies: Provide an app name-version string and list
of patches.
* Apps are dropped by reporting app name with no patch list / empty
list.
* Triggers sync with patch-controller neighbour (ie. standby
controller)
query_app_dependencies: Query for dict of app => patch list, for all
reported apps.
On patch removal, the patch-controller checks to see if the patch
being removed is required by any applications. Reject the removal,
if so.
* Provide backdoor --skipappcheck option to skip this dependency
check.
Change-Id: I6b0dcf3c88312677a95c7eb860cb3b30779554d0
Story: 2005248
Task: 30318
Signed-off-by: Don Penney <don.penney@windriver.com>
There were several example patch templates that demonstrated
how to patch some of the openstack processes.
Most of those openstack processes have been removed from bare
metal, so these scripts have been updated or removed.
Story: 2004764
Task: 30343
Change-Id: Ie6339d9f2dbf12e7d1a2b689676cca866b844a83
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This update removes pike and master wheel and/or image files,
as these have been replaced with stable/dev.
Change-Id: I3423e2f6a1d247fb1ebe3226c11ac6c0ed1a066f
Story: 2005248
Task: 30327
Signed-off-by: Don Penney <don.penney@windriver.com>
This update supports the migration to stable/dev build streams by
setting up the stable wheels.inc file.
Depends-On: Ib5dc9a7c1d8c37368d073e28d83eeb883766ee3f
Change-Id: I76f107bd58a6eee716aca69a1c03716b4f491df5
Story: 2005248
Task: 30150
Signed-off-by: Don Penney <don.penney@windriver.com>
Rename stx-devstack-update to flock-devstack-update
and inherit from flock-devstack-base-min
Story: 2005285
Depends-on: https://review.openstack.org/#/c/645808/
Change-Id: I2c4bd243636dd3a469de3bbda7cd42aff333798a
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
All rmon resource monitoring has been moved to collectd.
This update removes rmon from mtce and the load.
Story: 2002823
Task: 30045
Test Plan:
PASS: Build and install a standard system.
PASS: Inspect mtce rpm list
PASS: Inspect logs
PASS: Check pmon.d
Depends-On: https://review.openstack.org/#/c/643739
Change-Id: I1cee4a534171b3c5fa93f3cbc04beaeaf744d161
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
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>
If a user attempts to generate a patch without specifying
any packages, raise an exception to avoid malformed patches.
Additionally, very small files (like a patch with no packages)
appear to be handled differently by the API handler, passing
a cStringIO object for small files and a file object for files
that are about 1K or larger. For robustness, the upload
handler is updated to do a hasattr('fileno') check in order
to protect against an unhandled exception for small files.
Change-Id: Ie1e730a183a27850ba8567f31aea603459b59d45
Closes-Bug: 1803022
Signed-off-by: Don Penney <don.penney@windriver.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>