Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remount old mount point when csi plugin unexpect exit #282

Merged
merged 10 commits into from
Apr 2, 2019
Merged

remount old mount point when csi plugin unexpect exit #282

merged 10 commits into from
Apr 2, 2019

Commits on Mar 25, 2019

  1. issue #91

    issue #217
    
    Goal
    
    we try to solve when csi exit unexpect, the pod use cephfs pv can not auto recovery because lost mount relation until pod be killed and reschedule to other node. i think this is may be a problem. may be csi plugin can do more thing to remount the old path so when pod may be auto recovery when pod exit and restart, the old mount path can use.
    
    NoGoal
    
    Pod should exit and restart when csi plugin pod exit and mount point lost. if pod not exit will get error of **transport endpoint is not connected**.
    
    implment logic
    
    csi-plugin start:
    
    	1. load all MountCachEntry  from node local dir
    	2. check if volID exist in cluster, if no we ignore this entry, if yes continue
    	3. check if stagingPath exist, if yes we mount the path
    	4. check if all targetPath exist, if yes we binmount to staging path
    
    NodeServer:
    
    1. NodeStageVolume: add MountCachEntry on local dir include readonly attr and ceph secret
    2. NodeStagePublishVolume: add pod bind mount path to MountCachEntry  and persist local dir
    3. NodeStageunPublishVolume: remove pod bind mount path From MountCachEntry  and persist local dir
    4. NodeStageunStageVolume: remove MountCachEntry  from local dir
    王怀宗 committed Mar 25, 2019
    Configuration menu
    Copy the full SHA
    b318964 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2019

  1. 1. fix mountcache race conflict

        2. support user-defined cache dir
        3. if not define mountcachedir disable mountcache
    王怀宗 committed Mar 27, 2019
    Configuration menu
    Copy the full SHA
    af330fe View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2019

  1. fix code style

    王怀宗 committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    5b53e90 View commit details
    Browse the repository at this point in the history
  2. remove unuse var

    王怀宗 committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    043d360 View commit details
    Browse the repository at this point in the history
  3. code style

    王怀宗 committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    4ec3a57 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    dfdefe4 View commit details
    Browse the repository at this point in the history
  5. cephfs driver deploy support remount volume

    王怀宗 committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    1ccbb5b View commit details
    Browse the repository at this point in the history
  6. mount info cache dir support multi cephfsdriver

    王怀宗 committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    f3e5f83 View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2019

  1. code style

    王怀宗 committed Apr 1, 2019
    Configuration menu
    Copy the full SHA
    6de862d View commit details
    Browse the repository at this point in the history
  2. code style

    王怀宗 committed Apr 1, 2019
    Configuration menu
    Copy the full SHA
    1f1d5f4 View commit details
    Browse the repository at this point in the history