Commit Graph
7961 Commits
Author SHA1 Message Date
Sébastien Han 5662911317 ceph: fix set osd prepare resources
Use the right struct field. Previously it was pointing to the osd global
resource now it does the osd prepare.

Closes: https://github.com/rook/rook/issues/4182
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-10-25 10:55:25 +02:00
Sébastien Han 30d019acf0 Merge pull request #4066 from nizamial09/designcondition
Added a design document which explains the use of Conditions in the r…
2019-10-25 10:21:35 +02:00
Sébastien Han 07f9780396 Merge pull request #4179 from travisn/nfs-owner-ref
NFS: Set correct owner reference for garbage collection
2019-10-25 10:21:06 +02:00
Sébastien Han 6839b66b83 Merge pull request #4092 from S-Corkum/chart-image-update
update helm chart image
2019-10-25 10:17:33 +02:00
Sébastien Han 3c3843e9cb Merge pull request #4184 from travisn/mon-failover-test
Improve reliability of the Ceph mon failover test
2019-10-25 10:16:53 +02:00
Sébastien Han 1f783041b2 Merge pull request #4180 from travisn/flex-attach
Flex driver should not allow attach before detach on a different node
2019-10-25 10:13:31 +02:00
Travis Nielsen f5b032ad8e ceph: improve reliability of mon failover test
Depending on the state of the orchestration, the operator might trigger
re-creation of the deleted mon. In this case, consider the test successful
rather than wait for the failover which will never occur.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-10-24 18:55:01 -06:00
Travis Nielsen f7d7aa0b7f ceph: flex driver should not allow attach before detach
If a volume is being attached, it should be verified that the volume
is safe to attach. The volume was assumed to be safe to attach if it was
for the same pod. But this was assuming the pod of the same name would be
on the same node. This is true for pods created from deployments, but not
for pods that are part of a stateful set. A stateful set will maintain the
pod name even as the pod is failed over to a new node. Therefore, the fencing
much check if the pod is from the same node before allowing the attach to
continue. Otherwise, we need to wait for the volume to be detached from the
other node.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-10-24 16:55:57 -06:00
Travis Nielsen 092b046f2c Merge pull request #4168 from leseb/use-quorum_status
ceph: use quorum_status instead of mon_status
2019-10-24 16:14:42 -06:00
Travis Nielsen 8b8448b543 Merge pull request #4173 from Yisaer/add_label_for_csi_component
ceph: add label for CSI deployments/daemonsets/statefulsets
2019-10-24 16:05:12 -06:00
Travis Nielsen fa834d9a20 nfs: set correct owner reference name for garbage collection
The owner reference for the NFS custom resource was using the namespace
instead of the name. This causes the k8s garbage collector to remove the
nfs resources in some scenarios such as restarting etcd.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-10-24 14:24:45 -06:00
Travis NielsenandSean Corkum 8787a86b3c ceph: update the image in the helm chart
The image in the helm chart was broken. The url
needs to be updated to the new location for the rook
image.

Co-authored-by: Sean Corkum <seancorkum81@gmail.com>
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-10-24 11:36:36 -06:00
Song Gao 8d0e6ea36d ceph: add label for CSI deployments/daemonsets/statefulsets
Add rook version label to CSI deployments/daemonsets/statefulsets just as the Ceph daemons.

Signed-off-by: Song Gao <2695690803@qq.com>
2019-10-24 23:42:45 +08:00
Sébastien Han 5b8388ee36 Merge pull request #4171 from leseb/revert-pr-4169
ceph: revert "CSI: Add support for CSIDriver object creation"
2019-10-24 12:36:37 +02:00
Sébastien Han 98bc8e4ca0 ceph: revert "CSI: Add support for CSIDriver object creation"
I merged https://github.com/rook/rook/pull/4169 too quickly and didn't
noticed we were supposed to wait for csi 1.2.2.

This reverts commit 520ad44d71.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-10-24 12:30:11 +02:00
Sébastien Han 59a507874c Merge pull request #4169 from Madhu-1/csi-driver-obj
CSI: Add support for CSIDriver object creation
2019-10-24 12:19:32 +02:00
Madhu Rajanna 520ad44d71 CSI: Add support for CSIDriver object creation
This will be helpful to list the CSI drivers deployed
in the kubernetes cluster. if we have N number of
CSI drivers deployed in the cluster, the user can
query kubectl get csidriver and get  the list of
registered CSI drivers and it requires kube 1.14+
and also the functionality is disabled by default

