Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
S slapos.core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 26
    • Merge requests 26
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • slapos.core
  • Merge requests
  • !572

Merged
Created Sep 05, 2023 by Xavier Thompson@xavier_thompsonOwner

slapgrid: Fix connectionless instance processing

  • Overview 3
  • Commits 2
  • Changes 2

Fix two bugs in instance processing without connection to master (see !515 (merged))

  1. Connection loss may result in slap.exception.ConnectionError being raised during instance processing in addition to RequestException: this case needs to be taken into account to correctly fallback to offline processing.

  2. When upgrading from a version of slapos.core that does not support processing instances without a connection to master to one that does, the following edgecase could occur:

    1. some partition is stopped and processed with old version
    2. slapos.core is upgraded
    3. connection to master is lost
    4. offline processing wrongly starts the services of stopped partition

    This was because the new version removes the supervisord file for a partition when the partition is stopped (in online mode) so that the offline mode can just start all the existing supervisord files. But since the partitions was never processed in online mode with the new version, this file was never removed.

    To fix this, we use the (now no longer used ) .requested_state file of the previous version to determine the state of the partition in offline mode, then we remove both the .requested_state file and the supervisord file, fixing the discrepancy.

Edited Sep 06, 2023 by Xavier Thompson
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: feat/slapgrid_without_internet
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7