Commit Graph
11 Commits
Author SHA1 Message Date
Maksim Nabokikh 179e1a310d ceph: Add dynamic flexvolume expansion
Allow to dynamic resize of rook volumes

Signed-off-by: Maksim Nabokikh <maksim.nabokikh@flant.com>
2019-09-05 02:40:22 +04:00
Noah Watkins e7ae2b6abd ceph: adjust M-to-Mi rounding in PV creation
Example of failure scenarios:

   - requested PVC 500M = 500,000,000 bytes
   - PV is created as:
        (500M / 2**20)Mi = "476"Mi
        But 476Mi = 476 * 2**20 = 499122176 < 500M

From the k8s documentation:

   Claims will remain unbound indefinitely if a matching volume does not
   exist. Claims will be bound as matching volumes become available. For
   example, a cluster provisioned with many 50Gi PVs would not match a
   PVC requesting 100Gi. The PVC can be bound when a 100Gi PV is added
   to the cluster.

which is inline with the behavior observed in which a 500M PVC is never
bound. However, the documentation also states:

   If a PV was dynamically provisioned for a new PVC, the loop will
   always bind that PV to the PVC. Otherwise, the user will always get
   at least what they asked for

which suggests that an _explicit_ binding can be created, and perhaps
something has changed with respect to this binding that has caused the
failures in newer versions of k8s.

fixes: #3391
fixes: #2922

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2019-07-08 10:20:03 -07:00
Noah Watkins c2dbb93096 ceph: simplify the ceph command execution interface
this adds a structure to hold various settings related to executing ceph
cli commands, and introduces a common interface for configuring and
running such commands.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2019-05-06 10:10:05 -07:00
travisn 531da9647c ceph: rely on ceph image creation success instead of rbd get info
Nautilus has an issue targeting Luminous when running the rbd info command.
Rook already has the info it needs for the call and can return it
after the rbd create command succeeds.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-03-20 15:15:36 -06:00
Alexander Trost ac19f85fbb Allow specifying custom Ceph user and secret name for mounting
Introduce mount security mode for basic multi tenancy

Fixes #2164.

This adds three new parameters/options to StorageClass/flexvolume entry:
* `mountUser`
* `mountSecret`
* `mountSecretNamespace`

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2018-12-04 20:17:15 +01:00
Bogdan Luca 93e4e8ddcb ceph: use "rbd info" to get image info after creating it
Signed-off-by: Bogdan Luca <luca.bogdan@gmail.com>
2018-11-03 17:19:18 +02:00
Ganesh Maharaj Mahalingam b8c7e151bc use return error code instead
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2018-09-08 15:23:28 -07:00
Ganesh Maharaj Mahalingam ff9230a10f PVC create resiliency
While creating a PVC, if the operator dies between successfully creating a rbd
image and associating it with a PV, that PVC will never be completed. A
restarted operator will also fail to complete the task as the requested rbd
image already exists. With the assumption that a PVC UID will always be unique,
this patch will try to use the existing volume and complete the PVC request.

Resolves: #2072

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2018-09-07 15:34:59 -07:00
Dennis Chen 25086c01ad Roundup the size of the RBD volume image
Current code will truncate the generated RBD image in some cases,
this PR will round up the size to make sure the final RBD image
generated can cover all the required data space.

Also, corresponding unit test cases added to verify the change.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2018-08-29 11:10:07 +08:00
Alexander Trost 2080330539 Add dataPool parameter to StorageClass
This change allows block storage to use a given Ceph pool for it's data.

Fixes #1733

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2018-08-17 16:28:08 +02:00
Travis Nielsen 0298d1fb29 completed conversion for k8s 1.8 client conversion
move core rados packages under cluster folder

move daemons under daemon pkg

rename flex crd package to attachment

pin dep to k8s 1.8.2
2017-12-11 14:35:07 -08:00