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
  • !323

Merged
Created Aug 11, 2021 by Jérome Perrin@jeromeOwner

cli/prune: fix a case where parts where not detected as used from a recursive instance

  • Overview 6
  • Commits 2
  • Pipelines 2
  • Changes 2

To consider if a shared part is used, we consider all files named slapos.cfg in the instance and try to parse them as a slapos config file. The problem was that as soon as a file can not be parsed as a slapos config file, we did not continue to evaluate other slapos.cfg files. It was a return where it should have been a continue.

This was especially incorrect, because when we have recursive slapos, we usually have a working copy of slapos repository, which contain stack/slapos.cfg, which is not a valid slapos config file.

As a result, when a top level shared part was used in a software installed in the recursive slapos from a theia or slaprunner instance, this shared part was not detected as used and could have been deleted.

The fix consist in checking all slapos.cfg files. This will make slapos node prune command probably much slower, because it will really iterate on all files now. Anyway this was fast because it was wrong.

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