Commit Graph

47 Commits

Author SHA1 Message Date
junfeng-li 979bd27d90 Raise deploy state out of sync alarm
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>
2024-04-15 19:14:23 +00:00
Bin Qian 5e73024922 Fix zuul failure
A recent opendev change invalid the branch as eol. This
fails the zuul job as ERROR: 404 Client Error: Not Found for url:
https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt

Closes-Bug: 2048928

Change-Id: Ief69b7b35ab32195fe78dd9a2bffa0e32831ed65
Signed-off-by: Bin Qian <bin.qian@windriver.com>
2024-01-10 19:26:20 +00:00
Zuul 3c395fa898 Merge "Update patch-alarm tox for python3" 2023-05-02 14:36:06 +00:00
Jessica Castelino 965a6d3639 Setup controller and agent processes for "software"
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
2023-04-20 19:22:30 +00:00
Al Bailey 70f9755c1f Update patch-alarm tox for python3
- 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
2023-04-12 18:28:07 +00:00
Zuul 3de2a431f6 Merge "Revert "Revert "Fix github mirroring for this repo""" 2023-04-05 13:50:41 +00:00
Al Bailey 314c01be47 Revert "Revert "Fix github mirroring for this repo""
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
2023-04-05 13:32:29 +00:00
Zuul 646fae2523 Merge "Revert "Fix github mirroring for this repo"" 2023-04-04 19:26:19 +00:00
Al Bailey 3e920a1641 Revert "Fix github mirroring for this repo"
This reverts commit 3770c7bc99.

Reason for revert: Did not work

https://zuul.opendev.org/t/openstack/build/739e51d1a72d49e78edf328c659d51cc

Change-Id: Ib84486374c5c874b8a8f9e1dfdc3b63dacc75383
2023-04-04 19:08:25 +00:00
Zuul dab0d59301 Merge "Fix github mirroring for this repo" 2023-04-04 18:51:02 +00:00
Al Bailey 3770c7bc99 Fix github mirroring for this repo
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
2023-04-04 14:31:12 +00:00
Al Bailey 7f76bea9d3 Upload skeleton for unified software management
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
2023-04-03 14:03:04 +00:00
Al Bailey 7b0ecddf20 Update tox.ini to work with tox 4
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
2022-12-23 16:01:02 +00:00
Al Bailey 42118e3e8f Fix zuul failures during setup
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
2022-10-28 18:56:39 +00:00
Al Bailey be09ccc584 Fork cgcs-patch package as sw-patch for Debian
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
2022-03-29 20:35:14 +00:00
Bernardo Decco b201abbedf Removing py36 gates from zuul for update
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
2021-09-30 10:35:19 -03:00
Charles Short 3c6b30689a Fix pylint
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
2021-09-09 11:51:43 -04:00
Charles Short 418deca242 py3: Add support for python3.9
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
2021-08-27 11:36:42 -04:00
Charles Short 49e39fa949 Specify the nodeset zuul jobs
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>
2021-05-28 11:24:04 -04:00
albailey 2302b0fe2e Enable py3-bandit and py3-flake8 zuul jobs
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>
2020-06-25 21:04:54 -05:00
Don Penney 4146e2a859 Disable py3-bandit and py3-flake8 zuul jobs
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>
2020-06-22 22:32:21 -04:00
Bin Qian e9544b7de1 Adding job to upload commits to GitHub
Add job to publish update repo to GitHub

Change-Id: I143507a41af281e9d831e3877b4ba65222966aea
Story: 2007252
Task: 38703
Signed-off-by: Bin Qian <bin.qian@windriver.com>
2020-02-07 09:04:07 -05:00
albailey e3be9a2776 Update flake8 to verify patch scripts
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>
2020-01-31 09:40:27 -06:00
Al Bailey e45a758a8a Enable tox bandit checks for python in update repo
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>
2019-12-02 10:30:41 -06:00
Al Bailey f0cd0181bc Turn off devstack as a zuul job
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>
2019-10-17 16:10:42 -05:00
Don Penney 67e9223673 Fix cgcs-patch tox failure
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>
2019-10-01 18:02:23 +00:00
Scott Little b0559bc151 Subdirectories 'tsconfig ' relocated to repo 'stx-config'
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>
2019-09-05 13:04:59 -04:00
Andreas Jaeger 180e647475 Use Zuul templates
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
2019-08-21 12:57:23 +00:00
Don Penney a5e51f98c8 Add test framework for patch alarm manager
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>
2019-06-28 17:03:00 -04:00
Don Penney f27f1c1539 Add initial unit testing to cgcs-patch
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>
2019-06-27 15:46:43 -04:00
Dean Troyer 0a0475b815 Followup opendev cleanup and test jobs
Depends-on: https://review.opendev.org/654006
Change-Id: If679cd0742cdf53b27db5f9c94b4c705c46b07ef
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-04-20 09:24:53 -05:00
OpenDev Sysadmins 227e1c5754 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:52:36 +00:00
Dean Troyer 968ba6b6c6 Switch to new DevStack base job
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>
2019-03-22 12:23:06 -05:00
Dean Troyer c72cf50c08 Update py35 jobs to py37
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>
2019-03-14 17:19:36 -05:00
Dean Troyer fec4ac9302 Set DevStack install dir to /usr/local by default
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>
2019-03-07 14:31:49 -06:00
Al Bailey b39f383007 Adding unit tests to tsconfig and clean it up a bit
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>
2019-03-04 19:16:05 +00:00
Abraham Arce 46bc1cfdf9 OpenStack API Reference Guide
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>
2019-02-05 04:18:55 -06:00
Dean Troyer 62abfa4787 Add a minimal DevStack job
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>
2018-11-01 23:32:29 -05:00
Dean Troyer cadb9376e4 Remove api-ref directory and jobs
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>
2018-10-25 08:40:39 -05:00
Abraham Arce 5a021f1584 [Doc] openstackdocstheme starlingxdocs theme
Enable starlingxdocs theme support for:

- Documentation
- Release Notes
- API Reference

Add zuul check and gate job:

- build-openstack-api-ref

Change-Id: I0d59eaf777bb0f462db4d436c030a785e61798d2
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2018-10-22 14:38:52 +00:00
Dean Troyer 286deaf2aa Add api-ref and relnotes publish jobs
* 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>
2018-10-15 10:36:09 -05:00
Dean Troyer e489326a40 Add publish job for docs
Also set the theme to alabaster until starlingxdocs is ready

Change-Id: I5cc9b7203c5a28057783315da100b3caabf67e19
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-10-06 14:42:40 -05:00
Abraham Arce 57e9e71cb6 [Doc] Release Notes Management
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>
2018-09-25 15:01:30 -07:00
Abraham Arce 1799425d3d [Doc] Building docs following Docs Contrib Guide
Baseline changes to comply with OpenStack Documentation
Contributor Guide [0] starting with the following sections:

- Project guide setup
  - [1] sphinx-quickstart
  - [2] doc/source/ layout
- Building documentation
  - [3] tox -e docs
- Using documentation tools
  - [4] openstackdocstheme
- Use build-openstack-docs-pti job template for docs

[0] https://docs.openstack.org/doc-contrib-guide
[1] http://www.sphinx-doc.org/en/master/usage/quickstart.html
[2] https://docs.openstack.org/doc-contrib-guide/project-guides.html
[3] https://docs.openstack.org/doc-contrib-guide/docs-builds.html
[4] https://docs.openstack.org/openstackdocstheme/

Story: 2002708
Task: 26656

Story: 2002813
Task: 26657

Change-Id: Iffee1ba3ddc670fca9ae6e0d5b325f3831650e2f
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2018-09-25 15:01:12 -07:00
Don Penney 2885d09ed2 Add pylint support
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>
2018-08-24 09:19:44 -05:00
Don Penney a617eeffca Enable Zuul voting for linters
Story: 2003371
Task: 24447

Change-Id: I574e682e3661cb99b368a9dd09e0b5bfa824107d
Signed-off-by: Don Penney <don.penney@windriver.com>
2018-08-09 10:26:34 -05:00
Dean Troyer ba33256f86 Add Zuul test foundation
Add the basics for testing, non-voting jobs until the cleanups merge

Change-Id: I2f57c37335b5625eb1d124e276fbb98d94714d4d
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-07-25 08:48:07 -05:00