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

[ci] Add Alma Linux 9 to matrix in packaging and platform jobs #118331

Merged
merged 5 commits into from
Dec 12, 2024

Conversation

jozala
Copy link
Contributor

@jozala jozala commented Dec 10, 2024

No description provided.

@jozala jozala self-assigned this Dec 10, 2024
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.
@jozala jozala force-pushed the ci-pipelines-add-almalinux-9 branch from 1237fa8 to 2035fb0 Compare December 11, 2024 15:01
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";
Copy link
Contributor Author

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.

Copy link
Contributor

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")
Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

that's unfortunate

Comment on lines +50 to +54
setWaitStrategy(
new WaitAllStrategy().withStartupTimeout(Duration.ofSeconds(120))
.withStrategy(Wait.forLogMessage(".*Samba started.*", 1))
.withStrategy(Wait.forListeningPort())
);
Copy link
Contributor Author

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
Copy link
Contributor Author

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)

@jozala jozala marked this pull request as ready for review December 12, 2024 08:22
@jozala jozala requested a review from a team as a code owner December 12, 2024 08:22
@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Dec 12, 2024
@jozala jozala added >non-issue :Delivery/Build Build or test infrastructure v8.18.0 v7.17.27 auto-backport Automatically create backport pull requests when merged and removed needs:triage Requires assignment of a team area label labels Dec 12, 2024
@elasticsearchmachine elasticsearchmachine added the Team:Delivery Meta label for Delivery team label Dec 12, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

@jozala jozala merged commit a0f64d2 into main Dec 12, 2024
17 of 18 checks passed
@jozala jozala deleted the ci-pipelines-add-almalinux-9 branch December 12, 2024 11:14
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.x Commit could not be cherrypicked due to conflicts
7.17 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 118331

jozala added a commit to jozala/elasticsearch that referenced this pull request Dec 12, 2024
…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
@jozala
Copy link
Contributor Author

jozala commented Dec 12, 2024

💚 All backports created successfully

Status Branch Result
8.x
7.17

Questions ?

Please refer to the Backport tool documentation

elasticsearchmachine pushed a commit that referenced this pull request Dec 12, 2024
…) (#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
elasticsearchmachine pushed a commit that referenced this pull request Dec 12, 2024
…#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged backport pending :Delivery/Build Build or test infrastructure >non-issue Team:Delivery Meta label for Delivery team v7.17.27 v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants