-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Update cassandra #9932
Merged
Merged
Update cassandra #9932
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changes: - docker-library/cassandra@f536e44: Merge pull request docker-library/cassandra#225 from infosiftr/link-local - docker-library/cassandra@51b30b5: Ignore link-local addresses when getting IP
Diff for febbc46:diff --git a/_bashbrew-cat b/_bashbrew-cat
index 4905d11..5160382 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -3,25 +3,25 @@ GitRepo: https://github.com/docker-library/cassandra.git
Tags: 2.1.22, 2.1
Architectures: amd64, ppc64le
-GitCommit: 4542823efa4a2b91575a65266906b1fe314f839d
+GitCommit: 51b30b5d78616d8db73153dede5df440d0ea7fc4
Directory: 2.1
Tags: 2.2.19, 2.2, 2
Architectures: amd64, ppc64le
-GitCommit: 4542823efa4a2b91575a65266906b1fe314f839d
+GitCommit: 51b30b5d78616d8db73153dede5df440d0ea7fc4
Directory: 2.2
Tags: 3.0.24, 3.0
Architectures: amd64, ppc64le
-GitCommit: ae74e95f49d635ad12af342bac020ac0453e356f
+GitCommit: 51b30b5d78616d8db73153dede5df440d0ea7fc4
Directory: 3.0
Tags: 3.11.10, 3.11, 3, latest
Architectures: amd64, ppc64le
-GitCommit: 5670b9eb72220c08446731a5aa39bbb1eaec0cbd
+GitCommit: 51b30b5d78616d8db73153dede5df440d0ea7fc4
Directory: 3.11
Tags: 4.0-beta4, 4.0
Architectures: amd64, arm32v7, arm64v8, ppc64le
-GitCommit: 4542823efa4a2b91575a65266906b1fe314f839d
+GitCommit: 51b30b5d78616d8db73153dede5df440d0ea7fc4
Directory: 4.0
diff --git a/cassandra_2.1/docker-entrypoint.sh b/cassandra_2.1/docker-entrypoint.sh
index b50a726..6549f83 100755
--- a/cassandra_2.1/docker-entrypoint.sh
+++ b/cassandra_2.1/docker-entrypoint.sh
@@ -18,7 +18,11 @@ _ip_address() {
# scrape the first non-localhost IP address of the container
# in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first
ip address | awk '
- $1 == "inet" && $NF != "lo" {
+ $1 != "inet" { next } # only lines with ip addresses
+ $NF == "lo" { next } # skip loopback devices
+ $2 ~ /^127[.]/ { next } # skip loopback addresses
+ $2 ~ /^169[.]254[.]/ { next } # skip link-local addresses
+ {
gsub(/\/.+$/, "", $2)
print $2
exit
diff --git a/cassandra_2/docker-entrypoint.sh b/cassandra_2/docker-entrypoint.sh
index b50a726..6549f83 100755
--- a/cassandra_2/docker-entrypoint.sh
+++ b/cassandra_2/docker-entrypoint.sh
@@ -18,7 +18,11 @@ _ip_address() {
# scrape the first non-localhost IP address of the container
# in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first
ip address | awk '
- $1 == "inet" && $NF != "lo" {
+ $1 != "inet" { next } # only lines with ip addresses
+ $NF == "lo" { next } # skip loopback devices
+ $2 ~ /^127[.]/ { next } # skip loopback addresses
+ $2 ~ /^169[.]254[.]/ { next } # skip link-local addresses
+ {
gsub(/\/.+$/, "", $2)
print $2
exit
diff --git a/cassandra_3.0/docker-entrypoint.sh b/cassandra_3.0/docker-entrypoint.sh
index b50a726..6549f83 100755
--- a/cassandra_3.0/docker-entrypoint.sh
+++ b/cassandra_3.0/docker-entrypoint.sh
@@ -18,7 +18,11 @@ _ip_address() {
# scrape the first non-localhost IP address of the container
# in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first
ip address | awk '
- $1 == "inet" && $NF != "lo" {
+ $1 != "inet" { next } # only lines with ip addresses
+ $NF == "lo" { next } # skip loopback devices
+ $2 ~ /^127[.]/ { next } # skip loopback addresses
+ $2 ~ /^169[.]254[.]/ { next } # skip link-local addresses
+ {
gsub(/\/.+$/, "", $2)
print $2
exit
diff --git a/cassandra_4.0/docker-entrypoint.sh b/cassandra_4.0/docker-entrypoint.sh
index b50a726..6549f83 100755
--- a/cassandra_4.0/docker-entrypoint.sh
+++ b/cassandra_4.0/docker-entrypoint.sh
@@ -18,7 +18,11 @@ _ip_address() {
# scrape the first non-localhost IP address of the container
# in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first
ip address | awk '
- $1 == "inet" && $NF != "lo" {
+ $1 != "inet" { next } # only lines with ip addresses
+ $NF == "lo" { next } # skip loopback devices
+ $2 ~ /^127[.]/ { next } # skip loopback addresses
+ $2 ~ /^169[.]254[.]/ { next } # skip link-local addresses
+ {
gsub(/\/.+$/, "", $2)
print $2
exit
diff --git a/cassandra_latest/docker-entrypoint.sh b/cassandra_latest/docker-entrypoint.sh
index b50a726..6549f83 100755
--- a/cassandra_latest/docker-entrypoint.sh
+++ b/cassandra_latest/docker-entrypoint.sh
@@ -18,7 +18,11 @@ _ip_address() {
# scrape the first non-localhost IP address of the container
# in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first
ip address | awk '
- $1 == "inet" && $NF != "lo" {
+ $1 != "inet" { next } # only lines with ip addresses
+ $NF == "lo" { next } # skip loopback devices
+ $2 ~ /^127[.]/ { next } # skip loopback addresses
+ $2 ~ /^169[.]254[.]/ { next } # skip link-local addresses
+ {
gsub(/\/.+$/, "", $2)
print $2
exit
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes: