Skip to content

Commit c451a30

Browse files
Merge RC branch 'release/v0.6.0'
2 parents be7eb17 + 7c7f7b4 commit c451a30

File tree

250 files changed

+22965
-12360
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

250 files changed

+22965
-12360
lines changed

Cargo.lock

Lines changed: 2228 additions & 510 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[patch.crates-io]
2-
h2 = { git = "https://github.com/gila/h2", branch = "v0.2.6"}
2+
h2 = { git = "https://github.com/gila/h2", branch = "v0.2.7"}
33
partition-identity = { git = "https://github.com/openebs/partition-identity.git" }
44

5+
[profile.dev]
6+
panic = "abort"
7+
58
[workspace]
69
members = [
710
"csi",
@@ -11,4 +14,9 @@ members = [
1114
"nvmeadm",
1215
"rpc",
1316
"sysfs",
17+
"services",
18+
"mbus-api",
19+
"composer",
20+
"rest",
21+
"operators",
1422
]

Jenkinsfile

Lines changed: 42 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
#!/usr/bin/env groovy
22

3+
// Will ABORT current job for cases when we don't want to build
4+
if (currentBuild.getBuildCauses('jenkins.branch.BranchIndexingCause') &&
5+
BRANCH_NAME == "develop") {
6+
print "INFO: Branch Indexing, aborting job."
7+
currentBuild.result = 'ABORTED'
8+
return
9+
}
10+
311
// Update status of a commit in github
412
def updateGithubCommitStatus(commit, msg, state) {
513
step([
@@ -20,10 +28,23 @@ def updateGithubCommitStatus(commit, msg, state) {
2028
])
2129
}
2230

31+
// Searches previous builds to find first non aborted one
32+
def getLastNonAbortedBuild(build) {
33+
if (build == null) {
34+
return null;
35+
}
36+
37+
if(build.result.toString().equals("ABORTED")) {
38+
return getLastNonAbortedBuild(build.getPreviousBuild());
39+
} else {
40+
return build;
41+
}
42+
}
43+
2344
// Send out a slack message if branch got broken or has recovered
2445
def notifySlackUponStateChange(build) {
2546
def cur = build.getResult()
26-
def prev = build.getPreviousBuild().getResult()
47+
def prev = getLastNonAbortedBuild(build.getPreviousBuild())?.getResult()
2748
if (cur != prev) {
2849
if (cur == 'SUCCESS') {
2950
slackSend(
@@ -41,25 +62,24 @@ def notifySlackUponStateChange(build) {
4162
}
4263
}
4364

65+
// Only schedule regular builds on develop branch, so we don't need to guard against it
66+
String cron_schedule = BRANCH_NAME == "develop" ? "0 2 * * *" : ""
67+
4468
pipeline {
4569
agent none
4670
triggers {
47-
cron('0 2 * * *')
71+
cron(cron_schedule)
4872
}
4973

5074
stages {
5175
stage('linter') {
5276
agent { label 'nixos-mayastor' }
5377
when {
5478
beforeAgent true
55-
anyOf {
56-
allOf {
57-
branch 'staging'
58-
not { triggeredBy 'TimerTrigger' }
59-
}
60-
allOf {
61-
branch 'trying'
62-
not { triggeredBy 'TimerTrigger' }
79+
not {
80+
anyOf {
81+
branch 'master'
82+
branch 'release/*'
6383
}
6484
}
6585
}
@@ -73,62 +93,43 @@ pipeline {
7393
stage('test') {
7494
when {
7595
beforeAgent true
76-
anyOf {
77-
allOf {
78-
branch 'staging'
79-
not { triggeredBy 'TimerTrigger' }
80-
}
81-
allOf {
82-
branch 'trying'
83-
not { triggeredBy 'TimerTrigger' }
84-
}
85-
allOf {
86-
branch 'develop'
87-
anyOf {
88-
triggeredBy 'TimerTrigger'
89-
triggeredBy cause: 'UserIdCause'
90-
}
96+
not {
97+
anyOf {
98+
branch 'master'
99+
branch 'release/*'
91100
}
92101
}
93102
}
94103
parallel {
95104
stage('rust unit tests') {
96105
agent { label 'nixos-mayastor' }
97106
steps {
107+
sh 'printenv'
98108
sh 'nix-shell --run "./scripts/cargo-test.sh"'
99109
}
100110
post {
101111
always {
102-
// temporary workaround for leaked spdk_iscsi_conns files
103-
sh 'sudo rm -f /dev/shm/*'
112+
// in case of abnormal termination of any nvmf test
113+
sh 'sudo nvme disconnect-all'
104114
}
105115
}
106116
}
107117
stage('mocha api tests') {
108118
agent { label 'nixos-mayastor' }
109119
steps {
120+
sh 'printenv'
110121
sh 'nix-shell --run "./scripts/node-test.sh"'
111122
}
112123
post {
113124
always {
114125
junit '*-xunit-report.xml'
115-
// temporary workaround for leaked spdk_iscsi_conns files
116-
sh 'sudo rm -f /dev/shm/*'
117126
}
118127
}
119128
}
120-
stage('nix tests') {
121-
agent { label 'nixos-mayastor-kvm' }
122-
steps {
123-
sh 'nix-build ./nix/test -A rebuild'
124-
sh 'nix-build ./nix/test -A fio_nvme_basic'
125-
sh 'nix-build ./nix/test -A nvmf_distributed'
126-
sh 'nix-build ./nix/test -A nvmf_ports'
127-
}
128-
}
129129
stage('moac unit tests') {
130130
agent { label 'nixos-mayastor' }
131131
steps {
132+
sh 'printenv'
132133
sh 'nix-shell --run "./scripts/moac-test.sh"'
133134
}
134135
post {
@@ -153,21 +154,9 @@ pipeline {
153154
when {
154155
beforeAgent true
155156
anyOf {
156-
allOf {
157-
branch 'master'
158-
not { triggeredBy 'TimerTrigger' }
159-
}
160-
allOf {
161-
branch 'release/*'
162-
not { triggeredBy 'TimerTrigger' }
163-
}
164-
allOf {
165-
branch 'develop'
166-
anyOf {
167-
triggeredBy 'TimerTrigger'
168-
triggeredBy cause: 'UserIdCause'
169-
}
170-
}
157+
branch 'master'
158+
branch 'release/*'
159+
branch 'develop'
171160
}
172161
}
173162
steps {

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# MayaStor
22

33
[![Releases](https://img.shields.io/github/release/openebs/Mayastor/all.svg?style=flat-square)](https://github.com/openebs/Mayastor/releases)
4-
[![CI-basic](https://mayastor-ci.mayadata.io/buildStatus/icon?job=Mayastor%2Fdevelop)](https://mayastor-ci.mayadata.io/blue/organizations/jenkins/Mayastor/activity/)
4+
[![CI-basic](https://mayastor-ci.mayadata.io/buildStatus/icon?job=Mayastor%2Fmaster)](https://mayastor-ci.mayadata.io/blue/organizations/jenkins/Mayastor/activity/)
55
[![Slack](https://img.shields.io/badge/JOIN-SLACK-blue)](https://kubernetes.slack.com/messages/openebs)
66
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fopenebs%2FMayaStor.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fopenebs%2FMayaStor?ref=badge_shield)
77
[![built with nix](https://builtwithnix.org/badge.svg)](https://builtwithnix.org)
@@ -110,7 +110,7 @@ buf.fill(0xff);
110110
// same IO. Put differently. A single IO becomes three IOs
111111
bd.write_at(0, &mut buf).await.unwrap();
112112

113-
// fill the buffer with zeroes and read back the data
113+
// fill the buffer with zeros and read back the data
114114
buf.fill(0x00);
115115
bd.read_at(0, &mut buf).await.unwrap();
116116

@@ -125,11 +125,11 @@ and they want the most simple (but fast) storage device. For a more elaborate ex
125125

126126
To communicate with the children, the Nexus uses industry standard protocols. Currently, the Nexus has support for
127127
direct access to local storage and remote storage using NVMF or iSCSI. The other advantage is that if you were to remove
128-
the Nexus out of the data path, you would still ba able to access your data as if Mayastor was not there.
128+
the Nexus out of the data path, you would still be able to access your data as if Mayastor was not there.
129129

130130
The Nexus itself does not store any data and in its most simplistic form the Nexus is a proxy towards real storage
131131
devices where the transport may vary. It can however, as mentioned, "transform" the data, which makes it possible to
132-
store copies of your data within different cloud systems. One of the other ideas we have is to write block device on top
132+
store copies of your data within different cloud systems. One of the other ideas we have is to write a block device on top
133133
of a S3 bucket such that you can create PVCs from [Minio](https://min.io/), AWS or any other compatible S3 bucket. This
134134
simplifies the replication model for the Nexus itself somewhat but creates a bit more on the buffering side of things.
135135
What model fits best for you? You get to decide!
@@ -169,10 +169,10 @@ vhost-user code can be seen in the link section (still in C).
169169
## Client
170170

171171
<p align="justify">
172-
Although that a client for gRPC server is not required for the product,
172+
Although a client for gRPC server is not required for the product,
173173
it is important for testing and troubleshooting. The client
174174
allows you to manage storage pools and replicas and just use `--help`
175-
option if not sure how to use it. CSI services are not covered by the client.
175+
option if you are not sure how to use it. CSI services are not covered by the client.
176176

177177
<p align="justify">
178178
In following example of a client session is assumed that mayastor has been

composer/Cargo.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[package]
2+
name = "composer"
3+
version = "0.1.0"
4+
authors = ["Tiago Castro <tiago.castro@mayadata.io>"]
5+
edition = "2018"
6+
7+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8+
9+
[dependencies]
10+
tokio = { version = "0.2", features = ["full"] }
11+
futures = "0.3.8"
12+
tonic = "0.1"
13+
crossbeam = "0.7.3"
14+
rpc = { path = "../rpc" }
15+
ipnetwork = "0.17.0"
16+
bollard = "0.8.0"
17+
18+
[dev-dependencies]
19+
tokio = { version = "0.2", features = ["full"] }

0 commit comments

Comments
 (0)