Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • K kubernetes-ghost
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • open
  • kubernetes-ghost
  • Issues
  • #13
Closed
Open
Issue created Aug 26, 2020 by Arie Peterson@arie🐚Maintainer

Allow more time for disk operations

Currently, when called to mount a disk, the driver does in quick succession:

  1. a disk detach (see #10 (closed));
  2. a disk attach;
  3. an lsblk /dev/xvdx1 to see whether the disk already contains a filesystem.

I have seen an instance where 3. fails, even though 2. apparently succeeds. It's possible that we're going too fast, and that the instance kernel is not yet aware of the disk being attached.

Between 2. and 3. we should wait a while and/or check that the device file /dev/xvdx1 exists.

If we don't remove step 1. altogether (see #10 (closed)), perhaps we should wait a second or two between 1. and 2. as well. We could theoretically even do a similar wait loop at that point to confirm that the device is no longer visible on the current instance (which would return immediately if the disk was actually previously attached to a different instance), but it's not straightforward to know which device to look for; you'd have to parse the new mountpoint to get the PV ID which is hidden in there, and check /proc/mounts for any mounts containing that ID (if it's not already removed).

Assignee
Assign to
Time tracking