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

standalone: fix support of recursive slapos

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Jérome Perrin requested to merge jerome/slapos.core:fix/recursive-standalone into master Oct 09, 2019
  • Overview 1
  • Commits 1
  • Pipelines 0
  • Changes 1

When having more than one read_only_shared_part_list, the template was first rendered with indentation and then dedented, but since dedent only remove the common indentation, we ended up with slapos.cfg like this:

$ cat /data/slappart11_testnode/cqg/inst/test0-9/tmp/etc/slapos.cfg

            [slapos]
            software_root = /data/slappart11_testnode/cqg/inst/test0-9/tmp/soft
            instance_root = /data/slappart11_testnode/cqg/inst/test0-9/tmp/inst
            shared_part_list =
              /srv/slapgrid/slappart11/srv/shared
/srv/slapgrid/slappart11/srv/testnode/cqg/shared
              /data/slappart11_testnode/cqg/inst/test0-9/tmp/shared
            master_url = http://10.0.12.198:46312
            computer_id = local
            root_check = False

First dedent, then render the template to prevent this issue. Apply this to other uses of textwrap.dedent for consistency.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix/recursive-standalone
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7