Skip to content

Conversation

@JyotinderSingh
Copy link
Contributor

What changes were proposed in this pull request?

Throw an exception if a bucket accessed via OFS is in OBJECT_STORE layout. Allowed layouts are FILE_SYSTEM_OPTIMIZED and LEGACY.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-5959

How was this patch tested?

Related integration tests.

@JyotinderSingh JyotinderSingh changed the title HDDS-5959. Validate buckets accessed via OFS to be in FSO/LEGACY layout HDDS-5959. Handles bucket layout validation logic in ofs/o3fs client. Nov 13, 2021
@rakeshadr
Copy link
Contributor

rakeshadr commented Nov 13, 2021

Thanks @JyotinderSingh for taking this ahead!

I've gone through the test case failures quickly. Most of them are expecting FS semantics test cases and complaining about unsupported OBJECT_STORE layout.

  1. All the contract test cases expect FS semantics.
    Please go through the HDDS-4513 patch, like we know earlier there was cluster side OM layout configuration, which has to be modified to FSO or LEGACY semantics with ozone.om.enable.filesystem.paths=true. IMHO, this will make contract tests happy.

  2. TestOzoneFileSystem, here you have to set OMConfigKeys.OZONE_DEFAULT_BUCKET_LAYOUT=LEGACY in the else block - Refer: TestOzoneFileSystem.java#L164. For that, please move the below settings outside if-else block.

      conf.set(OMConfigKeys.OZONE_DEFAULT_BUCKET_LAYOUT,
          bucketLayout.name());
  1. For the TestOzoneFsHAURLs failure, please set below configs
      conf.set(OMConfigKeys.OZONE_DEFAULT_BUCKET_LAYOUT, LEGACY); 
      conf.setBoolean(OMConfigKeys.OZONE_OM_ENABLE_FILESYSTEM_PATHS, true);

@JyotinderSingh
Copy link
Contributor Author

JyotinderSingh commented Nov 13, 2021

Thanks for the feedback @rakeshadr @mukul1987 . I have made the relevant changes - please let me know if they are fine.

However currently the FS related acceptance tests are still failing due to default OBJECT_STORE layout behaviour of buckets configured in ozone-default.xml#2985. I have tried overriding that by adding OZONE-SITE.XML_ozone.default.bucket.layout=LEGACY to docker-config and common-config files of the related dist/src/main/compose/{test}/* directories. But for some reason when the corresponding docker compose cluster is started this config not picked up - and the default config value of OBJECT_STORE is still being used. Any clues why this might be happening?

@rakeshadr
Copy link
Contributor

rakeshadr commented Nov 14, 2021

Thanks for the feedback @rakeshadr @mukul1987 . I have made the relevant changes - please let me know if they are fine.

However currently the FS related acceptance tests are still failing due to default OBJECT_STORE layout behaviour of buckets configured in ozone-default.xml#2985. I have tried overriding that by adding OZONE-SITE.XML_ozone.default.bucket.layout=LEGACY to docker-config and common-config files of the related dist/src/main/compose/{test}/* directories. But for some reason when the corresponding docker compose cluster is started this config not picked up - and the default config value of OBJECT_STORE is still being used. Any clues why this might be happening?

I will explore this part and update to you.
BTW, @sadanand48 do you have clues to fix this case? Thanks for your time!

@rakeshadr
Copy link
Contributor

@JyotinderSingh Please fix TestOzoneFSInputStream case , seems it will pass with those config values.

@sadanand48
Copy link
Contributor

BTW, @sadanand48 do you have clues to fix this case? Thanks for your time!

@rakeshadr , The robot test tries to create bucket via cli through ozone bucket create and when looking into the code i.e in CreateBucketHandler we don’t obtain the default bucket type from conf instead it’s taken as OBJECT_STORE . That’s probably why it wasn’t obeying the conf. I guess the latest change by @JyotinderSingh to explicitly create fso buckets for these tests should work.

@JyotinderSingh
Copy link
Contributor Author

I think most of the tests are now passing. There does seem to be a compatibility test issue though.
the xcompat test is failing on the following test
xcompat-cluster-1.1.0-client-1.1.0-write :: Write Compatibility
The test is failing on the following command:
ozone fs -mkdir o3fs://bucket1.vol1/dir-1.1.0
This is failing due the the directory being created being in OBS fashion.

-mkdir: Bucket: bucket1 has layout: OBJECT_STORE, which does not support file system semantics. Bucket Layout must be FILE_SYSTEM_OPTIMIZED or LEGACY.

From my understanding - this doesn’t look like a simple fix - I believe the reason it is failing is that the old 1.1.0 client doesn’t know that the buckets created by the FS need to be in FSO layout - since we added that change in #2730.

I'm not sure how we should handle this.

Copy link
Contributor

@rakeshadr rakeshadr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @JyotinderSingh for the continuous efforts in refining this.
Thanks @mukul1987 for the reviews.

+1 LGTM, I will merge this shortly.

@rakeshadr rakeshadr merged commit b69a3d1 into apache:master Dec 1, 2021
@JyotinderSingh JyotinderSingh deleted the HDDS-5959 branch December 1, 2021 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants