Bumping k8s dependencies to 1.13

This commit is contained in:
Cheng Xing
2018-11-16 14:08:25 -08:00
parent 305407125c
commit b4c0b68ec7
8002 changed files with 884099 additions and 276228 deletions

View File

@@ -318,7 +318,11 @@ func (util *RBDUtil) rbdUnlock(b rbdMounter) error {
}
// Construct lock id using host name and a magic prefix.
lock_id := kubeLockMagic + node.GetHostname("")
hostName, err := node.GetHostname("")
if err != nil {
return err
}
lock_id := kubeLockMagic + hostName
mon := util.kernelRBDMonitorsOpt(b.Mon)
@@ -399,6 +403,10 @@ func (util *RBDUtil) AttachDisk(b rbdMounter) (string, error) {
break
}
}
} else {
// ReadOnly rbd volume should not check rbd status of being used to
// support mounted as read-only by multiple consumers simultaneously.
needValidUsed = !b.rbd.ReadOnly
}
err := wait.ExponentialBackoff(backoff, func() (bool, error) {
used, rbdOutput, err := util.rbdStatus(&b)
@@ -575,7 +583,10 @@ func (util *RBDUtil) CreateImage(p *rbdVolumeProvisioner) (r *v1.RBDPersistentVo
capacity := p.options.PVC.Spec.Resources.Requests[v1.ResourceName(v1.ResourceStorage)]
volSizeBytes := capacity.Value()
// Convert to MB that rbd defaults on.
sz := int(volutil.RoundUpSize(volSizeBytes, 1024*1024))
sz, err := volutil.RoundUpSizeInt(volSizeBytes, 1024*1024)
if err != nil {
return nil, 0, err
}
volSz := fmt.Sprintf("%d", sz)
mon := util.kernelRBDMonitorsOpt(p.Mon)
if p.rbdMounter.imageFormat == rbdImageFormat2 {