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>
This is being done to allow unit tests to remain unchanged when
the release version changes. Without this change, the
controllerconfig unit tests were verifying hardcoded release
numbers which changed each release.
Story: 2003360
Task: 26214
Change-Id: Ic5411ac4e9c7be9de329fa99dd438aeba1914fbd
Signed-off-by: Bart Wensley <barton.wensley@windriver.com>
Use flake8 to replace pep8 because pep8 is invalid from the log.
enable pep8/flake8 voting and suppress flake8 Errors(fix later)
Story: 2003429
Task: 24623
Change-Id: I79e9def77dc0c8ce74403d4ba846b35ae5aa487b
Signed-off-by: chenyan <yan.chen@intel.com>
Signed-off-by: Sun Austin <austin.sun@intel.com>
For Python 3.0, "oldoctinteger" isn't supported already, and an exception
will be raised if a literal has a leading "0" and a second character
which is a digit.
Change-Id: I1cb8abda9a59fb68b066cddcc4cb394fa56060aa
Story: 2003433
Task: 25734
Signed-off-by: zhangyangyang <zhangyangyang@unionpay.com>
This reverts commit 2d1e3b7981.
This update causes an import failure for the sw-patch CLI command,
as the "builtins" module is not currently part of the load.
Change-Id: I9f71f001dd36ccd769b888fbf45cba105e7bcde2
Closes-bug: 1790166
This update adds pylint to tox and zuul for stx-updates and resolves
most warnings and errors, with some disabled for future resolution.
Change-Id: Ic853202e4793bf89d687b50cbd740d364db85189
Story: 2003371
Task: 24832
Signed-off-by: Don Penney <don.penney@windriver.com>
The patch_build script fails as the paths for release-info.inc and
patch_build are incorrect.
With commit d566e09 (Story 2002801) the patch scripts were relocated
from stx-utils to stx-update. Various paths in the scripts were not
updated to reflect their new locations.
This change corrects those paths.
Change-Id: I6ebe57476f01d6ae68312bf98e8a706047d4a695
Signed-off-by: David Sullivan <david.sullivan@windriver.com>
Story: 2003449
Task: 24652
Currently compiling a new package and adding it
to the iso still requires a multi-git update because
image.inc is a single centralized file in the root git.
It would be better to allow a single git update to add
a package. Too allow this, image.inc must be split across
the git repos and the build tools must be changed to
read/merge those files to arrive at the final package list.
Current scheme is to name the image.inc files using this
schema.
${distro}_${build_target}_image_${build_type}.inc
distro = centos, ...
build_target = iso, guest ...
build_type = std, rt ...
Traditionally build_type=std is omitted from config files,
so we instread use ${distro}_${build_target}_image.inc.
Change-Id: Id4f26d020f06d3b44509a90f9cb84b7daccbd87f
Story: 2003447
Task: 24649
Depends-On: Ib39b8063e7759842ba15330c68503bfe2dea6e20
Signed-off-by: Scott Little <scott.little@windriver.com>
This update cleans up the initial tox.ini file to purge unnecessary
dependencies, add the --no-run-if-empty argument to xargs commands,
and broadens the bashate check to cover all subdirectories in case
new shell scripts are added elsewhere.
Change-Id: Ib1ecfcee426a2975903f6e61d64b1a650a5d5aa1
Story: 2003371
Task: 24531
Signed-off-by: Don Penney <don.penney@windriver.com>
This update addresses existing bashate and pep8 warnings in
cgcs-patch, patch-alarm, and tsconfig. The bulk of these updates
are style and spacing changes, such as whitespace style conventions.
Story: 2003371
Task: 24433
Change-Id: I44b26d24788907bac0730a952d70ed4bafb87d90
Signed-off-by: Don Penney <don.penney@windriver.com>
A Day One bug in the patching apply/remove semantic checks around the
required patches means the specified list of patches can be truncated
in certain scenarios. A local variable used in a for-loop iteration
has the same name as another local variable in a slightly broader scope,
causing the broader scoped variable to be overwritten in certain
scenarios.
The APIs have semantics that are intended to do the following checks:
- From every patch in the arg list, build up a list of required patches.
- if a required patch is in the arg list, it doesn't get added to the
"required patches" dict, since it's being operated on
- Loop over the required patches dict, checking the states
- This is where the bug exists, as the loop inadvertently overwrites
the patch list
So the following scenarios will work fine and not have an issue:
- No patches are applied on the system, all patches being applied in one
command. The required patches dict is empty, because all patches are
in the argument list, so the patch list does not get corrupted.
- Patches are applied one by one on the system. The patch list gets
overwritten, but it's overwritten with the same single patch.
The following scenario runs into problems:
- Some patches applied on the system. Two or more patches, at least one
of which has dependencies, and dependency lists are not complete lists
of all previous patches. The patch list is corrupted with a partial
list of patches, and not all specified patches end up getting applied.
Story: 2002859
Task: 22808
Change-Id: I09ce3af9ede39f163a3ddd1fc64fc154716d1d60
Signed-off-by: Don Penney <don.penney@windriver.com>
Signed-off-by: Jack Ding <jack.ding@windriver.com>
Add the basics for testing, non-voting jobs until the cleanups merge
Change-Id: I2f57c37335b5625eb1d124e276fbb98d94714d4d
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
Part of the project to remove cgcs references.
Replace and shorten the path the needlessly long and
complex "addons/wr-cgcs/layers/cgcs" path with just "stx".
This update just fixes up paths found in scripts, comments
and config files.
Depends-On: https://review.openstack.org/579954
Depends-On: https://review.openstack.org/579957
Depends-On: https://review.openstack.org/580170
Change-Id: I1c8f022bcf3e7eaca88c19c902484ef79811a07b
Signed-off-by: Scott Little <scott.little@windriver.com>
Implements customer configuration of kernel options to control
spectre/meltdown related kernel options. Default (with "nopti
nospectre_v2" options) can be changed to "" using
system modify -S spectre_meltdown_all
Change-Id: I6e86cfca126a1864ab27989e7027ae990716a29d
Signed-off-by: Jack Ding <jack.ding@windriver.com>
This update introduces a non-reboot patch example script for a service
whose patch modified its service file thereby requiring a system
daemon-reload as a precursor to the service process restart.
This new RPM was introduced in support of no-reboot patching of the
'influxdb' and 'collectd' processes ; so those are the default processes
used in this script.
Note that there is nothing that prevents a designer from using this as a
more general example script for any service that requires the same
patching operations after replacing the default process names with their
own.
Change-Id: I9f261509f16490f986722b47b0f92db4ef735609
Signed-off-by: Jack Ding <jack.ding@windriver.com>
patch-scripts/EXAMPLE_SERVICE directory does not exist, remove
from centos_pkg_dirs list.
Change-Id: I2f3690c68f5f73bd6f4fdc9ef47f193e995535b0
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
Problem: modify_patch.sh was signature unaware.
When it was used to promote a patch to 'rel' status,
it would be re-assembled with a 'dev' signing key,
regardless of which key was used to sign the original
patch.
Solution: Make modify_patch.sh aware of signatures,
and force it to try and use the same signature as was
already in use. This may require it to submit the patch
to the signing server. If signing failes, the overall
patch modification will fail.
Change-Id: I5319062b910259f4eaff3df1504216f09536c84e
Signed-off-by: Scott Little <scott.little@windriver.com>
Problem:
The centos-pkg-dirs files should only reference packages with
compilation instructions hosted in the same git.
Solution:
Create centos-pkg-dirs files in other stx-* gits, and relocate
the relevant entries from the stx-utils centos-pkg-dirs into
the appropriate destination git.
Change-Id: I451ba2fd3fbd5914b65ba1f679ad366a9ae1e445
Signed-off-by: Scott Little <scott.little@windriver.com>