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

slapos/recipe/postgresql: Do not leave half-installed postgresql instance

  • Review changes

  • Download
  • Patches
  • Plain diff
Closed Kirill Smelkov requested to merge kirr/slapos:pg-robust into master Nov 04, 2015
  • Overview 4
  • Commits 1
  • Pipelines 0
  • Changes

In case there are errors when creating cluster / setting up its configuration files, currently we leave pgsql database left half-installed and next time instantiation runs do not do anything, because os.path.exists(pgdata) is already true.

I've personally hit this situation via providing ipv4 and ipv6 parameters as strings and the recipe wanted to do ipv4.join(ipv6) but this works only for sets and raises for strings.

What is worse is that the above error becomes hidden in our default setup, because webrunner tries to do instantiation several times, and on the second run instantiation succeeds, because pgdata directory already exists and recipe thinks there is nothing to do and webrunner already removed instance.log from previous run.

So do not hide errors, and if we see there are problems, remove the wholly created pgsql database directory.

/cc @kazuhiko

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