Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
S slapos.package
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • nexedi
  • slapos.package
  • Merge requests
  • !183

Merged
Created Sep 07, 2023 by Joanne Hugé@jhugeMaintainer

Add alternative playbook scheduler for ORS

  • Overview 12
  • Commits 2
  • Pipelines 1
  • Changes 18

I would like to add an alternative playbook scheduler for ORS. Currently in upgrader and vifib-server playbook we simple install a period cron ever X minutes. Instead for ORS I propose the following:

  • At beginning of playbook install a cron job scheduled to run upgrader playbook every 5 minutes
  • If playbook fails then it will run again every 5 minutes
  • At the end of playbook remove the cron job every 5 minutes and add a anacron job scheduled to run once a day

This will satisfy the three requirements of playbook for ORS:

  • run playbook as few times as possible to avoid performance issues
  • quickly upgrade when clients power on their ORS (clients leave their ORS off for long period of times and only power on to update, they want it to be quick and not take hours)
  • be resilient to unexpected playbook failures (which can happen because client sometimes have environment where internet is not always available)

I also add a curl before executing playbook to make sure we are connected to internet, otherwise playbook would run every 5 minutes when ORS is disconnected from internet (which happens often). I used url from /etc/apt/source.list because if I use website such as google.com I'm not sure it will work in country such as china, and the goal of the playbook is to update OS packages anyway.

/cc @tomo /cc @rafael

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: anacron
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7