Skip to content

HDDS-15232. Reduce duplication in ozonesecure env#10239

Open
adoroszlai wants to merge 2 commits into
apache:masterfrom
adoroszlai:HDDS-15232
Open

HDDS-15232. Reduce duplication in ozonesecure env#10239
adoroszlai wants to merge 2 commits into
apache:masterfrom
adoroszlai:HDDS-15232

Conversation

@adoroszlai
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Reduce duplication in non-HA secure docker-compose environments:

  • merge ozonesecure-mr into ozonesecure
  • utilize reusable YAML fragments in ozonesecure

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

How was this patch tested?

https://github.com/adoroszlai/ozone/actions/runs/25675964314

ozonesecure/test-hadoop.sh passed in:
https://github.com/adoroszlai/ozone/actions/runs/25675964314/job/75379224808

@adoroszlai adoroszlai self-assigned this May 11, 2026
Copy link
Copy Markdown
Contributor

@priyeshkaratha priyeshkaratha left a comment

Choose a reason for hiding this comment

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

Thanks @adoroszlai for the patch. Please check the inline comment?

- ../_keytabs:/etc/security/keytabs
- ./krb5.conf:/etc/krb5.conf
env_file:
- docker-config
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it recommended ./docker-config or docker-config?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

./ is required for volumes in the current directory ("to avoid ambiguities with named volumes, relative paths should always begin with . or .."). There is no such ambiguity with env_file, so the form docker-config is recommended for simplicity.

https://docs.docker.com/reference/compose-file/services/

Copy link
Copy Markdown
Contributor

@priyeshkaratha priyeshkaratha left a comment

Choose a reason for hiding this comment

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

Changes LGTM

@adoroszlai adoroszlai requested review from dombizita and errose28 May 12, 2026 08:18
Copy link
Copy Markdown
Contributor

@dombizita dombizita left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @adoroszlai, I have two small questions about merging ozonesecure-mr into ozonesecure, otherwise it looks good to me!

OZONE-SITE.XML_ozone.acl.authorizer.class=org.apache.hadoop.ozone.security.acl.OzoneNativeAuthorizer
OZONE-SITE.XML_ozone.administrators="testuser,recon,om"
OZONE-SITE.XML_ozone.s3.administrators="testuser,recon,om"
OZONE-SITE.XML_ozone.administrators="testuser,recon,om,hadoop"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just to make sure I understand: the only difference in the ozonesecure-mr and ozonesecure (other than the below change around hadoop configs) was that the hadoop user was added as ozone admin? The ozone.s3.administrators can be removed, as it's by default the same as ozone.administrators, which is good for this suite?

Comment on lines -129 to -135
CORE-SITE.XML_hadoop.security.authorization=true
HADOOP-POLICY.XML_ozone.om.security.client.protocol.acl=*
HADOOP-POLICY.XML_hdds.security.client.datanode.container.protocol.acl=*
HADOOP-POLICY.XML_hdds.security.client.scm.container.protocol.acl=*
HADOOP-POLICY.XML_hdds.security.client.scm.block.protocol.acl=*
HADOOP-POLICY.XML_hdds.security.client.scm.certificate.protocol.acl=*
HADOOP-POLICY.XML_ozone.security.reconfigure.protocol.acl=*
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I believe the hadoop policy changes are the default values, so it's not needed to be here.
But why is that the hadoop.security.authorization is not needed to be set in the core-site.xml? One idea I had it that the hadoop-secure.yaml has it via security.conf, which is added in hadoop-test.sh that is used by test-hadoop.sh, so the moved ozonesecure-mr stuff has it via this extra compose file. In this case this is not needed for the ozonesecure suite and it was unnecessary before?

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.

3 participants