More info here: https://github.com/ceph/ceph-csi/pull/698

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-10-24 15:08:26 +05:30
Sébastien Han aa9f408822 ceph: use quorum_status instead of mon_status
In Octopus, this commit
https://github.com/ceph/ceph/pull/30859/commits/c09b82a80a392ccd0da7677c7b424ce5cd3fa5d6
moved the quorum_status command to a socket call. Thus, the `ceph
quorum_status` command does not exist anymore, to use it we need to do
`ceph daemon mon.$ID quorum_status`. However, this command only works
locally so it won't work if we run it from the operator.
The `ceph mon_status` command is a general command that run from
anywhere and returns the mon map, let's use this one on the operator
code.
This is not a breaking change.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-10-24 11:27:52 +02:00
Nizamudeen 9a0a3d4070 ceph: Design document which explains the use of Conditions
Signed-off-by: Nizamudeen <nia@redhat.com>
2019-10-24 11:04:18 +05:30
Travis Nielsen 0178724425 Merge pull request #4033 from travisn/mgr-module-async
Run the mgr module configuration asynchronously
2019-10-23 12:28:01 -06:00
Travis Nielsen 132c85f4c2 Merge pull request #4161 from travisn/remove-osd-conf-flag
ceph: osd remove --conf flag
2019-10-23 12:27:17 -06:00
Sébastien Han 9f053ca4e1 ceph: osd remove --conf flag
Even legacy osds were still running with this flag. In my previous patch
I was trying to minimize the impact of the change and was afraid the
config file was holding important information but that appears not to be
true.

The only option in the config could have the keyring path, but it's
passed in the CLI startup line.

Closes: https://github.com/rook/rook/issues/4063
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-10-23 11:43:28 -06:00
travisn 9d94245918 ceph: configure mgr modules asynchronously
The mgr modules take some time to run and have also been known
to hang. While the hang issues should have been resolved separately,
an improvement is still to allow the configuration to happen
in parallel for unrelated modules. All of the module configuration
will be completed before continuing with osd configuration
in order to keep the logging simpler.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-23 11:38:00 -06:00
travisn 9777b7374b ceph: correct log message for watching pools
The pools always claimed to be watching all namespaces
when in fact only a single namespace is watched for pools.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-23 11:32:24 -06:00
travisn a64b604b4a ceph: improved log message for retry interval
The retry interval was showing an incorrect message in the
log

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-23 11:32:21 -06:00
Travis Nielsen 766a0a81a2 Merge pull request #4021 from travisn/restore-cluster
Enable restoring a cluster after disaster recovery
2019-10-23 11:18:06 -06:00
Travis Nielsen 733eed9461 Merge pull request #3996 from sp98/fix-operator-reconcile
fix operator reconcile to restart osd daemons
2019-10-23 10:09:54 -06:00
Travis Nielsen cbeabbf1e4 Merge pull request #4116 from rohan47/removeOSDsIfOutAndSafeToRemove
Ceph: Added removeOSDsIfOutAndSafeToRemove to Cluster CR
2019-10-23 08:52:37 -06:00
Santosh Pillai 8ea693a740 ceph: fix operator reconcile to restart osds daemons
OSD on PVC does not upgrade when the user upgrades the ceph version on cluster-on-pvc yaml.
The solution incudes:
   - upgrade osd prepare and daemon pods on upgrade
   - skip c-v prepare if filesystem is already present on the pvc device.
   - skip lvm release in case of upgrade.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2019-10-23 16:56:15 +05:30
rohan47 7f9611d489 Ceph: Added removeOSDsIfOutAndSafeToRemove to Cluster CR
OSDs can be removed automatically with the current mechanism if a new
setting removeOSDsIfOutAndSafeToRemove is set to true. The default for
all new or upgraded clusters should be false.

Signed-off-by: rohan47 <rohgupta@redhat.com>
2019-10-23 15:10:36 +05:30
travisn 53812c0039 ceph: create missing mon deployments without waiting for quorum
If mon deployments need to be created, the operator should
go ahead and create all of them instead of waiting for quorum
in between checking each mon. In particular, if a cluster is
being restored in a disaster recovery situation, none of the mons
deployments will exist. All of them should be created before
checking for quorum.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-22 15:13:25 -06:00
travisn a72a981642 ceph: mgr modules requests should timeout
Requests to enable mgr modules or call mgr modules should
timeout rather than hang. For example, if creating a self
signed cert request hangs, the mgr should continue with other
actions in the orchestration

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-22 15:13:25 -06:00
Sébastien Han b7d8338d0c Merge pull request #4086 from leseb/csi-user-priv
ceph: rework csi keys and secrets
2019-10-22 16:55:46 +02:00
Sébastien Han fcc2e21faf ceph: rework csi keys and secrets
We know create 4 secrets containing 4 ceph keys where each of them have
limited permissions to access the cluster.

