Commit Graph

1735 Commits

Author SHA1 Message Date
Madhu Rajanna
d928782ebf deploy: add missing " for nodes watch verb
add missing " for nodes watch verb in
clusterrole binding

fixes #1433

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-25 06:09:35 +00:00
Madhu Rajanna
38892c3068 rbd: rearrange the cleanup order incase clone fails
in case of clone failure, we need to first delete
the clone and the snapshot from which we created
the clone, then as part of cleanup we need to remove
the temporary cloned image and the temporary snapshot
created on the parent image.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-24 08:16:59 +00:00
Madhu Rajanna
a7b65087af rbd: fix return error message
incase of flattening error return the
flatten error.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-24 08:16:59 +00:00
Madhu Rajanna
d5c19954c1 e2e: add backend image validation for rbd
validate backend rbd images count in each
E2E test cases. This helps a lot to catch
the issues in each test case.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-24 08:16:59 +00:00
Yug
843ea1ce31 doc: Correct cli arguments matrix
Correct the matrix for deploy-rbd document.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-24 07:12:42 +00:00
Yug
2d050e3ff0 doc: correct the cli arguments matrix
The current matrix seems to be showing
the undesired values which is corrected
with this commit.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-24 07:12:42 +00:00
Yug
c73fa55b97 doc: Add step to verify if PVC is in Bound State
Verify if PVC is in Bound state before it's
snapshot is created.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-24 07:12:42 +00:00
Yug
d9c8b07b84 doc: Correct title of capabilities doc
Correct capabilities doc with minor nits.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-24 07:12:42 +00:00
Yug
e3fb20de21 doc: Correct minor nits
Correct development-guide doc with minor
nit picks.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-24 07:12:42 +00:00
Yug
f74922fe57 doc: Correct static-pvc doc
Correct minor nit in static-pvc doc.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-24 07:12:42 +00:00
chenxu1990
670c3b6d23 deploy: update the default configmap value of helm chart
update the configmap from ceph-csi-config-cephfs and ceph-csi-config-rbd to ceph-csi-config

Signed-off-by: chenxu1990 <xuchen1990xx@gmail.com>
2020-08-21 06:42:10 +00:00
Madhu Rajanna
2808d526bb rebase: update go-ceph to v0.5.0
as go-ceph is 0.5.0 is released updating
the dependency to latest release.
more info about release at
https://github.com/ceph/go-ceph/releases/tag/v0.5.0

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-21 05:48:53 +00:00
Prasanna Kumar Kalever
5f6fec5f0a cleanup: remove deprecated vm-driver option
$ minikube start --help
...
    --vm-driver='': DEPRECATED, use `driver` instead.
...

'vm-driver' option is deprecated at minikube v1.8.0, we should really
start using 'driver'

Related: https://github.com/kubernetes/minikube/pull/6888

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-08-20 17:41:05 +00:00
Prasanna Kumar Kalever
21ff9420fc ci: update minikube if latest version exists
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-08-20 16:58:09 +00:00
Prasanna Kumar Kalever
669b4ac063 ci: remove the minikube version check
Problem:
-------

$ minikube version
minikube version: v1.12.2
commit: be7c19d391302656d27f1f213657d925c4e1cfc2-dirty

$ ./scripts/minikube.sh up
installed minikube version v1.12.2 is not matching requested version latest

Here v1.12.2 is the latest version of minikube, but the script simply bails out.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-08-20 16:58:09 +00:00
Prasanna Kumar Kalever
e3e38ae758 ci: fix indentation in minikube script
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-08-20 16:58:09 +00:00
Prasanna Kumar Kalever
c98cc68f9d ci: reorder function declaration in minikube script
In this script we defined all the functions at the top and then started
with executable commands (entry points to script start).

Only this function is odd in the script unlike the rest of them, defined
in between the execution sequence taking away the readability.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-08-20 16:58:09 +00:00
Madhu Rajanna
ce93c02525 rebase: update golang version to v.1.15
as the  golang v1.15 is released,updated cephcsi
golang version to 1.15

kubernetes 1.19 is going to be built with
golang 1.15 see https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.19.md#api-change
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-20 14:44:09 +00:00
Yug
28f02cefa2 doc: Add missing keyword in static-pvc doc
The keyword `clusterID` was missing in a
couple sentences; which can be added for
better understanding.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-20 08:36:36 +00:00
Madhu Rajanna
d77b23e3c1 ci: change snapshotter default version to v2.1.1
we cannot depend on the master branch of external-snapshotter
in cephcsi as the master branch can change anytime. its
good to use released tags to our E2E.

fixes: #1416

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-20 06:14:10 +00:00
Yug
fcb2bcdb12 ci: skip functional tests for pre-commit config yaml
Skip functional tests for changes in `.pre-commit-config.yaml`.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-20 05:28:54 +00:00
Madhu Rajanna
0bd45a5eb1 cephfs: use string const for cli error comparison
we should not return the CLI errors in GRPC errors
we need to return proper readable error messages
to the user for better understanding and better
debugging.

updates #1242

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-19 17:09:12 +00:00
Yug
78c1e781be doc: Add steps to set up git hook
Provide steps to install and set up
git hook locally.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-19 16:01:16 +00:00
Yug
6287f6c6ec ci: Add pre-commit hook to catch issues locally
The Git hooks force the developers to satisty
certain rules before commiting changes(locally).

Following checks will be run before allowing developers
to commit changes:
1. Check if the commit message has a valid sign-off.
2. Catch gofmt issues, if any.
3. Verify syntax of yaml and json files.(if present)
4. Makes sure that files end in a new line.
5. Trims trailing whitespace.
6. Run commitlint check on the commit message.

The developers will not be allowed to commit changes
without satisfying the above mentioned rules; This will
inturn help in avoiding failures on CI.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-19 16:01:16 +00:00
Madhu Rajanna
27d2cc644d util: replace klog with util logger in liveness.go
replace klog with util logger in liveness.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-19 14:38:12 +00:00
Madhu Rajanna
ed289fea5e journal: replace klog with util logger in voljournal.go
journal: replace klog with util logger in voljournal.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-19 14:38:12 +00:00
Madhu Rajanna
1a9cd23f64 journal: replace klog with util logger in omap.go
replace klog with util logger in omap.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-19 14:38:12 +00:00
Madhu Rajanna
7c9fee17af rbd: replace klog with util logger in snapshot.go
rbd: replace klog with util logger in snapshot.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-19 14:38:12 +00:00
Madhu Rajanna
9305e27797 rbd: replace klog with util logger in rbd_util.go
rbd: replace klog with util logger in rbd_util.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-19 14:38:12 +00:00
Madhu Rajanna
90cc5a4fd0 rbd: replace klog with util logger in rbd_journal.go
replace klog with util logger in rbd_journal.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-19 14:38:12 +00:00
Madhu Rajanna
9512aa6206 rbd: replace klog with util logger in rbd_attach.go
replace klog with util logger in rbd_attach.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-19 14:38:12 +00:00
Madhu Rajanna
e768c0dfc0 rbd: replace klog with util logger in nodeserver.go
replace klog with util logger in nodeserver.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-19 14:38:12 +00:00
Madhu Rajanna
883485b082 rbd: replace klog with util logger in driver.go
replace klog with util logger in driver.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-19 14:38:12 +00:00
Madhu Rajanna
c4f30c23c1 rbd: replace klog with util logger in clone.go
replace klog with util logger in clone.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-19 14:38:12 +00:00
Madhu Rajanna
d8ca56fbe9 rbd: replace klog with util in controllerserver.go
replace klog with util in controllerserver.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-19 14:38:12 +00:00
Humble Chirammal
1f5b84745f rbd: Bail out from nodeexpansion if its block mode pvc
At CSI spec < 1.2.0, there was no volumecapability in the
expand request. However its available from v1.2+ which allows
us to declare the node operations based on the volume mode.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-08-19 12:34:20 +00:00
Prasanna Kumar Kalever
e9d5e731dc build: change default to use podman
With '# make image-cephcsi GOARCH=amd64'
On Fedora observed errors like:

 ---> Running in 3e2dbf48ebc6
