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

fix(blockdeviceclaims): fix openebs version type in blockdeviceclaim #1269

Merged
merged 1 commit into from
Jun 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 pkg/algorithm/nodeselect/v1alpha1/select_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func (ac *Config) ClaimBlockDevice(nodeBDs *nodeBlockDevice, spc *apis.StoragePo

bdcObjList, err := bdcKubeclient.List(metav1.ListOptions{LabelSelector: lselector})
if err != nil {
return nil, errors.Wrapf(err, "failed to list block device claim for {%s}", spc.Name)
return nil, errors.Wrapf(err, "failed to list block device claims for {%s}", spc.Name)
}
customBDCObjList := bdc.ListBuilderFromAPIList(bdcObjList)

Expand Down Expand Up @@ -272,7 +272,7 @@ func (ac *Config) ClaimBlockDevice(nodeBDs *nodeBlockDevice, spc *apis.StoragePo
WithOwnerReference(spc).
Build()
if err != nil {
return nil, errors.Wrapf(err, "failed to build blockd device claim for bd {%s}", bdName)
return nil, errors.Wrapf(err, "failed to build block device claim for bd {%s}", bdName)
}

_, err = bdcKubeclient.Create(newBDCObj.Object)
Expand All @@ -289,7 +289,7 @@ func (ac *Config) ClaimBlockDevice(nodeBDs *nodeBlockDevice, spc *apis.StoragePo
nodeClaimedBDs.BlockDeviceList = append(nodeClaimedBDs.BlockDeviceList, claimedBD)
}
if pendingBDCCount != 0 {
return nil, errors.Errorf("failed to claim block devcies on node: {%s}", nodeClaimedBDs.NodeName)
return nil, errors.Errorf("failed to claim block devices on node {%s}", nodeClaimedBDs.NodeName)
}
return nodeClaimedBDs, nil
}
4 changes: 3 additions & 1 deletion pkg/blockdeviceclaim/v1alpha1/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import (
const (
// StoragePoolKind holds the value of StoragePoolClaim
StoragePoolKind = "StoragePoolClaim"
// APIVersion holds the value of OpenEBS version
APIVersion = "openebs.io/v1alpha1"
)

// Builder is the builder object for BlockDeviceClaim
Expand Down Expand Up @@ -237,7 +239,7 @@ func (b *Builder) WithOwnerReference(spc *apis.StoragePoolClaim) *Builder {
}
trueVal := true
reference := metav1.OwnerReference{
APIVersion: string(apis.OpenEBSVersionKey),
APIVersion: APIVersion,
Kind: StoragePoolKind,
UID: spc.ObjectMeta.UID,
Name: spc.ObjectMeta.Name,
Expand Down