This commit is to raise the deploy state out of sync alarm
when the deploy state in the software.json files in both controllers
are different.
The deploy state is checked every 30 seconds during the
deploying stage. If they are insync, the alarm will be cleared.
Depends-on: https://review.opendev.org/c/starlingx/fault/+/913581
Test Plan:
PASS: the alarm is raised when the state is out of sync
in both DX and SX
PASS: the alarm is cleared when the state is in sync in
both DX and SX
Task: 49737
Story: 2010676
Change-Id: Ic31c7166135d03591fa4696445783895254dfc95
Signed-off-by: junfeng-li <junfeng.li@windriver.com>
Current Status:
- CLI commands
- API endpoints
- controller process
- agent process
- Logging
Test Plan:
PASS: Build and Install ISO
PASS: software-agent and software-controller
services are active post unlock
PASS: tox
Story: 2010676
Task: 47817
Signed-off-by: Jessica Castelino <jessica.castelino@windriver.com>
Change-Id: I394780ce40fee398c4eacb3aacb575a03ff93332
- Removed the old python2 entries
- Replaced mock with unittest.mock
- Unsuppressed most flake8 and pylint checks
- Added the startup script to flake8 checking and fixed
a python3 syntax issue in the error handling.
- Regenerated an updated / modern pylint.rc
- Updated the upper-constraints to be Debian and python3
Test Plan:
Pass: Build / Install / Unlock
Pass: trigger a patch alarm
Story: 2010642
Task: 47815
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: Id8c612a677253dfc53931719af7823572d1536ef
This reverts commit 3e920a1641.
Reason for revert: It looks like after a post zuul job merges, the change is not used by its first invocation. The original code should work.
Change-Id: Ieab56ef652b69ab47f9de6055c5e71520ea67375
Updating the rsa ssh host key based on:
https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/
Note: In the future, StarlingX should have a zuul job and
secret setup for all repos so we do not need to do this
for every repo.
Needed to rename the secret
Partial-Bug: #2015246
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I2b98d3500eac816e72fd5e513763d7633ddc51f3
Current Status:
- minimal debian packaging
- python skeleton
- tox
- zuul integration
- pecan API skeleton
- unit tests
Next Steps:
- CLI commands
- API endpoints
- controller
- agent
- expanded packaging
Test Plan:
PASS: Build and Install ISO
PASS: tox
PASS: 'software' is in the PATH and can be invoked.
PASS: wget http://127.0.0.1:5490 returns 204 when
software-api is running
Story: 2010676
Task: 47754
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I8e2d993ac85dcff7bb970ddf05fd63db9f2abe11
This change will allow this repo to pass zuul now
that this has merged:
https://review.opendev.org/c/zuul/zuul-jobs/+/866943
Tox 4 deprecated whitelist_externals.
Replace whitelist_externals with allowlist_externals
Remove the deprecated cgcs-patch(CentOS) jobs from zuul
sw-patch directory contains the Debian support.
Move from xenial to bionic for patch-alarm zuul job.
Partial-Bug: #2000399
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: Ia0dcf61fc4a2c7911434158dd2e8bca7a787249a
The ubuntu-jammy nodeset gets selected by default
and is causing problems during setup.
Collecting cffi>=1.1
Failed to build cffi
ubuntu-focal seem to work fine.
Will specify the nodeset to be focal to resolve this.
Partial-Bug: 1994843
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: Ia6c3ea27285f42cebe6ee13a05ff6272fb8a7ba1
The original cgcs-patch is rpm based which requires a
complete re-write to work on ostree/dpkg systems like Debian.
The code has been forked, since the older Centos env and
python2.7 are end-of-life.
Forking the code allows all new development to not
require re-testing on Centos.
The debian folder under cgcs-patch has been moved
under sw-patch
Renaming and refactoring will be done in later commits.
pylint is un-clamped in order to work on python3.9
Some minor pylint suppressions have been added.
Test Plan:
Verify that this builds on Debian
Verify that the ISO installs the new content on Debian without
breaking packages that import cgcs_patch.
Verify patching service runs on Debian
Co-Authored-By: Jessica Castelino <jessica.castelino@windriver.com>
Story: 2009101
Task: 43076
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I3f1bca749404053bae63d4bcc9fb2477cf909fcd
Removing redundant py36 Zuul jobs since we now have py39 Zuul jobs in
place with the debian nodeset
Story: 2006796
Task: 43495
Signed-off-by: Bernardo Decco <bernardo.deccodesiqueira@windriver.com>
Change-Id: I63d9b3270dfedf79ca73ab19fabf1883706be879
patch-alarm runs on python2.7, so the node should be ubuntu-xenial.
Story: 2009101
Task: 43263
Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I91e370e8500008234254e5a158f49b4b55306e36
Enable python3.9 in tox.ini and zuul gate. Tested locally
by running tox and running in the zuul gate.
Story: 2009101
Task: 43105
Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I44eaeb134d6b7b54788469fa469b04674aeb90c0
The py2.7 jobs need to specify xenial
The py3.6 jobs need to specify bionic
The focal zuul nodes only have python 3.8 installed in them
Zuul targets that invoke a generic python3 interpreter such
as pep8 is not specified.
Also ignore H216 since we still use py2.7.
The copyright date was updated in order to trigger
the zuul jobs, as a no-delta type of change.
Partial-Bug: 1928978
Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I81fd790dfc8a665a4e4e0ff59a013af7921b6e06
Signed-off-by: Charles Short <charles.short@windriver.com>
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>
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>
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>
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>
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>
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
This update sets up the initial testing framework for
the patch-alarm module, with a basic test case.
Additionally, this restructures the tox.ini files. Now
that each python module has its own tox.ini and tests,
the top-level tox.ini can recursively use those. As well,
the Zuul setup can now split the jobs for each module.
Change-Id: I79eed868c5b42e2545ccf0c11dbbbea4336b9b19
Story: 2005939
Task: 34783
Signed-off-by: Don Penney <don.penney@windriver.com>
This update sets up the framework for unit testing in
the cgcs-patch module, with some basic test cases.
Change-Id: I209076449353a23bb57e0eee397e614b7e89ad88
Story: 2005939
Task: 34756
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>
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>
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>
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>
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>
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>
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>
* 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>
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>
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>
Add the basics for testing, non-voting jobs until the cleanups merge
Change-Id: I2f57c37335b5625eb1d124e276fbb98d94714d4d
Signed-off-by: Dean Troyer <dtroyer@gmail.com>