Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • S slapos.core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 38
    • Merge requests 38
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • slapos.core
  • Merge requests
  • !323

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

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Jérome Perrin requested to merge fix/prune_recursive_return into master Aug 11, 2021
  • 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
Reviewers
Request review from
Time tracking
Source branch: fix/prune_recursive_return
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7