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

Make dataRoot optional, cleanup #73

Merged
merged 2 commits into from
Jul 17, 2019
Merged

Conversation

msau42
Copy link
Collaborator

@msau42 msau42 commented Jul 12, 2019

What type of PR is this?
/kind cleanup
/kind bug

What this PR does / why we need it:

  • Create dataRoot if it doesn't exist. Make provisioner root persistent across reboot #20 made specifying a new volumeMount required, which is technically backwards compatibility breaking.
  • Reorganize block, snapshot and cloning code into separate functions.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Make creating /csi-data-dir optional

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/bug Categorizes issue or PR as related to a bug. labels Jul 12, 2019
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 12, 2019
@msau42
Copy link
Collaborator Author

msau42 commented Jul 12, 2019

/assign @xing-yang @j-griffith @jsafrane

executor := utilexec.New()
out, err := executor.Command("tar", args...).CombinedOutput()
if err != nil {
return status.Errorf(codes.Internal, "failed pre-populate data from snapshot %v: %v: %s", snapshotId, err, out)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh... you consolidated the cleanup in the caller, nice!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice clean up on this.

pkg/hostpath/controllerserver.go Outdated Show resolved Hide resolved
pkg/hostpath/controllerserver.go Outdated Show resolved Hide resolved
@msau42
Copy link
Collaborator Author

msau42 commented Jul 15, 2019

/test pull-kubernetes-csi-csi-driver-host-path-alpha-1-15-on-kubernetes-1-15

@msau42
Copy link
Collaborator Author

msau42 commented Jul 15, 2019

/retest

pkg/hostpath/controllerserver.go Outdated Show resolved Hide resolved
@j-griffith
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: j-griffith, msau42

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 16, 2019
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 16, 2019
@msau42
Copy link
Collaborator Author

msau42 commented Jul 16, 2019

/test pull-kubernetes-csi-csi-driver-host-path-alpha-1-15-on-kubernetes-1-15

@j-griffith
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 17, 2019
@k8s-ci-robot k8s-ci-robot merged commit 4b2c735 into kubernetes-csi:master Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants