This reverts commit 4146e2a859.
Removed the calls to tox from within tox, and setup the
top level tox.ini for bandit and flake8 for the sub folders.
Change-Id: I682869c8e839f4f59cdce48cd0b97b4a4324f4a7
Story: 2004515
Task: 40232
Signed-off-by: albailey <Al.Bailey@windriver.com>
The py3-bandit and py3-flake8 zuul jobs are failing due to a tox
environmental issue that will need to be resolved. This update
disables those jobs until the issue can be fixed.
Change-Id: I02bfacf5ca4def1d0f9997b317bbbe053cbb82f9
Signed-off-by: Don Penney <don.penney@windriver.com>
This update revises the cgcs-patch and patch-alarm package builds to
drop the old and unneeded custom build_srpm script, in order to use
the PKG_GITREVCOUNT feature for package versions.
Change-Id: If541f55340565cf73213aeac511e69487e53fa11
Story: 2006166
Task: 40137
Signed-off-by: Don Penney <don.penney@windriver.com>
When the patch-agent is notified by the patch-controller of a new
patching operation (patch_op_counter in HELLO is incremented), it will
run a new software query consisting first of running "dnf makecache",
then checking the software repositories for changes. In rare cases,
the metadata returned to dnf when it makes the query could be stale,
resulting in the patch-agent believing the current software is
up-to-date.
In order to protect against this, the patch-agent will now verify the
repository revision id for the updates repo. If the revision id has
not changed when it is reasonable to expect it could have (ie. the
patch_op_counter has increased, indicating the repository may have
been updated), the patch-agent will retry once to allow for any
potential caching to have cleared.
Change-Id: I3a44ed86e16cd9fe67f0b0e763c95a5a7e126cf8
Closes-Bug: 1884094
Signed-off-by: Don Penney <don.penney@windriver.com>
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems
Update Sphinx version as well.
Disable openstackdocs_auto_name to use 'project' variable as name.
Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.
openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.
See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html
Change-Id: Idcf44f0980a298bd4d63e10c178b72372a449839
1. Rename TIS to StarlingX for .service file
Test:
After the de-brand change, bootimage.iso has been built in the flock
Layer and installed on the dev machine to validate the changes.
Please note, doing de-brand changes in batches, this is batch12 changes.
Story: 2006387
Task: 39650
Change-Id: I3a4836563836246f90e195bd3f5212af73420fbe
Signed-off-by: Sharath Kumar K <sharath.kumar@intel.com>
Updating scripts used to build k8s upgrade patches to handle
current kubernetes version (1.18.1). My previous commit
missed changes to the preapply/preremove scripts.
Change-Id: I70b2796f625ac79df1de08e4e802d70e3e33d36a
Story: 2006781
Task: 38479
Signed-off-by: Bart Wensley <barton.wensley@windriver.com>
Updating scripts used to build k8s upgrade patches to include
additional required package (playbookconfig) and to handle
current kubernetes version (1.18.1).
Change-Id: I768466098842fa8d489bf91318ef2c29963ef446
Story: 2006781
Task: 38479
Signed-off-by: Bart Wensley <barton.wensley@windriver.com>
1. Rename Titanium Cloud to StarlingX for .spec files
Test:
After the de-brand change, bootimage.iso has built in the flock layer
and installed on the dev machine to validate the changes.
Please note, doing de-brand changes in batches, this is batch8 changes.
Story: 2006387
Task: 39273
Change-Id: I214acdb6e4b99c484c07dcca24b4c9861624be7f
Signed-off-by: Sharath Kumar K <sharath.kumar@intel.com>
This commit replaces the use of "repoquery" in the
upgrade-start-pkg-extract utility with "dnf repoquery".
Story: 2007403
Task: 39059
Change-Id: I8bc86af11cc7adc85b6d5d30f3a7368581c7988c
Signed-off-by: Carmen Rata <carmen.rata@windriver.com>
This update adds the setup_patch_repo.sh script to starlingx/update
for use by the patch-iso utility. This file was missed from initial
seeding of StarlingX.
Change-Id: I48b7caa2a41347ada6185e8d262d3b3d330dd37e
Partial-Bug: 1863011
Signed-off-by: Don Penney <don.penney@windriver.com>
To prevent the warning about a newer version of pip
available, the following env setting was added
PIP_DISABLE_PIP_VERSION_CHECK=1
To prevent sub-calls to tox from using the default pip
cache location, rather than whatever a user may override
using xdg env variables, the following has been added:
passenv =
XDG_CACHE_HOME
The python patch scripts are now validated by flake8.
All flake8 tox targets are triggered from a single zuul job.
Story: 2004515
Task: 38581
Change-Id: I105512edbd3da15480355e30c0dd14933584a47b
Signed-off-by: albailey <Al.Bailey@windriver.com>
Provide a make_kube_patch.sh script that will build patches
that can be used to upgrade kubernetes. Also includes sample
preapply/preremove scripts that will be included in the
patches.
Change-Id: Ifab05e9d407d9a7c3d8c519c90add1b3857ecdf2
Story: 2006781
Task: 38479
Signed-off-by: Bart Wensley <barton.wensley@windriver.com>
- Use updated project name in titles/text
- Correct text for link to Storyboard (docs)
- Correct capitalization in section headings
- Correct formatting for section headings
- Update project name in link to release notes, api-ref
- Update project name in config for docs/releasenotes/api-ref
Story:2007193
Task:38341
Change-Id: I4369fef2a401810ff9cc9a443a3f0572fc327174
Signed-off-by: Kristal Dale <kristal.dale@intel.com>
This commit adds flake8-bugbear to the patching tox test in order to
identify potential py3 issues and address them now.
Change-Id: I2219e61eff16cc69afa50d554e9f1dd0bb2f1517
Story: 2007050
Task: 38146
Signed-off-by: Don Penney <don.penney@windriver.com>
As smartpm is no longer used, this commit removes the remaining
comment reference from the patching code, and deletes the unused
smart-helper files.
Change-Id: Iac557403e43c1e732eb38393bb2cfeb6fc6c3573
Story: 2006227
Task: 38136
Signed-off-by: Don Penney <don.penney@windriver.com>
As the smart package manager is not supported under python3, we're
migrating the patch-agent to use the python2 DNF libraries in
preparation for CentOS 8. This impacts how the patch-agent queries the
repos and manages installed software, but is done without changing how
the patch-agent and patch-controller exchange information, to ensure
we don't impact cross-version communication in an upgrade scenario.
Depends-On: https://review.opendev.org/700960
Change-Id: I00729a487c24ba5c182a9a2a48e2024be9260978
Story: 2006227
Task: 37932
Signed-off-by: Don Penney <don.penney@windriver.com>
The rpmUtils.miscutils.stringToVersion function will not be available
in CentOS8, as it is not currently provided for python3. A similar
function exists in cgcs_patch.patch_functions, using regex to parse
the version from an RPM filename. This update adds a new function,
expand_pkgver, implemented in a similar fashion using regex, providing
the same capability as rpmUtils.miscutils.stringToVersion.
Change-Id: I2a04f3dbf85d62c87ca1afcf988b672aafceb642
Story: 2006228
Task: 37871
Signed-off-by: Don Penney <don.penney@windriver.com>
A newer version of hacking was released which enables additional
checks and is breaking flake8 and zuul.
Hacking has now been clamped at 2.0.0 in test-requirements.txt
Added the same for patch-alarm, although it was not failing.
The new checks that are fixed are:
H106: Don't put vim configuration in source files
W605 invalid escape sequence
F632 use ==/!= to compare str, bytes, and int literals
F841 local variable is assigned to but never used
The following flake8 extension check has been removed:
H904 Delay string interpolations at logging calls
Closes-Bug: 1856585
Change-Id: I8bdc94539f4a6ce243c4e30efc07eed3bad1ce62
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit addresses issues detected by the updated python3 pylint:
- Added a return code to the report_app_dependencies function to
satisfy the E1111 error reported.
- Added line-specific pylint disable for unused-argument for cases
where the inclusion of such arguments in the function signature was
intentional.
- Added line-specific pylint disable for the duplicate-except case
found, as python3 has merged IOError into OSError, while these are
separate exceptions in python2. Once we're running solely on python3,
this duplicate exception handling can be dropped.
Change-Id: I96a521288e71948f06ad0c88a12c8f475ed8bc99
Closes-Bug: 1855180
Signed-off-by: Don Penney <don.penney@windriver.com>
This also adds cgcs_make_patch folder for pylint
pylint is invoked with two different pylint.rc files
so that different codes can be suppressed for the
two different code structures.
Change-Id: I0d7a87ed435ed716a3c1ea98f5d7badfd2adac7d
Story: 2004515
Task: 37701
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
Bandit gate jobs are used by openstack for security checks.
Adding a zuul job so that any new bandit failures
will be caught.
patch-alarm runs cleanly and does not currently suppress any
bandit checks.
cgcs-patch suppresses several bandit checks which may be
updated and enabled by future commits.
Change-Id: I01414c48266cfb3cb6df9ef400a350a570938189
Story: 2004515
Task: 37697
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This update includes the following:
- Ensure the sw-patch init script does nothing on AIO-SX before
initial configuration is complete. This protects against misleading
alarms indicating patch installation failure, stemming from
pre-configuration networking issues.
- Enhance install-local support to allow for patch installation after
ansible bootstrap playbook is applied, but before system configuration
has been completed.
Change-Id: Id7a5b4f120449fd3f6e71c83167586dc66e8a91e
Closes-Bug: 1847872
Depends-On: https://review.opendev.org/696410
Signed-off-by: Don Penney <don.penney@windriver.com>
Adding a new patch API to determine if a patch (or list of patches)
is in the available state. This is necessary to support
kubernetes upgrades, which will require certain patches to be
available before a kubernetes upgrade is started.
Change-Id: I13de8385c59dd15550cee646b3ed9b90d2a7e379
Story: 2006590
Task: 37370
Signed-off-by: Bart Wensley <barton.wensley@windriver.com>
devstack is failing, most likely because StarlingX
uses postgres, and postgres was dropped in devstack by:
cf1c847191
I am not removing the devstack job declaration, or the devstack files
because in the future StarlingX could convert from postgres to
another DB backend, at which point we might want to revisit
using devstack.
Change-Id: Iaac99f28b24609764e7c0cf4750122d765b13420
Partial-Bug: 1848557
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit introduces a new patch metadata tag to indicate that the
patch cannot be applied in an upgrade, that it can only be applied
when the running release matches the patch.
Story: 2006590
Task: 36890
Change-Id: I1b64e254e12c54695ca3691cfb7e446866089707
Signed-off-by: Don Penney <don.penney@windriver.com>
This update introduces support for pre-apply and pre-remove semantic
checks. These allow for the inclusion of tests prior to applying or
removing specific patches. These tests must not make any system
changes. They can only perform queries, and only run on the controller
handling the apply/remove (which could be either controller).
Included in this update:
- Skip the semantic check if initial configuration has not yet been
applied on the controller.
- Pass a list of patches and their states to the semantic check as
arguments, allowing the semantic check to look for states of specific
patches if need be. The semantic check must not run any patch queries,
as the query would not be handled until the apply/remove operation
completes.
Story: 2006590
Task: 36889
Change-Id: Ia670e16768dc757bd3f70774348770af6e492ebe
Signed-off-by: Don Penney <don.penney@windriver.com>
A recent update to sysinv added a new import:
https://review.opendev.org/#/c/679457/7/sysinv/sysinv/sysinv/sysinv/common/utils.py
This file is imported in cgcs-patch and caused a tox failure
because it could not be found. This commit updates the tox.ini and
.zuul.yaml files to allow for installation of fm-api.
Change-Id: I12d605d2782f7f32add4428507645cc31caadea2
Closes-Bug: 1846244
Signed-off-by: Don Penney <don.penney@windriver.com>
Release-info.inc has moved from repo 'integ' to 'utilities'.
Story: 2006166
Task: 35687
Change-Id: Ia69a36c80cff201240836e95b20073d2434d848a
Signed-off-by: Scott Little <scott.little@windriver.com>
Story: 2006166
Task: 35687
Depends-On: I6c62895f8dda5b8dc4ff56680c73c49f3f3d7935
Depends-On: I665dc7fabbfffc798ad57843eb74dca16e7647a3
Change-Id: I70b6d52a13836e16139a0ca3f42b9e91e06e43b6
Signed-off-by: Scott Little <scott.little@windriver.com>
Depends-On: I5618547e7e74b76d174f10897b1c747931738cd6
Signed-off-by: Scott Little <scott.little@windriver.com>
Use templates instead of individual jobs so that these
can be changed in one place.
Depends-On: https://review.opendev.org/677606
Change-Id: Ia769757efc3b2c9c09558e6696adfe9556bfba3c
Depends-On: Ibe6121c430eccf84698be67d587ebc7ac7c40755
Change-Id: I9325f57a85bcea7274dfb7ab41898b5c48d294a3
Signed-off-by: Scott Little <scott.little@windriver.com>
The filesystem /opt/cgcs is removed and its content moved under
/opt/platform.
Tested in AIO-SX, AIO-DX and Standard hardware labs.
Depends-On: https://review.opendev.org/674360
Partial-Bug: 1830142
Change-Id: I96392f293883d5583e51abfca8cac8e4c3d187a1
Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>
Flake8 currently ignores:
F841: local variable is assigned to but never used
Pylint currently ignores:
W0612: Unused variable warning
Enable them for more thorough testing of code
Change-Id: I4c55186f939675cc2c3dc871ad03699d95c6091b
Story: 2004515
Task: 29303
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
The Smart Package Manager (python-smartpm) is used by cgcs-patch
at runtime, but is not included in the package dependencies.
This update adds it to the spec as a Requires.
Change-Id: I3e9569e5845b3f5c6259887d423b2b9ec912e15e
Closes-Bug: 1836214
Signed-off-by: Don Penney <don.penney@windriver.com>