Closes: https://github.com/rook/rook/issues/4074
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-10-22 15:14:28 +02:00
Sébastien Han b3701c5c7e ceph: use golang convention on var name
Variables in Go must be fooBar instead of foo_bar.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-10-22 15:14:28 +02:00
Sébastien Han eafc2a477e ceph: do not enable app on pool
The command `fs new` already enable the application pool settings for
the cephfs pools so we don't need to run that command again.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-10-22 15:14:28 +02:00
Sébastien Han eccea9fa05 ci: more debug
When we give up on waiting for the pod to be running which describe it
to see what's wrong.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-10-22 15:14:28 +02:00
Sébastien Han 3a2921e747 Merge pull request #4135 from mcluseau/fix-part-label
fix: PARTNAME override ID_PART_ENTRY_NAME
2019-10-22 09:53:34 +02:00
Travis Nielsen f2e44b284d Merge pull request #3914 from travisn/test-k8s-1.16
Add k8s 1.16 to the integration test matrix
2019-10-21 22:13:50 -06:00
Mikaël Cluseau 0267433484 fix: PARTNAME override ID_PART_ENTRY_NAME
When both PARTNAME and ID_PART_ENTRY_NAME are specified, rook takes
PARTNAME in account, overriding ID_PART_ENTRY_NAME. As PARTNAME is not
always updated by the kernel after sgdisk --change-name, it's better to
do the opposite. It also makes GetDevicePartitions coherent with
parsePartLabel (called by GetPartitionLabel).

Signed-off-by: Mikaël Cluseau <mikael.cluseau@gmail.com>
2019-10-22 09:23:48 +11:00
travisn 4397974762 ceph: reduce verbose logging checking for clean PGs
Checking for clean PGs is a recurring event when reconciling nodes
for upgrades and fencing. No need to log every request.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-21 12:47:47 -06:00
Sébastien Han 1081c58423 Merge pull request #4009 from sp98/add-k8s-version-check
[OSD on PVC] add kubernetes version check.
2019-10-21 11:23:01 +02:00
travisn 879971f19a ceph: create object user immediately if obj store available
Creating an object user was always waiting at least 15 seconds before
attempting to create the user. With this change the operator will check
immediately if the object store is already initialized instead
of waiting for the initial 15 seconds delay to elapse.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-19 22:46:17 -06:00
travisn 4ef3ffb8e4 test: add k8s 1.16 to the integration test matrix
With the desire to run the integration tests on the five
most recent versions of K8s, 1.16 is added and 1.11
is removed from the integration test matrix.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-19 12:46:01 -06:00
travisn d6fe7cec5a helm: configure for k8s 1.16 or newer
Helm requires some changes to be compatible with k8s 1.16.
The deployment needs to use v1 apiVersion and a selector
needs to be added. A tiller service account is also required.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-19 12:46:01 -06:00
travisn 64dce0c4e4 ceph: prevent object user test from crashing on failure
Require retrieving the user to succeed or else abort the
object integration test

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-19 12:46:00 -06:00
travisn c4210237cb tests: update tests for apps/v1 apiVersion
K8s 1.16 requires apps/v1 instead of the old extensions/v1beta1 for the
apiVersion of the deployment. The tests were failing when testing on
K8s 1.16 without this change

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-19 12:46:00 -06:00
Travis Nielsen b759b40364 Merge pull request #4061 from hasheddan/viewyugabytedash
yugabyte docs: add directions on how to access yugabytedb dashboard
2019-10-18 14:09:53 -06:00
hasheddan 9a39c0542f docs: add directions on how to access yugabytedb dashboard using port-forwarding
enhancement to docs to make visualizing the yugabytedb cluster easier

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2019-10-18 14:45:43 -05:00
Travis Nielsen 150b5b6edb Merge pull request #4083 from leseb/resource-osd-prepare
ceph: expose prepare pod resource limits
2019-10-18 10:36:38 -06:00