Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
871028e
HDDS-3612. Allow mounting bucket under other volume
adoroszlai May 20, 2020
2bfa1ed
handle links in listKeys
adoroszlai May 28, 2020
d87f2da
one more unused constant
adoroszlai Jun 2, 2020
472fd0d
Merge remote-tracking branch 'origin/master' into HDDS-3612-dev
adoroszlai Jun 8, 2020
61dfc59
HDDS-3612. Require only read permission on link bucket
adoroszlai Jun 8, 2020
9de1de5
HDDS-3612. Implement ozone sh bucket link
adoroszlai Jun 8, 2020
af149fd
HDDS-3612. More tests
adoroszlai Jun 8, 2020
04f7968
Merge remote-tracking branch 'origin/master' into HDDS-3612-dev
adoroszlai Jun 8, 2020
fe79677
Merge remote-tracking branch 'origin/master' into HDDS-3612-dev
adoroszlai Jun 9, 2020
8163c97
HDDS-3612. ACL tests
adoroszlai Jun 9, 2020
c8ba71a
Merge remote-tracking branch 'origin/master' into HDDS-3612-dev
adoroszlai Jun 9, 2020
3ba27b1
HDDS-3612. Fix checkstyle
adoroszlai Jun 10, 2020
406f42a
HDDS-3612. Fix unit tests
adoroszlai Jun 10, 2020
d9c5802
HDDS-3612. Fix integration test
adoroszlai Jun 10, 2020
82bf894
HDDS-3612. Extract ResolvedBucket
adoroszlai Jun 10, 2020
47a4d71
Merge remote-tracking branch 'origin/master' into HDDS-3612-dev
adoroszlai Jun 10, 2020
0154ec6
HDDS-3612. Handle more types of key request
adoroszlai Jun 10, 2020
4a4a502
Merge remote-tracking branch 'origin/master' into HDDS-3612-dev
adoroszlai Jun 10, 2020
e325dcf
HDDS-3612. Fix unit tests
adoroszlai Jun 10, 2020
bcd681c
Merge remote-tracking branch 'origin/master' into HDDS-3612-dev
adoroszlai Jun 15, 2020
c409d18
WIP - HDDS-3612. S3 acceptance tests for bucket links
adoroszlai Jun 15, 2020
74adcc4
WIP - fix multipart upload
adoroszlai Jun 15, 2020
7be9171
Fix MultipartUploadComplete
adoroszlai Jun 16, 2020
107de5b
Call s3 test twice instead of templates
adoroszlai Jun 16, 2020
e8719b7
fix checkstyle
adoroszlai Jun 17, 2020
e70c312
fix typo in acceptance test
adoroszlai Jun 17, 2020
e29ed9e
test s3 links in secure env
adoroszlai Jun 17, 2020
0682736
Merge remote-tracking branch 'origin/master' into HDDS-3612-dev
adoroszlai Jun 17, 2020
186d99e
Audit before bucket update, fix listStatus and lookupFile
adoroszlai Jun 17, 2020
da03cd8
HDDS-3094. Save each output of smoketest executed multiple times
adoroszlai Jun 18, 2020
a37e661
trigger new CI check
adoroszlai Jun 18, 2020
d79cf49
HDDS-3826. Split Ozone FS acceptance tests
adoroszlai Jun 18, 2020
305cbec
trigger new CI check
adoroszlai Jun 18, 2020
318e4c8
Merge branch 'HDDS-3826' into HDDS-3612-dev
adoroszlai Jun 19, 2020
b9f9ce4
run ozonefs acceptance tests for links, too
adoroszlai Jun 19, 2020
eb86150
Display source bucket in info
adoroszlai Jun 19, 2020
10ff2d6
Fix typo in S3 acceptance test
adoroszlai Jun 21, 2020
e9c4683
Fix setup for S3 tests with links
adoroszlai Jun 21, 2020
b62f418
Fix S3 acceptance setup for buckets
adoroszlai Jun 21, 2020
382e7bd
trigger new CI check
adoroszlai Jun 21, 2020
6da342c
trigger new CI check
adoroszlai Jun 21, 2020
5e4505a
trigger new CI check
adoroszlai Jun 21, 2020
dfcdc5f
Merge remote-tracking branch 'origin/master' into HDDS-3612-dev
adoroszlai Jun 21, 2020
89fc762
trigger new CI check
adoroszlai Jun 21, 2020
b51709d
Merge remote-tracking branch 'origin/master' into HDDS-3612-dev
adoroszlai Jun 22, 2020
3699f20
Merge remote-tracking branch 'origin/master' into HDDS-3612-dev
adoroszlai Jun 27, 2020
5806106
HDDS-3612. Handle links in new OMKeysDeleteRequest
adoroszlai Jun 28, 2020
277ce12
HDDS-3612. Reduce duplication in OMKeyRequest
adoroszlai Jun 30, 2020
30fe042
HDDS-3612. Sanity check for link in OMBucketCreateRequest
adoroszlai Jun 30, 2020
aff0c31
Merge remote-tracking branch 'origin/master' into HDDS-3612-dev
adoroszlai Jul 7, 2020
0799b5e
Merge remote-tracking branch 'origin/master' into HDDS-3612-dev
adoroszlai Jul 14, 2020
fc40b72
trigger new CI check
adoroszlai Jul 14, 2020
fbf04a3
Merge remote-tracking branch 'origin/master' into HDDS-3612-dev
adoroszlai Jul 14, 2020
f2a3f8f
HDDS-3612. Fix checkstyle
adoroszlai Jul 14, 2020
234a1e0
Merge remote-tracking branch 'origin/master' into HDDS-3612-dev
adoroszlai Jul 15, 2020
1dd8a0e
HDDS-3612. Change error code for infinite link loop
adoroszlai Jul 15, 2020
f5dbd53
HDDS-3612. S3 MPU: local var for volume/bucket; log resolved bucket, …
adoroszlai Jul 15, 2020
3241c4f
HDDS-3612. Delete bucket or link created in setup
adoroszlai Jul 15, 2020
73b3356
HDDS-3612. Change error code for infinite link loop - fixup
adoroszlai Jul 15, 2020
b820d44
trigger new CI check
adoroszlai Jul 15, 2020
272a6f4
trigger new CI check
adoroszlai Jul 15, 2020
717374e
HDDS-3612. openKeyName should be generated from resolved bucket
adoroszlai Jul 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ private OzoneConsts() {
public static final String BUCKET_ENCRYPTION_KEY = "bucketEncryptionKey";
public static final String DELETED_KEYS_LIST = "deletedKeysList";
public static final String UNDELETED_KEYS_LIST = "unDeletedKeysList";
public static final String SOURCE_VOLUME = "sourceVolume";
public static final String SOURCE_BUCKET = "sourceBucket";



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ public final class BucketArgs {
* Bucket encryption key name.
*/
private String bucketEncryptionKey;
private final String sourceVolume;
private final String sourceBucket;

/**
* Private constructor, constructed via builder.
Expand All @@ -62,15 +64,19 @@ public final class BucketArgs {
* @param acls list of ACLs.
* @param metadata map of bucket metadata
* @param bucketEncryptionKey bucket encryption key name
* @param sourceVolume
* @param sourceBucket
*/
private BucketArgs(Boolean versioning, StorageType storageType,
List<OzoneAcl> acls, Map<String, String> metadata,
String bucketEncryptionKey) {
List<OzoneAcl> acls, Map<String, String> metadata,
String bucketEncryptionKey, String sourceVolume, String sourceBucket) {
this.acls = acls;
this.versioning = versioning;
this.storageType = storageType;
this.metadata = metadata;
this.bucketEncryptionKey = bucketEncryptionKey;
this.sourceVolume = sourceVolume;
this.sourceBucket = sourceBucket;
}

/**
Expand Down Expand Up @@ -123,6 +129,14 @@ public static BucketArgs.Builder newBuilder() {
return new BucketArgs.Builder();
}

public String getSourceVolume() {
return sourceVolume;
}

public String getSourceBucket() {
return sourceBucket;
}

/**
* Builder for OmBucketInfo.
*/
Expand All @@ -132,6 +146,8 @@ public static class Builder {
private List<OzoneAcl> acls;
private Map<String, String> metadata;
private String bucketEncryptionKey;
private String sourceVolume;
private String sourceBucket;

public Builder() {
metadata = new HashMap<>();
Expand Down Expand Up @@ -161,13 +177,24 @@ public BucketArgs.Builder setBucketEncryptionKey(String bek) {
this.bucketEncryptionKey = bek;
return this;
}

public BucketArgs.Builder setSourceVolume(String volume) {
sourceVolume = volume;
return this;
}

public BucketArgs.Builder setSourceBucket(String bucket) {
sourceBucket = bucket;
return this;
}

/**
* Constructs the BucketArgs.
* @return instance of BucketArgs.
*/
public BucketArgs build() {
return new BucketArgs(versioning, storageType, acls, metadata,
bucketEncryptionKey);
bucketEncryptionKey, sourceVolume, sourceBucket);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ public class OzoneBucket extends WithMetadata {

private OzoneObj ozoneObj;

private String sourceVolume;
private String sourceBucket;

private OzoneBucket(ConfigurationSource conf, String volumeName,
String bucketName, ReplicationFactor defaultReplication,
Expand Down Expand Up @@ -138,18 +140,22 @@ private OzoneBucket(ConfigurationSource conf, String volumeName,
.setResType(OzoneObj.ResourceType.BUCKET)
.setStoreType(OzoneObj.StoreType.OZONE).build();
}

@SuppressWarnings("parameternumber")
public OzoneBucket(ConfigurationSource conf, ClientProtocol proxy,
String volumeName, String bucketName, StorageType storageType,
Boolean versioning, long creationTime, Map<String, String> metadata,
String encryptionKeyName) {
String encryptionKeyName,
String sourceVolume, String sourceBucket) {
this(conf, volumeName, bucketName, null, null, proxy);
this.storageType = storageType;
this.versioning = versioning;
this.listCacheSize = HddsClientUtils.getListCacheSize(conf);
this.creationTime = Instant.ofEpochMilli(creationTime);
this.metadata = metadata;
this.encryptionKeyName = encryptionKeyName;
this.sourceVolume = sourceVolume;
this.sourceBucket = sourceBucket;
modificationTime = Instant.now();
if (modificationTime.isBefore(this.creationTime)) {
modificationTime = Instant.ofEpochSecond(
Expand All @@ -161,9 +167,10 @@ public OzoneBucket(ConfigurationSource conf, ClientProtocol proxy,
public OzoneBucket(ConfigurationSource conf, ClientProtocol proxy,
String volumeName, String bucketName, StorageType storageType,
Boolean versioning, long creationTime, long modificationTime,
Map<String, String> metadata, String encryptionKeyName) {
Map<String, String> metadata, String encryptionKeyName,
String sourceVolume, String sourceBucket) {
this(conf, proxy, volumeName, bucketName, storageType, versioning,
creationTime, metadata, encryptionKeyName);
creationTime, metadata, encryptionKeyName, sourceVolume, sourceBucket);
this.modificationTime = Instant.ofEpochMilli(modificationTime);
}

Expand Down Expand Up @@ -306,6 +313,16 @@ public String getEncryptionKeyName() {
return encryptionKeyName;
}

public String getSourceVolume() {
return sourceVolume;
}

public String getSourceBucket() {
return sourceBucket;
}

/**
* Builder for OmBucketInfo.
/**
* Adds ACLs to the Bucket.
* @param addAcl ACL to be added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,8 @@ public void createBucket(
.setIsVersionEnabled(isVersionEnabled)
.addAllMetadata(bucketArgs.getMetadata())
.setStorageType(storageType)
.setSourceVolume(bucketArgs.getSourceVolume())
.setSourceBucket(bucketArgs.getSourceBucket())
.setAcls(listOfAcls.stream().distinct().collect(Collectors.toList()));

if (bek != null) {
Expand Down Expand Up @@ -614,7 +616,10 @@ public OzoneBucket getBucketDetails(
bucketInfo.getModificationTime(),
bucketInfo.getMetadata(),
bucketInfo.getEncryptionKeyInfo() != null ? bucketInfo
.getEncryptionKeyInfo().getKeyName() : null);
.getEncryptionKeyInfo().getKeyName() : null,
bucketInfo.getSourceVolume(),
bucketInfo.getSourceBucket()
);
}

@Override
Expand All @@ -635,7 +640,9 @@ public List<OzoneBucket> listBuckets(String volumeName, String bucketPrefix,
bucket.getModificationTime(),
bucket.getMetadata(),
bucket.getEncryptionKeyInfo() != null ? bucket
.getEncryptionKeyInfo().getKeyName() : null))
.getEncryptionKeyInfo().getKeyName() : null,
bucket.getSourceVolume(),
bucket.getSourceBucket()))
.collect(Collectors.toList());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ public enum OMAction implements AuditAction {
PURGE_KEYS,
DELETE_KEYS,

// S3 Bucket
CREATE_S3_BUCKET,
DELETE_S3_BUCKET,

// READ Actions
CHECK_VOLUME_ACCESS,
LIST_BUCKETS,
Expand All @@ -53,7 +49,6 @@ public enum OMAction implements AuditAction {
READ_VOLUME,
READ_BUCKET,
READ_KEY,
LIST_S3BUCKETS,
INITIATE_MULTIPART_UPLOAD,
COMMIT_MULTIPART_UPLOAD_PARTKEY,
COMPLETE_MULTIPART_UPLOAD,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ public enum ResultCodes {

INVALID_VOLUME_NAME,

PARTIAL_DELETE
PARTIAL_DELETE,

DETECTED_LOOP_IN_BUCKET_LINKS,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ public CryptoProtocolVersion getVersion() {
return version;
}

public BucketEncryptionKeyInfo copy() {
return new BucketEncryptionKeyInfo(version, suite, keyName);
}

/**
* Builder for BucketEncryptionKeyInfo.
*/
Expand Down
Loading