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

[Fixtures] ./gradlew :test:fixtures:krb5kdc-fixture:composeBuild failure #8761

Closed
r1walz opened this issue Jul 18, 2023 · 0 comments · Fixed by #8799
Closed

[Fixtures] ./gradlew :test:fixtures:krb5kdc-fixture:composeBuild failure #8761

r1walz opened this issue Jul 18, 2023 · 0 comments · Fixed by #8799

Comments

@r1walz
Copy link
Contributor

r1walz commented Jul 18, 2023

While running docker setup fixtures locally on Mac, krb5kdc-fixture fails with error

/bin/sh: 1: cannot create /etc/hosts: Read-only file system

Hot fix requires removing phrase && echo "127.0.0.1 kerberos.build.opensearch.org" >> /etc/hosts from the Dockerfile.

I have verified that kerberos.build.opensearch.org is already present in the /etc/hosts file created on the containers. We should remove this redundant statement from the Dockerfile.

Verification of presence:
$ ./gradlew :test:fixtures:krb5kdc-fixture:composeUp

> Configure project :
========================= WARNING =========================
         Backwards compatibility tests are disabled!
See https://github.com/opensearch-project/OpenSearch/issues/4173
===========================================================
=======================================
OpenSearch Build Hamster says Hello!
  Gradle Version        : 8.2.1
  OS Info               : Mac OS X 13.4 (x86_64)
  JDK Version           : 11 (Amazon Corretto JDK)
  JAVA_HOME             : /Users/rashiwal/.sdkman/candidates/java/11.0.19-amzn
  Random Testing Seed   : C4E9F61FE2F26BF1
  In FIPS 140 mode      : false
=======================================

> Task :test:fixtures:krb5kdc-fixture:composeUp
 Network 7aa8ceb5208c2f5bd2cf0cb3e4931833_krb5kdc-fixture__default  Creating
 Network 7aa8ceb5208c2f5bd2cf0cb3e4931833_krb5kdc-fixture__default  Created
 Container 7aa8ceb5208c2f5bd2cf0cb3e4931833_krb5kdc-fixture__hdfs_1  Creating
 Container 7aa8ceb5208c2f5bd2cf0cb3e4931833_krb5kdc-fixture__peppa_1  Creating
 Container 7aa8ceb5208c2f5bd2cf0cb3e4931833_krb5kdc-fixture__peppa_1  Created
 Container 7aa8ceb5208c2f5bd2cf0cb3e4931833_krb5kdc-fixture__hdfs_1  Created
 Container 7aa8ceb5208c2f5bd2cf0cb3e4931833_krb5kdc-fixture__hdfs_1  Starting
 Container 7aa8ceb5208c2f5bd2cf0cb3e4931833_krb5kdc-fixture__peppa_1  Starting
 Container 7aa8ceb5208c2f5bd2cf0cb3e4931833_krb5kdc-fixture__peppa_1  Started
 Container 7aa8ceb5208c2f5bd2cf0cb3e4931833_krb5kdc-fixture__hdfs_1  Started
Will use localhost as host of hdfs
Will use localhost as host of peppa
Probing TCP socket on localhost:64965 of 'hdfs_1'
TCP socket on localhost:64965 of 'hdfs_1' is ready
Probing TCP socket on localhost:64964 of 'peppa_1'
TCP socket on localhost:64964 of 'peppa_1' is ready
+---------+----------------+-----------------+
| Name    | Container Port | Mapping         |
+---------+----------------+-----------------+
| hdfs_1  | 4444           | localhost:64965 |
+---------+----------------+-----------------+
| peppa_1 | 4444           | localhost:64964 |
+---------+----------------+-----------------+

BUILD SUCCESSFUL in 14s
10 actionable tasks: 2 executed, 8 up-to-date
$ docker ps -a
CONTAINER ID   IMAGE                                                     COMMAND                  CREATED          STATUS          PORTS                                                    NAMES
bf9f1be8d8c4   7aa8ceb5208c2f5bd2cf0cb3e4931833_krb5kdc-fixture__peppa   "bash /fixture/src/m…"   10 minutes ago   Up 10 minutes   88/tcp, 0.0.0.0:59405->88/udp, 0.0.0.0:64964->4444/tcp   7aa8ceb5208c2f5bd2cf0cb3e4931833_krb5kdc-fixture__peppa_1
b05aaa9c806f   7aa8ceb5208c2f5bd2cf0cb3e4931833_krb5kdc-fixture__hdfs    "bash /fixture/src/m…"   10 minutes ago   Up 10 minutes   88/tcp, 0.0.0.0:54204->88/udp, 0.0.0.0:64965->4444/tcp   7aa8ceb5208c2f5bd2cf0cb3e4931833_krb5kdc-fixture__hdfs_1
$ docker exec bf9f1be8d8c4 cat /etc/hosts
127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
ff02::2	ip6-allrouters
172.25.0.2	kerberos.build.opensearch.org kerberos

$ docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' bf9f1be8d8c4
172.25.0.2

$ docker exec b05aaa9c806f cat /etc/hosts
127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
ff02::2	ip6-allrouters
172.25.0.3	kerberos.build.opensearch.org kerberos

$ docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' b05aaa9c806f
172.25.0.3
r1walz added a commit to r1walz/OpenSearch that referenced this issue Jul 20, 2023
Running composeBuild task for krb5kdc-fixture throws read-only file
system error while writing hostname to local hosts file. Since,
hostname resolution is already present and pointing to local node,
let's remove writing it again from the Dockerfile.

See: opensearch-project#8761

Signed-off-by: Rohit Ashiwal <rashiwal@amazon.com>
r1walz added a commit to r1walz/OpenSearch that referenced this issue Jul 20, 2023
Running composeBuild task for krb5kdc-fixture throws read-only file
system error while writing hostname to local hosts file. Since,
hostname resolution is already present and pointing to local node,
let's remove writing it again from the Dockerfile.

See: opensearch-project#8761

Signed-off-by: Rohit Ashiwal <rashiwal@amazon.com>
kotwanikunal pushed a commit that referenced this issue Jul 21, 2023
Running composeBuild task for krb5kdc-fixture throws read-only file
system error while writing hostname to local hosts file. Since,
hostname resolution is already present and pointing to local node,
let's remove writing it again from the Dockerfile.

See: #8761

Signed-off-by: Rohit Ashiwal <rashiwal@amazon.com>
baba-devv pushed a commit to baba-devv/OpenSearch that referenced this issue Jul 29, 2023
…ect#8799)

Running composeBuild task for krb5kdc-fixture throws read-only file
system error while writing hostname to local hosts file. Since,
hostname resolution is already present and pointing to local node,
let's remove writing it again from the Dockerfile.

See: opensearch-project#8761

Signed-off-by: Rohit Ashiwal <rashiwal@amazon.com>
kaushalmahi12 pushed a commit to kaushalmahi12/OpenSearch that referenced this issue Sep 12, 2023
…ect#8799)

Running composeBuild task for krb5kdc-fixture throws read-only file
system error while writing hostname to local hosts file. Since,
hostname resolution is already present and pointing to local node,
let's remove writing it again from the Dockerfile.

See: opensearch-project#8761

Signed-off-by: Rohit Ashiwal <rashiwal@amazon.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
brusic pushed a commit to brusic/OpenSearch that referenced this issue Sep 25, 2023
…ect#8799)

Running composeBuild task for krb5kdc-fixture throws read-only file
system error while writing hostname to local hosts file. Since,
hostname resolution is already present and pointing to local node,
let's remove writing it again from the Dockerfile.

See: opensearch-project#8761

Signed-off-by: Rohit Ashiwal <rashiwal@amazon.com>
Signed-off-by: Ivan Brusic <ivan.brusic@flocksafety.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this issue Apr 25, 2024
…ect#8799)

Running composeBuild task for krb5kdc-fixture throws read-only file
system error while writing hostname to local hosts file. Since,
hostname resolution is already present and pointing to local node,
let's remove writing it again from the Dockerfile.

See: opensearch-project#8761

Signed-off-by: Rohit Ashiwal <rashiwal@amazon.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant