Skip to content

GitLab

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

Closed
Created Nov 04, 2015 by Kirill Smelkov@kirrOwner
  • Report abuse
Report abuse

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

  • Overview 4
  • Commits 1
  • 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
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: pg-robust
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7