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

Merge development branch into master for v0.10.2 release #358

Merged
merged 44 commits into from
Feb 28, 2020
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
ee11562
Merge pull request #6 from opensds/development
NajmudheenCT Dec 12, 2019
3dea184
Merge pull request #7 from opensds/development
NajmudheenCT Jan 6, 2020
21ce882
Adding First set of Unit Test files for VRO
NajmudheenCT Jan 6, 2020
f818aa1
ReadMe and Configuration file for VRO test Automation
NajmudheenCT Jan 7, 2020
1320470
format test files, correct spacing
NajmudheenCT Jan 7, 2020
76deaa2
Merge branch 'master' into vro_automation
NajmudheenCT Jan 7, 2020
2ffeca3
NGC Automation for OpenSDS adapter
NajmudheenCT Jan 8, 2020
ef8fcf7
hostpath type change for iscsi dir (#10)
sushanthakumar Jan 17, 2020
07dba29
vendor changes update
sushanthakumar Jan 16, 2020
27c361e
Fix for list snapshot issue
NajmudheenCT Feb 4, 2020
0a9ba50
add only snapshots whose status is available to the list
NajmudheenCT Feb 4, 2020
46008eb
Fix for 341 342 309
NajmudheenCT Feb 5, 2020
5473324
Merge pull request #337 from sushanthakumar/Fixfstab-ToDev
kumarashit Feb 5, 2020
b07e9cf
Merge branch 'development' into iscsihostpath-ToDev
kumarashit Feb 5, 2020
c80cfa6
Merge pull request #330 from wisererik/iscsihostpath-ToDev
kumarashit Feb 5, 2020
a1104a8
[CSI] Update version of k8s csi container images (#333)
sushanthakumar Feb 5, 2020
70d6eab
[CSI] Support for multiple initiator infos (#335)
sushanthakumar Feb 5, 2020
4ce4462
Merge branch 'development' into ngc_automation
kumarashit Feb 5, 2020
ed4d206
[CSI] Removal of host devices during volume detach (#336)
sushanthakumar Feb 5, 2020
7edacc0
Declaring constants for unit tests
NajmudheenCT Feb 6, 2020
fed5347
Merge branch 'development' into ngc_automation
NajmudheenCT Feb 6, 2020
fddd27c
Merge branch 'development' into ngc_issue_fix
NajmudheenCT Feb 6, 2020
d2e7bf0
DatastoreServiceImpl create method Unit testing (#350)
soumiksgithub Feb 6, 2020
32c365a
Merge branch 'development' into ngc_automation
kumarashit Feb 6, 2020
b5e7307
Merge branch 'development' into ngc_QIP_fixes
skdwriting Feb 7, 2020
1ba99d3
Merge pull request #352 from NajmudheenCT/ngc_QIP_fixes
skdwriting Feb 7, 2020
c659651
Merge branch 'development' into ngc_issue_fix
skdwriting Feb 7, 2020
d29ce96
Merge branch 'development' into ngc_automation
skdwriting Feb 7, 2020
e04e51c
Merge branch 'development' into vro_automation
NajmudheenCT Feb 7, 2020
e2d8d3e
Delete Gopkg.lock
NajmudheenCT Feb 7, 2020
1af20fd
Revert "Delete Gopkg.lock"
NajmudheenCT Feb 7, 2020
ffbeb74
syncing with dec
NajmudheenCT Feb 7, 2020
ca7fcb7
updating default test config values
NajmudheenCT Feb 7, 2020
5f1b31b
updating default test config values
NajmudheenCT Feb 7, 2020
b47f61f
Merge branch 'development' of https://github.com/opensds/nbp into ngc…
NajmudheenCT Feb 7, 2020
c076cfc
Merge branch 'ngc_automation' of https://github.com/NajmudheenCT/nbp …
NajmudheenCT Feb 7, 2020
1192009
Merge pull request #351 from NajmudheenCT/ngc_issue_fix
skdwriting Feb 7, 2020
417e943
Merge branch 'development' into ngc_automation
skdwriting Feb 7, 2020
4500b4f
Merge pull request #327 from NajmudheenCT/ngc_automation
skdwriting Feb 7, 2020
51a1f10
Merge branch 'development' into vro_automation
skdwriting Feb 7, 2020
c8952d8
Merge pull request #325 from NajmudheenCT/vro_automation
skdwriting Feb 7, 2020
f53f430
Conflict resolution
sushanthakumar Feb 13, 2020
a20fa7d
Merge pull request #359 from sushanthakumar/ResolveVendorConflict
NajmudheenCT Feb 13, 2020
eb56110
vendor update based on v0.10.0 (#364)
sushanthakumar Feb 28, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

[[constraint]]
name = "github.com/opensds/opensds"
version = "0.9.0"
branch = "master"

[[constraint]]
name = "github.com/pmorie/go-open-service-broker-client"
Expand Down
13 changes: 7 additions & 6 deletions cindercompatibleapi/converter/volume.go
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -447,18 +447,19 @@ func InitializeConnectionReq(initializeConnectionReq *InitializeConnectionReqSpe
continue
}

portName, err := volDriver.GetInitiatorInfo()
portNameList, err := volDriver.GetInitiatorInfo()
if err != nil {
glog.Errorf("cannot get initiator for driver volume type %s, err: %v", volDriverType, err)
continue
}

initiator := &model.Initiator{
PortName: portName,
Protocol: volDriverType,
for _, portName := range portNameList {
initiator := &model.Initiator{
PortName: portName,
Protocol: volDriverType,
}
initiators = append(initiators, initiator)
}

initiators = append(initiators, initiator)
}

if len(initiators) == 0 {
Expand Down
1 change: 1 addition & 0 deletions csi/cmd/block/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ COPY nvme-cli-1.8.1 /nvme-cli-1.8.1
RUN apt-get update && \
apt-get -y install open-iscsi \
sysfsutils \
sg3-utils \
kmod \
ceph-common \
nfs-common \
Expand Down
16 changes: 10 additions & 6 deletions csi/common/node.go
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,22 @@ func NodeGetInfo(
continue
}

portName, err := volDriver.GetInitiatorInfo()
portNameList, err := volDriver.GetInitiatorInfo()
if err != nil {
glog.Errorf("cannot get initiator for driver volume type %s, err: %v", volDriverType, err)
continue
}

initiator := &model.Initiator{
PortName: portName,
Protocol: volDriverType,
}
for _, portName := range portNameList {
if portName != " " {
initiator := &model.Initiator{
PortName: portName,
Protocol: volDriverType,
}

initiators = append(initiators, initiator)
initiators = append(initiators, initiator)
}
}
}

if len(initiators) == 0 {
Expand Down
4 changes: 2 additions & 2 deletions csi/deploy/kubernetes/block/csi-attacher-opensdsplugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
serviceAccount: csi-attacher-block
containers:
- name: csi-attacher
image: quay.io/k8scsi/csi-attacher:v1.1.1
image: quay.io/k8scsi/csi-attacher:v1.2.1
args:
- "--v=5"
- "--csi-address=$(ADDRESS)"
Expand Down Expand Up @@ -144,7 +144,7 @@ spec:
- name: iscsi-dir
hostPath:
path: /etc/iscsi/
type: Directory
type: DirectoryOrCreate
- name: ceph-dir
hostPath:
path: /etc/ceph/
Expand Down
6 changes: 3 additions & 3 deletions csi/deploy/kubernetes/block/csi-nodeplugin-opensdsplugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
hostNetwork: true
containers:
- name: node-driver-registrar
image: quay.io/k8scsi/csi-node-driver-registrar:v1.1.0
image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0
args:
- "--v=5"
- "--csi-address=/csi/csi.sock"
Expand Down Expand Up @@ -155,7 +155,7 @@ spec:
- name: iscsi-dir
hostPath:
path: /etc/iscsi/
type: Directory
type: DirectoryOrCreate
- name: ceph-dir
hostPath:
path: /etc/ceph/
Expand All @@ -171,4 +171,4 @@ spec:
- name: hosts
hostPath:
path: /etc
type: Directory
type: Directory
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
serviceAccount: csi-provisioner-block
containers:
- name: csi-provisioner
image: quay.io/k8scsi/csi-provisioner:v1.1.0
image: quay.io/k8scsi/csi-provisioner:v1.4.0
args:
- "--provisioner=csi-opensdsplugin-block"
- "--csi-address=$(ADDRESS)"
Expand Down Expand Up @@ -123,4 +123,4 @@ spec:
- name: certificate-path
hostPath:
path: /opt/opensds-security
type: DirectoryOrCreate
type: DirectoryOrCreate
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
serviceAccount: csi-snapshotter-block
containers:
- name: csi-snapshotter
image: quay.io/k8scsi/csi-snapshotter:v1.1.0
image: quay.io/k8scsi/csi-snapshotter:v1.2.2
args:
- "--snapshotter=csi-opensdsplugin-block"
- "--csi-address=$(ADDRESS)"
Expand Down
4 changes: 2 additions & 2 deletions csi/deploy/kubernetes/file/csi-attacher-opensdsplugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
serviceAccount: csi-attacher-file
containers:
- name: csi-attacher
image: quay.io/k8scsi/csi-attacher:v1.1.1
image: quay.io/k8scsi/csi-attacher:v1.2.1
args:
- "--v=5"
- "--csi-address=$(ADDRESS)"
Expand Down Expand Up @@ -144,7 +144,7 @@ spec:
- name: iscsi-dir
hostPath:
path: /etc/iscsi/
type: Directory
type: DirectoryOrCreate
- name: ceph-dir
hostPath:
path: /etc/ceph/
Expand Down
6 changes: 3 additions & 3 deletions csi/deploy/kubernetes/file/csi-nodeplugin-opensdsplugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
hostNetwork: true
containers:
- name: node-driver-registrar
image: quay.io/k8scsi/csi-node-driver-registrar:v1.1.0
image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0
args:
- "--v=5"
- "--csi-address=/csi/csi.sock"
Expand Down Expand Up @@ -155,7 +155,7 @@ spec:
- name: iscsi-dir
hostPath:
path: /etc/iscsi/
type: Directory
type: DirectoryOrCreate
- name: ceph-dir
hostPath:
path: /etc/ceph/
Expand All @@ -171,4 +171,4 @@ spec:
- name: hosts
hostPath:
path: /etc
type: Directory
type: Directory
4 changes: 2 additions & 2 deletions csi/deploy/kubernetes/file/csi-provisioner-opensdsplugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
serviceAccount: csi-provisioner-file
containers:
- name: csi-provisioner
image: quay.io/k8scsi/csi-provisioner:v1.1.0
image: quay.io/k8scsi/csi-provisioner:v1.4.0
args:
- "--provisioner=csi-opensdsplugin-file"
- "--csi-address=$(ADDRESS)"
Expand Down Expand Up @@ -123,4 +123,4 @@ spec:
- name: certificate-path
hostPath:
path: /opt/opensds-security
type: DirectoryOrCreate
type: DirectoryOrCreate
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
serviceAccount: csi-snapshotter-file
containers:
- name: csi-snapshotter
image: quay.io/k8scsi/csi-snapshotter:v1.1.0
image: quay.io/k8scsi/csi-snapshotter:v1.2.2
args:
- "--snapshotter=csi-opensdsplugin-file"
- "--csi-address=$(ADDRESS)"
Expand Down
25 changes: 19 additions & 6 deletions csi/plugins/block/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"github.com/golang/glog"
"github.com/opensds/nbp/csi/common"
"github.com/opensds/nbp/csi/util"
nbputil "github.com/opensds/nbp/util"
"github.com/opensds/opensds/client"
nbputil "github.com/opensds/nbp/util"
"github.com/opensds/opensds/contrib/connector"
"github.com/opensds/opensds/pkg/model"
"google.golang.org/grpc/codes"
Expand Down Expand Up @@ -263,9 +263,9 @@ func (v *Volume) ControllerPublishVolume(req *csi.ControllerPublishVolumeRequest

var protocol = strings.ToLower(pool.Extras.IOConnectivity.AccessProtocol)
attachReq := &model.VolumeAttachmentSpec{
VolumeId: req.VolumeId,
HostId: req.NodeId,
AttachMode: attachMode,
VolumeId: req.VolumeId,
HostId: req.NodeId,
AttachMode: attachMode,
ConnectionInfo: model.ConnectionInfo{
DriverVolumeType: protocol,
},
Expand Down Expand Up @@ -591,8 +591,7 @@ func (v *Volume) NodeStageVolume(req *csi.NodeStageVolumeRequest) (*csi.NodeStag

// NodeUnstageVolume implementation
func (v *Volume) NodeUnstageVolume(req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error) {

vol, _, err := v.getVolumeAndAttachmentByVolumeId(req.VolumeId)
vol, attachment, err := v.getVolumeAndAttachmentByVolumeId(req.VolumeId)
if err != nil {
return nil, status.Error(codes.NotFound, err.Error())
}
Expand All @@ -619,6 +618,20 @@ func (v *Volume) NodeUnstageVolume(req *csi.NodeUnstageVolumeRequest) (*csi.Node
glog.Error(msg)
return nil, status.Error(codes.FailedPrecondition, msg)
}

volConnector := connector.NewConnector(attachment.DriverVolumeType)
if volConnector == nil {
msg := fmt.Sprintf("unsupported driver volume type: %s", attachment.DriverVolumeType)
glog.Error(msg)
return nil, status.Error(codes.FailedPrecondition, msg)
}

err = volConnector.Detach(attachment.ConnectionData)
if err != nil {
msg := fmt.Sprintf("failed to detach device: %v", err)
glog.Error(msg)
return nil, status.Error(codes.FailedPrecondition, msg)
}
}

if CSIBlock == vol.Metadata[CSIVolumeMode] {
Expand Down
4 changes: 2 additions & 2 deletions flexvolume/cmd/flex-plugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (plugin *OpenSDSPlugin) Attach(opts interface{}) Result {
}

//create attachment to indicate the volume is been processed.
localIqn, _ := connector.NewConnector("iscsi").GetInitiatorInfo()
localIqnList, _ := connector.NewConnector("iscsi").GetInitiatorInfo()

attachReq := &model.VolumeAttachmentSpec{
VolumeId: volID,
Expand All @@ -150,7 +150,7 @@ func (plugin *OpenSDSPlugin) Attach(opts interface{}) Result {
OsType: runtime.GOOS,
Ip: connector.GetHostIP(),
Host: hostname,
Initiator: localIqn,
Initiator: localIqnList[0],
},
Status: VOLUME_STATUS_ATTACHING,
Metadata: vol.Metadata,
Expand Down
12 changes: 0 additions & 12 deletions vendor/github.com/opensds/opensds/contrib/connector/common.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/opensds/opensds/contrib/connector/connector.go
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/opensds/opensds/contrib/connector/fc/fc.go
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions vendor/github.com/opensds/opensds/contrib/connector/fc/fibreChannel.go
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions vendor/github.com/opensds/opensds/contrib/connector/iscsi/helper.go
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading