Skip to content

Commit ab54986

Browse files
authored
Merge branch 'main' into fix/revert-nifi-version-change
2 parents 5260de0 + 8de1825 commit ab54986

File tree

4 files changed

+34
-8
lines changed

4 files changed

+34
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ All notable changes to this project will be documented in this file.
9292
- opa: Enable custom versions ([#1170]).
9393
- use custom product versions for Hadoop, HBase, Phoenix, hbase-operator-tools, Druid, Hive and Spark ([#1173]).
9494
- hbase: Bump dependencies to the latest patch level for HBase `2.6.1` and `2.6.2` ([#1185]).
95-
- Changed default user & group IDs from 1000/1000 to 782252253/574654813 ([#1164])
9695
- ubi-rust-builder: Bump Rust toolchain to 1.87.0, cargo-auditable to 0.7.0 and protoc to 31.1 ([#1197]).
9796
- stackable-base, stackable-devel, ubi-rust-builder: Update `ubi-minimal` base image ([#1197]).
9897
- testing-tools: Update `python` 3.12-slim-bullseye base image ([#1197]).
98+
- Change default user & group IDs to 1000/0 ([#1193]).
9999

100100
### Fixed
101101

@@ -204,7 +204,6 @@ All notable changes to this project will be documented in this file.
204204
[#1156]: https://github.com/stackabletech/docker-images/pull/1156
205205
[#1159]: https://github.com/stackabletech/docker-images/pull/1159
206206
[#1163]: https://github.com/stackabletech/docker-images/pull/1163
207-
[#1164]: https://github.com/stackabletech/docker-images/pull/1164
208207
[#1165]: https://github.com/stackabletech/docker-images/pull/1165
209208
[#1168]: https://github.com/stackabletech/docker-images/pull/1168
210209
[#1169]: https://github.com/stackabletech/docker-images/pull/1169
@@ -219,6 +218,7 @@ All notable changes to this project will be documented in this file.
219218
[#1185]: https://github.com/stackabletech/docker-images/pull/1185
220219
[#1188]: https://github.com/stackabletech/docker-images/pull/1188
221220
[#1189]: https://github.com/stackabletech/docker-images/pull/1189
221+
[#1193]: https://github.com/stackabletech/docker-images/pull/1193
222222
[#1197]: https://github.com/stackabletech/docker-images/pull/1197
223223

224224
## [25.3.0] - 2025-03-21

conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108

109109
args = {
110110
"STACKABLE_USER_NAME": "stackable",
111-
"STACKABLE_USER_UID": "782252253", # This is a random high id to not conflict with any existing user
112-
"STACKABLE_USER_GID": "574654813", # This is a random high id to not conflict with any existing group
111+
"STACKABLE_USER_UID": "1000",
112+
"STACKABLE_USER_GID": "0",
113113
"DELETE_CACHES": "true",
114114
}

hadoop/Dockerfile

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,10 @@ FROM stackable/image/java-base AS final
191191

192192
ARG PRODUCT
193193
ARG RELEASE
194+
ARG TARGETARCH
195+
ARG TARGETOS
194196
ARG HDFS_UTILS
197+
ARG ASYNC_PROFILER
195198
ARG STACKABLE_USER_UID
196199

197200
LABEL \
@@ -203,7 +206,13 @@ LABEL \
203206
summary="The Stackable image for Apache Hadoop." \
204207
description="This image is deployed by the Stackable Operator for Apache Hadoop / HDFS."
205208

206-
COPY --chown=${STACKABLE_USER_UID}:0 --from=hadoop-builder /stackable /stackable
209+
210+
COPY --chown=${STACKABLE_USER_UID}:0 --from=hadoop-builder /stackable/hadoop-${PRODUCT}-stackable${RELEASE} /stackable/hadoop-${PRODUCT}-stackable${RELEASE}
211+
COPY --chown=${STACKABLE_USER_UID}:0 --from=hadoop-builder /stackable/hadoop-${PRODUCT}-stackable${RELEASE}-src.tar.gz /stackable/
212+
COPY --chown=${STACKABLE_USER_UID}:0 --from=hadoop-builder /stackable/async-profiler-${ASYNC_PROFILER}-* /stackable/async-profiler-${ASYNC_PROFILER}
213+
COPY --chown=${STACKABLE_USER_UID}:0 --from=hadoop-builder /stackable/jmx /stackable/jmx
214+
COPY --chown=${STACKABLE_USER_UID}:0 --from=hadoop-builder /stackable/protobuf-*-src.tar.gz /stackable/
215+
207216
COPY --chown=${STACKABLE_USER_UID}:0 --from=hdfs-utils-builder /stackable/hdfs-utils-${HDFS_UTILS}.jar /stackable/hadoop-${PRODUCT}-stackable${RELEASE}/share/hadoop/common/lib/hdfs-utils-${HDFS_UTILS}.jar
208217
COPY --chown=${STACKABLE_USER_UID}:0 --from=hdfs-utils-builder /stackable/hdfs-utils-${HDFS_UTILS}-src.tar.gz /stackable
209218

@@ -230,7 +239,20 @@ rm -rf /var/cache/yum
230239
# Without this fuse_dfs does not work
231240
# It is so non-root users (as we are) can mount a FUSE device and let other users access it
232241
echo "user_allow_other" > /etc/fuse.conf
233-
EOF
242+
243+
ln -s "/stackable/hadoop-${PRODUCT}-stackable${RELEASE}" /stackable/hadoop
244+
chown --no-dereference "${STACKABLE_USER_UID}:0" /stackable/hadoop
245+
chmod g=u "/stackable/hadoop-${PRODUCT}-stackable${RELEASE}"
246+
chmod g=u /stackable/*-src.tar.gz
247+
248+
ARCH="${TARGETARCH/amd64/x64}"
249+
mv /stackable/async-profiler-${ASYNC_PROFILER}* "/stackable/async-profiler-${ASYNC_PROFILER-}-${TARGETOS}-${ARCH}"
250+
chmod g=u "/stackable/async-profiler-${ASYNC_PROFILER-}-${TARGETOS}-${ARCH}"
251+
ln -s "/stackable/async-profiler-${ASYNC_PROFILER}-${TARGETOS}-${ARCH}" /stackable/async-profiler
252+
chown --no-dereference "${STACKABLE_USER_UID}:0" /stackable/async-profiler
253+
254+
chmod g=u /stackable/jmx
255+
234256

235257
# ----------------------------------------
236258
# Checks
@@ -241,7 +263,6 @@ EOF
241263

242264
# Check that permissions and ownership in /stackable are set correctly
243265
# This will fail and stop the build if any mismatches are found.
244-
RUN <<EOF
245266
/bin/check-permissions-ownership.sh /stackable ${STACKABLE_USER_UID} 0
246267
EOF
247268

shared/checks/check-permissions-ownership.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ EXPECTED_UID=$2
2727
EXPECTED_GID=$3
2828

2929
error_flag=0
30+
ownership_errors=0
31+
permission_errors=0
3032

3133
# Check ownership
3234
while IFS= read -r -d '' entry; do
@@ -38,6 +40,7 @@ while IFS= read -r -d '' entry; do
3840
file=${remainder#* }
3941
echo "Ownership mismatch: $file (Expected: $EXPECTED_UID:$EXPECTED_GID, Found: $uid:$gid)"
4042
error_flag=1
43+
((ownership_errors++))
4144
fi
4245
done < <(find "$DIRECTORY" -printf "%U %G %p\0")
4346

@@ -48,13 +51,15 @@ while IFS= read -r -d '' entry; do
4851

4952
if [[ "$owner_perms" != "$group_perms" ]]; then
5053
file="${entry:11}"
51-
echo "Permission mismatch: $file (Owner: $owner_perms, Group: $group_perms)"
54+
echo "Permission mismatch: $file (Owner: $owner_perms, Group: $group_perms, Expected: owner=group)"
5255
error_flag=1
56+
((permission_errors++))
5357
fi
5458
done < <(find "$DIRECTORY" -printf "%M %p\0")
5559

5660
if [[ $error_flag -ne 0 ]]; then
5761
echo "Permission and Ownership checks failed for $DIRECTORY!"
62+
echo "Found $ownership_errors ownership mismatches and $permission_errors permission mismatches"
5863
exit 1
5964
fi
6065

0 commit comments

Comments
 (0)