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-3356: Add CentOS 8 support to the Docker provisioner #640

Merged
merged 2 commits into from
May 27, 2020

Conversation

sekikn
Copy link
Contributor

@sekikn sekikn commented May 19, 2020

No description provided.

@iwasakims
Copy link
Member

iwasakims commented May 20, 2020

@sekikn I got the following error on provisioning with the patch and enable_local_repo = true. yum-config-manager seems to be replaced by yum config-manager on CentOS 8.

sudo: yum-config-manager: command not found

@iwasakims
Copy link
Member

After I fixed the yum-config-manager part, I got the another error. Installing rng-tools seemed to be failed.

Failed to download metadata for repo 'AppStream'
Error: Failed to download metadata for repo 'AppStream'
sed: can't read /usr/lib/systemd/system/rngd.service: No such file or directory
Failed to start rngd.service: Unit rngd.service not found.

@iwasakims
Copy link
Member

@sekikn Sorry, the cause of the error was that I did not update docker image by build.sh.

@iwasakims
Copy link
Member

Hmm... starting services by systemctl does not work in docker container. Since it works outside container, I'm suspecting issue like docker/for-linux#835.

@iwasakims
Copy link
Member

adding /sys/fs/cgroup to volumes worked for me to fix the systemctl issue.

diff --git a/provisioner/docker/docker-compose.yml b/provisioner/docker/docker-compose.yml
index cee849e9..b3bb1a42 100644
--- a/provisioner/docker/docker-compose.yml
+++ b/provisioner/docker/docker-compose.yml
@@ -24,3 +24,4 @@ bigtop:
     - ./config/hiera.yaml:/etc/puppet/hiera.yaml
     - ./config/hieradata:/etc/puppet/hieradata
     - ./config/hosts:/etc/hosts
+    - /sys/fs/cgroup:/sys/fs/cgroup:ro

@sekikn
Copy link
Contributor Author

sekikn commented May 22, 2020

Great, will try it locally. Thanks!

@evans-ye
Copy link
Contributor

adding /sys/fs/cgroup to volumes worked for me to fix the systemctl issue.

diff --git a/provisioner/docker/docker-compose.yml b/provisioner/docker/docker-compose.yml
index cee849e9..b3bb1a42 100644
--- a/provisioner/docker/docker-compose.yml
+++ b/provisioner/docker/docker-compose.yml
@@ -24,3 +24,4 @@ bigtop:
     - ./config/hiera.yaml:/etc/puppet/hiera.yaml
     - ./config/hieradata:/etc/puppet/hieradata
     - ./config/hosts:/etc/hosts
+    - /sys/fs/cgroup:/sys/fs/cgroup:ro

@iwasakims Can you share some technical reference to this. Thanks!

@iwasakims
Copy link
Member

Can you share some technical reference to this.

@evans-ye The background is similar to BIGTOP-3302. systemd added check to see if service process belongs to the service as a fix for CVE-2018-16888. The check uses cgroups.

If cgroups info is not available, init script fails with following message, indicating failure of checking added by the systemd/systemd#6632.

May 21 11:53:07 2eef6a902086 zookeeper-server[2620]: Starting zookeeper ... STARTED
May 21 11:53:07 2eef6a902086 runuser[2665]: pam_unix(runuser:session): session closed for user zookeeper
May 21 11:53:07 2eef6a902086 systemd[1]: zookeeper-server.service: New main PID 2714 does not belong to service, and PID file is not owned by root. Refusing.

@sekikn
Copy link
Contributor Author

sekikn commented May 25, 2020

Thanks @iwasakims, I also confirmed your fix worked well. I updated the PR.

Copy link
Member

@iwasakims iwasakims left a comment

Choose a reason for hiding this comment

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

+1. ./docker-hadoop.sh -c 1 --smoke-tests worked on my local with following config.yaml (and fix of #642 for hadoop installation).

docker:
        memory_limit: "8g"
        image: "bigtop/puppet:trunk-centos-8"

distro: centos
components: [hdfs, yarn, mapreduce]
enable_local_repo: true
smoke_test_components: [hdfs, yarn, mapreduce]

Provisioning bigtop/puppet:trunk-centos-7 on CentOS 7 worked as before with this patch.

@sekikn sekikn merged commit c15ce38 into apache:master May 27, 2020
@sekikn
Copy link
Contributor Author

sekikn commented May 27, 2020

Thanks! Merged into master.

@evans-ye
Copy link
Contributor

The investigation is informative. Thanks @iwasakims.

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