-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
[ci] Add Alma Linux 9 to matrix in packaging and platform jobs #118331
Conversation
Upgraded SmbTestContainer base image from Ubuntu 16.04 to 24.04 to avoid hanging Python module compilation when installing samba package. Installing SMB had to be moved from container building to the starting because SYS_ADMIN capability is required.
1237fa8
to
2035fb0
Compare
public final class SmbTestContainer extends DockerEnvironmentAwareTestContainer { | ||
|
||
private static final String DOCKER_BASE_IMAGE = "ubuntu:16.04"; | ||
private static final String DOCKER_BASE_IMAGE = "ubuntu:24.04"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a problem with installation of Samba in Ubuntu 16.04 on specific Docker configuration. The installation hangs on some Python modules compilation.
Python modules compilation hangs because in RHEL9-based distros, during Docker build, ulimit
set to unlimited
. This is hard to change so instead I've decided to upgrade Ubuntu image to avoid this problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome!
.copy("fixture/provision/installsmb.sh", "/fixture/provision/installsmb.sh") | ||
.copy("fixture/certs/ca.key", "/fixture/certs/ca.key") | ||
.copy("fixture/certs/ca.pem", "/fixture/certs/ca.pem") | ||
.copy("fixture/certs/cert.pem", "/fixture/certs/cert.pem") | ||
.copy("fixture/certs/key.pem", "/fixture/certs/key.pem") | ||
.run("chmod +x /fixture/provision/installsmb.sh") | ||
.run("/fixture/provision/installsmb.sh") | ||
.cmd("service samba-ad-dc restart && sleep infinity") | ||
.cmd("/fixture/provision/installsmb.sh && service samba-ad-dc restart && echo Samba started && sleep infinity") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Samba configuration script has been moved from building to starting the container, because it requires SYS_ADMIN
capabilities to run in Ubuntu:24.04
image (capability has been added below). It's not possible to add the capability during the build phase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's unfortunate
setWaitStrategy( | ||
new WaitAllStrategy().withStartupTimeout(Duration.ofSeconds(120)) | ||
.withStrategy(Wait.forLogMessage(".*Samba started.*", 1)) | ||
.withStrategy(Wait.forListeningPort()) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait strategy needed now since the Samba configuration script has been moved from building the container to starting it.
@@ -21,7 +21,7 @@ cat $SSL_DIR/ca.pem >> /etc/ssl/certs/ca-certificates.crt | |||
|
|||
mv /etc/samba/smb.conf /etc/samba/smb.conf.orig | |||
|
|||
samba-tool domain provision --server-role=dc --use-rfc2307 --dns-backend=SAMBA_INTERNAL --realm=AD.TEST.ELASTICSEARCH.COM --domain=ADES --adminpass=Passw0rd --use-ntvfs | |||
samba-tool domain provision --server-role=dc --use-rfc2307 --dns-backend=SAMBA_INTERNAL --realm=AD.TEST.ELASTICSEARCH.COM --domain=ADES --adminpass=Passw0rd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ntvfs
is no longer available in newer versions of Samba (info)
Pinging @elastic/es-delivery (Team:Delivery) |
💔 Backport failed
You can use sqren/backport to manually backport by running |
…ic#118331) SmbTestContainer base image upgraded from Ubuntu 16.04 to 24.04 to avoid hanging Python module compilation when installing samba package. Installing SMB had to be moved from container building to starting because SYS_ADMIN capability is required. (cherry picked from commit a0f64d2) # Conflicts: # .buildkite/pipelines/pull-request/packaging-tests-unix.yml
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
…) (#118550) SmbTestContainer base image upgraded from Ubuntu 16.04 to 24.04 to avoid hanging Python module compilation when installing samba package. Installing SMB had to be moved from container building to starting because SYS_ADMIN capability is required. (cherry picked from commit a0f64d2) # Conflicts: # .buildkite/pipelines/pull-request/packaging-tests-unix.yml
…#118331) (#118552) * [ci] Add Alma Linux 9 to matrix in packaging and platform jobs (#118331) SmbTestContainer base image upgraded from Ubuntu 16.04 to 24.04 to avoid hanging Python module compilation when installing samba package. Installing SMB had to be moved from container building to starting because SYS_ADMIN capability is required. (cherry picked from commit a0f64d2) # Conflicts: # .buildkite/pipelines/pull-request/packaging-tests-unix.yml # x-pack/test/smb-fixture/build.gradle # x-pack/test/smb-fixture/src/main/java/org/elasticsearch/test/fixtures/smb/SmbTestContainer.java * Revert `use-ntvfs` removal This is reverted because Samba Ubuntu base image is not upgraded on 7.x branch
No description provided.