When a user or a bucket does not exist anymore, let's stop the reconcile
loop instead of waiting forever.
Also, unlink the user before deleting it otherwise the deletion fails.
Signed-off-by: Sébastien Han <seb@redhat.com>
When Rook-Ceph is connected to an external cluster and the admin tries
to create resources such as CephFilesystem or CephObjectStore, we must
create the rook-ceph-config secret so that the daemons can get their mon
information.
Closes: https://github.com/rook/rook/issues/5439
Signed-off-by: Sébastien Han <seb@redhat.com>
The activation of the lvs for OSDs had an invalid
argument to vgchange. The invalid argument is now reverted
to enable the OSDs in this scenario again.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
An OSD on a PVC when portable=false is assigned to a node
with a node selector. The same node assignment is expected
for the lifetime of the cluster. On subsequent reconciles,
the operator was looking up the node assignment from the
nodeName on the pod spec, which is not set if the pod is down.
The operator needs to retrieve the assignment from the
deployment spec node selector.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
ceph gid (167) provided as supplymentary group, so that all the mounts can
be accessed by the same. This is required for ssl certificate consumed by
the rgw server from ceph octopus onwards.
Closes: https://github.com/rook/rook/issues/5265
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
For multipath devices, ceph-volume inventory is failing
to detect that the device is available, complaining about
insufficient space. Instead of relying on c-v inventory
to determine if the device is available, just call
c-v raw list to determine if there is already an osd
configured on the pv. Otherwise, just attempt to configure
the OSD.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
Add mpath to the list of supported device types,
although it will only work for OSDs on PVCs.
OSDs on a raw device without PVCs have not
yet been tested.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
When an OSD pod is stuck in terminating state, there is no need
to check if the OSD is marked as out before force deleting.
As long as the osd is down we will force delete the pod.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
If ROOK_CSI_ALLOW_UNSUPPORTED_VERSION=false and the csi canary image
is set to quay.io/cephcsi/cephcsi:canary, the csi driver fails
to load as expected since it is not supported. But if the
flag is set to true, it is expected to allow the canary image
which isn't versioned. The supported version check was requiring
that the version be detected in the image.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
There are many duplicated code to judge whether an OSD is on PVC
or not. Instead, let's introduce a function for this purpose.
It can also be applied to the logic of judging whether an OSD
on PVC has metadata device or not.
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
provide an option to set PriorityclassName on the
CSI provisioner pods to avoid pod eviction, as the CSI provisioner
pods a critical in system for storage. the default value
for the CSI provisioner pods is set to system-cluster-critical.
provisioner pods are less priority than plugin pods.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
ceph mds deactivate is not valid command for Nautilus, changing the mechnaism of upgrading so that it can be done in the way Nautilus does it.
Closes: https://github.com/rook/rook/issues/5278
Signed-off-by: RAJAT SINGH <rajasing@redhat.com>
The operator settings can come either from the configmap, an
env var, or a default value. Knowing where the setting is loaded
from is an important detail to see in the log.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
If we fail to release an LVM device, we should not fail the deployment.
We just print the error and let the backend handle the rest. Some
CSI backend will force detach the device anyway.
This prevents the deployment to get stuck in terminating.
Signed-off-by: Sébastien Han <seb@redhat.com>
cephcsi v2.1.1 is released with fix for xfs formatting
issue. This PR updates the cephcsi image version to
v2.1.1
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
If the OSD pod is portable and is on a failed node, the node
will be stuck indefinitely in the terminating state. The pod
can be force deleted in this scenario in order to allow the
underlying volume to be detached and then mounted on another
node.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
Update CSI spec code to fetch the resources from the
configmap or ENV and apply the specific resources
to the cephfs,rbd and kubernetes sidecar containers.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
During the sgdisk command test, there was no output assignment,
causing uuid not found for device /dev/testa. Follow the log.
2020-04-27 18:24:21.921337 I | rook-discover: RUN Command lsblk
[--all --noheadings --list --output KNAME]
2020-04-27 18:24:21.921491 I | rook-discover: RUN Command lsblk
[/dev/testa --bytes --nodeps --pairs --paths --output SIZE,ROTA,
RO,TYPE,PKNAME,NAME]
2020-04-27 18:24:21.921549 I | rook-discover: RUN Command sgdisk
[--print /dev/testa]
2020-04-27 18:24:21.921576 W | inventory: skipping device "testa"
because 'lsblk' failed. uuid not found for device /dev/testa. output=
2020-04-27 18:24:21.921592 I | rook-discover: localdevices: []
2020-04-27 18:24:21.921598 I | rook-discover: available devices: []
--- FAIL: TestProbeDevices (0.00s)
discover_test.go:95:
Error Trace: discover_test.go:95
Error: Not equal:
expected: 1
actual : 0
Test: TestProbeDevices
panic: runtime error: index out of range [0] with length 0 [recovered]
panic: runtime error: index out of range [0] with length 0
FAIL github.com/rook/rook/pkg/daemon/discover 0.050s
Signed-off-by: Haichao Li <haichao.li@arm.com>
YamlToContainerResource can be used to convert the raw
string data to the array of ContainerResource.
the ContainerResource can be applied to the
pod container resources request and limits.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This is the final conversion to controller-runtime conversion. This time the
CephCluster CRD has been converted to use the controller-runtime
library.
The controller incorporates all the previous watchers too, so the Node
and hot-plug configmap are been watched too.
Only the operator setting configmap is not being watcher since it's not
related to the CephCluster CRD.
Not only the patch converts to controller-runtime but also tries to
re-organize the tree of the repo to actually make the code more
readable and have better functions/methods/tests separations.
Closes: https://github.com/rook/rook/issues/4939
Signed-off-by: Sébastien Han <seb@redhat.com>
Remove specific mds config added to the mon configuration database when deleting a CephObjectstore
or when scaling down number of mds
Also remove mds CephX key
Signed-off-by: n.fraison <n.fraison@criteo.com>
There are some code where constants of environment variables
are defined but not used properly. Let's avoid to use string
literals as possible.
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
When the metadataDevice is specified, it was a regression that it was
being interpreted also as a data device. ceph-volume was failing
when the metadataDevice was added as both a data and metadata device.
So we ensure it is not added to the list of data devices.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
The name of a CephCluster is commonly the same as the namespace,
but not always. When looking up the ceph cluster we can look for
the first one in the namespace rather than requiring the name
to be the same as the namespace.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>