OCI runtime create failed: this version of runc doesn't work on cgroups
v2: unknown
make: *** [Makefile:175: image-cephcsi] Error 1

hence it is recommended to switch to podman if available.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-08-19 11:52:10 +00:00
Madhu Rajanna
52243d0140 ci: error out for invalid component in commit header
if the commit header is not present in the list of
the component we maintain. the commitlint check should
show error instead of showing the warning.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-19 11:08:31 +00:00
Niels de Vos
fb9ae06b1f ci: mark .commitlintrc.yml as doc-only
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-19 09:58:34 +00:00
Madhu Rajanna
cc0f0b8a6a deploy: remove unnecessary aggregate clusterroles
The aggregate clusterrole were designed for the scenario where
the rules are not completely owned by one component.
the aggregate rules can be removed and simplify
certain issues around upgrades.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-19 09:30:17 +00:00
Niels de Vos
b66390ee06 ci: do not require commitlint before merging
The GitHub commitlint App does not get triggered for new or updated PRs
since the last days. It is possible to manually start a test in the
CentOS CI for this with `/test commitlint`, but Travis CI already
includes a test (as part of "static-checks") too. There is no need to
run the tests 2x, so remove the status check from the Mergify
configuration.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-19 13:45:40 +05:30
Prasanna Kumar Kalever
404ee73dcd cleanup: fix cmd in container img building errmsg
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-08-19 07:06:28 +00:00
Niels de Vos
6d5456cc77 ci: use FETCH_HEAD like "commitlint --from" does
After fetching the target branch for the PR, the GIT_SINCE ref in the
git repository may not be set (in CI environments). This causes 'git
rebase' to fail. Use FETCH_HEAD instead, so that the checked out PR gets
rebased correctly.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-18 14:34:08 +00:00
Niels de Vos
104203ed03 ci: pass REBASE=1 to have commitlint rebase the branch
When Mergify adds a merge commit to the branch that is being tested with
commitlint, the tool tries to detect the most recent changes based on
the newly merged commit. This is for most PRs the master branch, and
that contains incorrect commit messages in the history. Because of this,
commitlint will fail.

By adding an option (REBASE=1) to the commitlint make target, CI jobs
can request a rebase so that the history of the PR becomes linear again
and commitlint should be able to detect only the new commits.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-18 14:34:08 +00:00
Niels de Vos
aca606ca42 build: add .test-container-id to .gitignore
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-18 14:34:08 +00:00
Niels de Vos
84b7e7b11c build: store detected container-cmd to prevent rebuilds
The 'need-container-cmd' make target is marked as .PHONY which will
cause it to be run every time. That triggers a rebuild of the container
images, even when that is not required.

By removing the 'need-container-cmd' target from .PHONY, and storing the
contents of CONTAINER_CMD in .container-cmd, unneeded rebuilds are
prevented.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-18 14:34:08 +00:00
Madhu Rajanna
787ba69089 cephfs: fix lock release in volumeDelete
currently the lock is not released which is
taken on the request name. this is causing issues
when the subvolume is requested for delete.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-18 06:12:43 +00:00
Madhu Rajanna
31c7c95fdb cephfs: check error output contains Error: ENOENT
execCommandErr returns both error and stderror
message. checking strings.HasPrefix is not helpful
as the stderr will be the first string. its good
to do string comparison and find out that error
is volume not found error.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-18 06:12:43 +00:00
Niels de Vos
25899b0123 ci: do not constantly rebase PRs
It seems the 'rebase' action in Mergify causes each PR to be
automatically rebased once there is a change in the target branch. This
causes a very high load on the CI, which delays other PRs from getting
their test results.

Remove the 'rebase' action, as it does not work as intended. The
expectation was that '@mergifyio rebase' uses the configuration.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-17 16:23:12 +05:30
Niels de Vos
b881ef1eee ci: prevent Mergify from doing merge commits
Merge commits cause the CentOS CI commitlint job to fail. By configuring
Mergify to not do merge commits, but rebases before final testing, we
can use the CentOS CI commitlint job when the GitHub commitlint App does
not work.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-17 16:23:12 +05:30