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

Block volumes Support: iSCSI plugin update #54752

Merged
merged 2 commits into from Jan 10, 2018

Conversation

@mtanino
Member

mtanino commented Oct 28, 2017

What this PR does / why we need it:

Add interface changes to iSCSI volume plugin to enable block volumes support feature.

Which issue this PR fixes:
Based on this proposal (kubernetes/community#805 & kubernetes/community#1265) and this feature issue: kubernetes/enhancements#351

Special notes for your reviewer:

This PR temporarily includes following changes except iSCSI plugin change for reviewing purpose.
These changes will be removed from the PR once they are merged.

  • (#50457) API Change
  • (#51494) Container runtime interface change, volumemanager changes, operationexecutor changes

There are another PRs related to this functionality.
(#50457) API Change
(#53385) VolumeMode PV-PVC Binding change
(#51494) Container runtime interface change, volumemanager changes, operationexecutor changes
(#55112) Block volume: Command line printer update
Plugins
(#51493) Block volumes Support: FC plugin update
(#54752) Block volumes Support: iSCSI plugin update

Release note:

NONE
@mtanino

This comment has been minimized.

Member

mtanino commented Oct 28, 2017

/retest

2 similar comments
@mtanino

This comment has been minimized.

Member

mtanino commented Oct 30, 2017

/retest

@mtanino

This comment has been minimized.

Member

mtanino commented Oct 30, 2017

/retest

@mtanino

This comment has been minimized.

Member

mtanino commented Nov 8, 2017

/retest

2 similar comments
@mtanino

This comment has been minimized.

Member

mtanino commented Nov 8, 2017

/retest

@mtanino

This comment has been minimized.

Member

mtanino commented Nov 8, 2017

/retest

@rootfs

This comment has been minimized.

Member

rootfs commented Nov 13, 2017

@mtanino is it ready for review?

@mtanino

This comment has been minimized.

Member

mtanino commented Nov 13, 2017

@rootfs yes, ready to review. thanks.

func (detacher *iscsiDetacher) volumeSpecToUnmounter(mounter mount.Interface) *iscsiDiskUnmounter {
exec := detacher.host.GetExec(iscsiPluginName)
func VolumeSpecToUnmounter(mounter mount.Interface, host volume.VolumeHost) *iscsiDiskUnmounter {
exec := host.GetExec(iscsiPluginName)

This comment has been minimized.

@rootfs

rootfs Nov 14, 2017

Member

this is already done above

This comment has been minimized.

@mtanino

mtanino Nov 19, 2017

Member

Which line?

return nil, err
}
if source.SecretRef != nil {

This comment has been minimized.

@rootfs

rootfs Nov 14, 2017

Member

this will change once #51530 merged

This comment has been minimized.

@mtanino

mtanino Nov 19, 2017

Member

done.

}
func (plugin *iscsiPlugin) newBlockVolumeMapperInternal(spec *volume.Spec, podUID types.UID, manager diskManager, mounter mount.Interface, exec mount.Exec, secret map[string]string) (volume.BlockVolumeMapper, error) {
// iscsi volumes used directly in a pod have a ReadOnly flag set by the pod author.

This comment has been minimized.

@rootfs

rootfs Nov 14, 2017

Member

remove

This comment has been minimized.

@mtanino

mtanino Nov 19, 2017

Member

done.

return &iscsiDiskMapper{
iscsiDisk: iscsiDisk,
readOnly: readOnly,
mounter: &mount.SafeFormatAndMount{Interface: mounter, Exec: exec},

This comment has been minimized.

@sbezverk

sbezverk Nov 30, 2017

Contributor

Since it is a raw block device, I am curious why mounter is instantiated with SafeFormatAndMount, should it not be just nil as it is completely up to the application running in the pod to decide what to do with the raw storage.

This comment has been minimized.

@mtanino

mtanino Nov 30, 2017

Member

@sbezverk We should remove mounter since it isn't used. thanks.

@mtanino mtanino changed the title from Block volumes Support: iSCSI plugin update to [WIP] Block volumes Support: iSCSI plugin update Nov 30, 2017

@mtanino mtanino changed the title from [WIP] Block volumes Support: iSCSI plugin update to Block volumes Support: iSCSI plugin update Dec 1, 2017

@mtanino

This comment has been minimized.

Member

mtanino commented Dec 2, 2017

@rootfs @jsafrane
I think I need feedback for iscsi block volume support. PTAL.

This PR adds

  • Block Volume support
  • ConstructVolumeSpec() update (discussed on #54264)
@mtanino

This comment has been minimized.

Member

mtanino commented Dec 2, 2017

/unassign @erictune
/assign @jsafrane

@k8s-ci-robot k8s-ci-robot assigned jsafrane and unassigned erictune Dec 2, 2017

@mtanino

This comment has been minimized.

Member

mtanino commented Dec 4, 2017

/retest

@k8s-ci-robot

This comment has been minimized.

Contributor

k8s-ci-robot commented Dec 4, 2017

@mtanino: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-cross 756a957 link /test pull-kubernetes-cross

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@mtanino

This comment has been minimized.

Member

mtanino commented Dec 4, 2017

/retest

iface, initiatorNamePtr, err := getISCSIInitiatorInfo(spec)
if err != nil {
return nil, err
func (plugin *iscsiPlugin) NewBlockVolumeMapper(spec *volume.Spec, pod *v1.Pod, _ volume.VolumeOptions) (volume.BlockVolumeMapper, error) {

This comment has been minimized.

@rootfs

rootfs Jan 9, 2018

Member

nit: GoDoc

This comment has been minimized.

@mtanino

mtanino Jan 9, 2018

Member

done.

@@ -212,25 +176,87 @@ func (plugin *iscsiPlugin) newUnmounterInternal(volName string, podUID types.UID
}, nil
}
func (plugin *iscsiPlugin) NewBlockVolumeUnmapper(volName string, podUID types.UID) (volume.BlockVolumeUnmapper, error) {

This comment has been minimized.

@rootfs

rootfs Jan 9, 2018

Member

GoDoc

This comment has been minimized.

@mtanino

mtanino Jan 9, 2018

Member

done.

@rootfs

This comment has been minimized.

Member

rootfs commented Jan 10, 2018

/approve

mtanino added some commits Oct 28, 2017

Block volumes Support: iSCSI plugin update
This patch adds block volume support to iSCSI volume plugin.
@rootfs

This comment has been minimized.

Member

rootfs commented Jan 10, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Jan 10, 2018

@k8s-ci-robot

This comment has been minimized.

Contributor

k8s-ci-robot commented Jan 10, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mtanino, rootfs

Associated issue: #805

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

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented Jan 10, 2018

Automatic merge from submit-queue (batch tested with PRs 54230, 58100, 57861, 54752). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-merge-robot k8s-merge-robot merged commit 2f17d78 into kubernetes:master Jan 10, 2018

13 checks passed

Submit Queue Queued to run github e2e tests a second time.
Details
cla/linuxfoundation mtanino authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke-gci Skipped
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce Job succeeded.
Details
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-unit Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment