rh-openstack-ci-team
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Promoter Current status ###### tags: `Design` ## About Promoter - [ ] https://docs.openstack.org/tripleo-docs/latest/ci/chasing_promotions.html (out-of-date, but provides good info on how promotions work) - [ ] https://drive.google.com/file/d/15z9lmOaDMD7EXn-wbe_CXAIwewXOHHuj/view?usp=sharing - [ ] https://drive.google.com/file/d/1e7h67ytwB3Au_Q3T3RcTfKoQFjWbVXhW/view?usp=sharing - [ ] https://drive.google.com/file/d/1TykL8mPLT5nacYjMW3Pu8qiZYjd7qRPE/view?usp=sharing ## Testing Refer to https://hackmd.io/kJqHSTWWRMOIfIhvDMGFLg for molecule and zuul jobs design. ## Promoter server instances We have three instances See: https://docs.google.com/document/d/1bHVPN-lcXyY7imLdvj2J7I55s-vtF3ffPG-y2Cj8u38/edit#heading=h.xdi7lcpdgdn9 ## Document the manual activities ### Git pull the promoter code in rdo ```bash # Don't forget to stop the promoter service sudo systemctl stop dlrnapi-promoter # The second step is to save all the changes that are directly in the the server git stash # Pull the later version of the promoter code git pull # Apply the saved changes to the latest version of the promoter code git stash pop # (you may need to resolve the conflicts) ``` ### Git pull the promoter code in internal Updating the code in the internal server is a suicide. The code in the internal promoter has diverged a lot from the promoter master. There are changes in all the places to make upstream code work with downstream configuration. You can use the same step for the RDO server, but be aware that you may need to manually fix A LOT of conflicts. ### Git pull the promoter code in vexxhost Promoter code in vexxhost promoter was never updated after the first deployment, and there's really no need to update until vexxhost will become the only working promoter server. Unless of course there's a fix that is needed for the promotion of the non components pipeline. In that case the same procedure can be use as RDO. The code there is not hevily modified and the only changes I'm expecting are in the release config and in the criteria. Q: why are we not running master here ^^^ * can't think of a reason ... zbr concerns about performance? * needs reprovisioning... so we are blocked on getting the deployment playbook work finished. ### Selecting only portion of promotion workflow In a regular promotion workflow, three piece are promoted: * containers * qcow images and * dlrn hashes. These three parts are handled by three different clients in the code respectively: * containers_client * qcow_client * dlrn_client By default, all three clients are invoked, but it's possible to modify a release configuration to run only one of those clients by adding the variable allowed_clients. For example ```ini allowed_clients: qcow_client,dlrn_client ``` the variable accepts a comma separated list of clients. In this case, the containers promotion will be skipped and only qcow and dlrn promotions will run. ### Manually forcing a promotion. The promoter command has two subcommands: promote-all and force-promote Regular promoter runs call the promote-all subcommand, which will do all the promotions for the specified distro/release pair. The force-promote subcommand may be used to skip: * the candidate hash selection from the candidate label * the verification of the criteria (successful jobs) for the selected candidate hash So effectively the force-promote subcommand unconditionally promotes whatever hash is passed as argument. The subcommand contains detailed help. Here's an example ```bash python dlrnapi_promoter.py \ --config-file /home/centos/ci-config/ci-scripts/dlrnapi_promoter/config/CentOS-8/master.ini \ force-promote \ --commit-hash f8c9720499600baad488b956210e4bbe3b5da5bc \ --distro-hash 8c0e50eaa860d4e4b316ba0f7cba8ef6142b5e09 --aggregate-hash ad7d4b111c58647200378977824cba7a \ tripleo-ci-testing \ current-tripleo ``` This command will force the promotion of the hashes specified, starting from tripleo-ci-testing label to current-tripleo label, using the configuration in CentOS-8/master.ini PLEASE NOTE that this operation is quite risky as it will override check on the hashes and it should be done having four eyes on board at all time ## Workflow in the promoter * dlrn-promoter service in systemd calls /home/centos/ci-config/ci-scripts/dlrnapi_promoter/dlrn-promoter-service.sh * the dlrn-promoter-service.sh script loops forever on these tasks: * [CURRENTLY DISABLED] updating the code to the latest version * calls dlrn-promoter.sh script * pause for a specified amount of time (currently 12 hours) * the dlrn-promoter.sh script will: * specify a list of distro/release pair to promote * set arguments for the promoter code call * loop over the distro/release list * launching with a soft and hard timeout the promoter promote-all subcommand with all the arguments needed ### Locking TWO PROMOTER INSTANCES CANNOT RUN AT THE SAME TIME. To ensure we are not running two promoters at the same time, there's a locking mechanism in place, that uses abstract sockets (so nobody will have to deal with lock files and stale executions). If we run a promoter subcommand but another is in execution, the command will bail out (and yes there's a test for this particular part to ensure this works correctly) ### Logging * The logging subsystem logs to file and to console. * the console logging is automatically activated when the promoter command is run from the console, it's disabled otherwise * The logging file is defined in the configuration * The general idea for the current logging format is to be able to understand in each line: * at which step of the promotion the code is * what hash is currently being evaluated. Unfortunately that means that every line has a lot of informations in it. A typical logging line is as follows: ``` promoter Candidate hash 'aggregate: f2248610c021a5d77a0bfd73afd01707, commit: 13aa52f00ad3a5c5f8986761e803bf5 8ffffa9e9, distro: 408e9aac933209728a79ffab270d6d3bf672b10b, component: tripleo, timestamp: 1594599171': missing jobs ['periodic-tripleo-ci-centos- 8-scenario004-standalone-master'] ``` The promoter will always try to tell you what's the hash being considered, and what's the action that is doing. So in this example we can look at the last part to understand that a particular hash is missing successful job, and the first part contains the details of the hash that hash missing jobs. #### Container promotion log unfortunately the container promotion logs are offered by ansible, and the python code just recopies them in the logs output. Debugging a container promotion error may be really difficult as the output is oddly formatted. One suggestion is to search for the keyword: promoter fail to get the task that failed in the promotion process. ## Work already planned for the short term and should be merged before the 10th of August. #### Promoter deployment https://hackmd.io/kJqHSTWWRMOIfIhvDMGFLg#WIP #### Promoter Code * implementation of qcow images promotion in python * STATUS: all changes are ready to be reviewed an merged. * Changes in order: ~~* https://review.rdoproject.org/r/28429~~ ~~* https://review.rdoproject.org/r/27626~~ * https://review.rdoproject.org/r/28142 * implementation of containers promotion in python * STATUS: still POC * I have a POC in https://review.rdoproject.org/r/26010. It's a huge change with 1000 lines of code. Lots of variables are considered there, and various aspects of the promotion (multiarch, multiple engines docker/podman, multiple registry APIs docker.io/quay.io) * Amol is already planning to move forward this task, starting from the ashes of the POC, proposing patches step by step. * implementation of the new configuration engine to make internal promoter instance easily maintainable. * STATUS: lots of changes ready to be reviewed, but some rebase and rework needed for the latest modification in current configuration code * PANDA working to deliver this by 03 August 2020 (panda out 03-12) * Changes in order: * ~~https://review.rdoproject.org/r/27648~~ * ~~https://review.rdoproject.org/r/27985~~ * ~~https://review.rdoproject.org/r/28017~~ * ~~https://review.rdoproject.org/r/28018~~ * https://review.rdoproject.org/r/28081 * (sync 29Jul ): up to here doesn't wire up - still needs some work - should merge rest up to this one at least this week * (sync 18Ago): Arx is trying to fix this patch * https://review.rdoproject.org/r/28019 * https://review.rdoproject.org/r/28020 * https://review.rdoproject.org/r/28014 ### New config engine: A new configuration system is needed to enable the promoter code to run in the same way on both upstream and dowstream, by changing only the configuration needed. The new config engine is described here: https://docs.google.com/presentation/d/1rERVavpiKJrvtDpNj25nFiv4tWw51OmSIJFSOzoUWyc/edit#slide=id.g732f445e13_0_0 I will prepare a demo to show how to deal with the new configuration format. ------ MARIOS NOTES. panda : ****1 vex 1 rdo 1 internal vex 2 months ago static code from 6 months ago... mostly for stable/ old pipeline... rdo most updated. .... (master or not? manual update) ... no continuous deployment.... recent version updated last week . centos8 master ussuri train running there... everything tht needs the md5 stuffs. internal deployed 1 month ago needs necessary modifications cos of hardcoded things that must be changed like image promotion needed to modify some bash Q are these in review? different/branched/internal project? document it - status- how to update - how to manually run Q: plan? running master on centos8 things? how do we get there is there a clear path to that ^^^ with the things you have in progress already we have to keep two versions running to support legacy workflow... does the new code support legacy workflow? playbooks that deploy promoter not idempotent yet e.g. removing docker packages for d/stream lets modify it so it can deal with both up/dstream then deploy it internally ### Issue in this patch : https://review.rdoproject.org/r/#/c/28081/ * Issue 1: --release-config is required parameter here https://review.rdoproject.org/r/#/c/28081/15/ci-scripts/dlrnapi_promoter/stage.py@80 but haven't define in ci-scripts/dlrnapi_promoter/config_environments/global_defaults.yaml so it's causing this issue error: stage.py setup: error: the following arguments are required: --release-config * temporarily fix this isssue by defining the release_config var in global_defaults.yaml * Issue 2: FileNotFoundError: [Errno 2] No such file or directory: '/tmp/promoter-staging/containers/file:///tmp/promoter-staging/containers/build-containers-main.yaml' * this extra path "/tmp/promoter-staging/containers/" is getting added here https://review.rdoproject.org/r/#/c/28081/15/ci-scripts/dlrnapi_promoter/stage_config.py@83 * IMO, containers_list_exclude_config: file:///tmp/promoter-staging/containers/build-containers-main.yaml should be containers_list_exclude_config: build-containers-main.yaml

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully