Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BIGTOP-3950: fix ranger etc conf dir #1120

Merged
merged 3 commits into from
Jun 26, 2023
Merged

Conversation

JiaLiangC
Copy link
Contributor

Description of PR

This PR modifies the configuration directories for Ranger Admin, Ranger Tag Sync, and Ranger User Sync from /etc/ranger-admin, /etc/ranger-tagsync, and /etc/ranger-usersync to /etc/ranger/{admin,tagsync,usersync}. The detailed reason for this change can be found in the following issue: https://issues.apache.org/jira/projects/BIGTOP/issues/BIGTOP-3950

How was this patch tested?

manual test
before fix, ranger-tagsync can't start,because it ranger can't found /etc/ranger/tagsync/logback.xml

image

after fix , ranger-tagsync works smoonthly
image
image

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'BIGTOP-3638. Your PR title ...')?
  • Make sure that newly added files do not have any licensing issues. When in doubt refer to https://www.apache.org/licenses/

@JiaLiangC
Copy link
Contributor Author

@kevinw66 Could you kindly help review this ranger PR, please?

@JiaLiangC
Copy link
Contributor Author

@kevinw66
You are correct, the issue has been fixed and tested. Can you please help to review it again?

@JiaLiangC
Copy link
Contributor Author

@guyuqi Could you kindly help review this ranger PR, please?

Copy link
Contributor

@kevinw66 kevinw66 left a comment

Choose a reason for hiding this comment

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

Test the build:

[root@8b192978c355 ws]# . /etc/profile.d/bigtop.sh ; ./gradlew ranger-clean ranger-pkg
...
[root@8b192978c355 ws]# for i in $(ls output/ranger/x86_64); do rpm -qlpv output/ranger/x86_64/$i; echo; done | grep /etc
drwxr-xr-x    2 ranger  ranger                      0 Jun 25 06:11 /etc/ranger/admin
drwxr-xr-x    2 ranger  ranger                      0 Jun 25 06:11 /etc/ranger/admin/conf.dist
-rwxr-xr-x    1 ranger  ranger                   5283 Jun 25 06:11 /etc/ranger/admin/conf.dist/logback.xml
-rwxr-xr-x    1 ranger  ranger                  16639 Jun 25 06:11 /etc/ranger/admin/conf.dist/ranger-admin-default-site.xml
-rwxr-xr-x    1 ranger  ranger                  10258 Jun 25 06:11 /etc/ranger/admin/conf.dist/ranger-admin-site.xml
-rwxr-xr-x    1 ranger  ranger                   7602 Jun 25 06:11 /etc/ranger/admin/conf.dist/security-applicationContext.xml
lrwxrwxrwx    1 root    root                       22 Jun 25 06:11 /usr/lib/ranger-admin/conf -> /etc/ranger/admin/conf
lrwxrwxrwx    1 root    root                       22 Jun 25 06:11 /usr/lib/ranger-admin/ews/webapp/WEB-INF/classes/conf -> /etc/ranger/admin/conf
drwxr-xr-x    2 ranger  ranger                      0 Jun 25 06:11 /etc/ranger/kms
drwxr-xr-x    2 ranger  ranger                      0 Jun 25 06:11 /etc/ranger/kms/conf.dist
-rwxr-xr-x    1 ranger  ranger                  12855 Jun 25 06:11 /etc/ranger/kms/conf.dist/dbks-site.xml
-rwxr-xr-x    1 ranger  ranger                   3301 Jun 25 06:11 /etc/ranger/kms/conf.dist/kms-logback.xml
-rwxr-xr-x    1 ranger  ranger                   5977 Jun 25 06:11 /etc/ranger/kms/conf.dist/kms-site.xml
-rwxr-xr-x    1 ranger  ranger                   1990 Jun 25 06:11 /etc/ranger/kms/conf.dist/ranger-kms-site.xml
lrwxrwxrwx    1 root    root                       20 Jun 25 06:11 /usr/lib/ranger-kms/conf -> /etc/ranger/kms/conf
lrwxrwxrwx    1 root    root                       20 Jun 25 06:11 /usr/lib/ranger-kms/ews/webapp/WEB-INF/classes/conf -> /etc/ranger/kms/conf
drwxr-xr-x    2 ranger  ranger                      0 Jun 25 06:11 /etc/ranger/tagsync
drwxr-xr-x    2 ranger  ranger                      0 Jun 25 06:11 /etc/ranger/tagsync/conf.dist
drwxr-xr-x    2 ranger  ranger                      0 Jun 25 06:11 /etc/ranger/tagsync/conf.dist/etc
drwxr-xr-x    2 ranger  ranger                      0 Jun 25 06:11 /etc/ranger/tagsync/conf.dist/etc/ranger
drwxr-xr-x    2 ranger  ranger                      0 Jun 25 06:11 /etc/ranger/tagsync/conf.dist/etc/ranger/data
-rwxr-xr-x    1 ranger  ranger                   1143 Jun 25 06:11 /etc/ranger/tagsync/conf.dist/etc/ranger/data/tags.json
-rwxr-xr-x    1 ranger  ranger                   1632 Jun 25 06:11 /etc/ranger/tagsync/conf.dist/logback.xml
-rwxr-xr-x    1 ranger  ranger                    883 Jun 25 06:11 /etc/ranger/tagsync/conf.dist/ranger-tagsync-env-setup-hadoop-home.sh
lrwxrwxrwx    1 root    root                       24 Jun 25 06:11 /usr/lib/ranger-tagsync/conf -> /etc/ranger/tagsync/conf
drwxr-xr-x    2 root    root                        0 Jun 25 06:11 /usr/lib/ranger-tagsync/conf.dist/etc
drwxr-xr-x    2 root    root                        0 Jun 25 06:11 /usr/lib/ranger-tagsync/conf.dist/etc/ranger
drwxr-xr-x    2 root    root                        0 Jun 25 06:11 /usr/lib/ranger-tagsync/conf.dist/etc/ranger/data
-rw-r--r--    1 root    root                     1143 Jun 25 06:11 /usr/lib/ranger-tagsync/conf.dist/etc/ranger/data/tags.json
drwxr-xr-x    2 ranger  ranger                      0 Jun 25 06:11 /etc/ranger/usersync
drwxr-xr-x    2 ranger  ranger                      0 Jun 25 06:11 /etc/ranger/usersync/conf.dist
-rwxr-xr-x    1 ranger  ranger                   1671 Jun 25 06:11 /etc/ranger/usersync/conf.dist/logback.xml
-rwxr-xr-x    1 ranger  ranger                   2189 Jun 25 06:11 /etc/ranger/usersync/conf.dist/ranger-ugsync-default.xml
lrwxrwxrwx    1 root    root                       25 Jun 25 06:11 /usr/lib/ranger-usersync/conf -> /etc/ranger/usersync/conf

I'm not sure if the owner permissions for /usr/lib/ranger-* is correct, or whether should we change the directory structure to /usr/lib/ranger/* also, but conf dir looks good to me.

@guyuqi
Copy link
Member

guyuqi commented Jun 25, 2023

LGTM

@guyuqi guyuqi merged commit 0284fcc into apache:master Jun 26, 2023
@guyuqi
Copy link
Member

guyuqi commented Jun 26, 2023

merged, thanks @JiaLiangC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants