Skip to content

etcd: use MCR v2 image - #66

Open
Garrett Settles (gsettles01) wants to merge 2 commits into
aclmainfrom
gsettles/etcd-mcr-v2
Open

etcd: use MCR v2 image#66
Garrett Settles (gsettles01) wants to merge 2 commits into
aclmainfrom
gsettles/etcd-mcr-v2

Conversation

@gsettles01

@gsettles01 Garrett Settles (gsettles01) commented Aug 31, 2026

Copy link
Copy Markdown

Summary

Move ACL's default etcd image from quay.io/coreos/etcd to mcr.microsoft.com/oss/v2/etcd-io/etcd, retaining v3.5.16 and existing service behavior. MCR v2 provides v3.5.16 and v3.5.22 for AMD64 and ARM64. Update the entrypoint to /usr/bin/etcd.

Change Log

  • Update ETCD_IMAGE_URL in etcd-member.service.
  • Change the wrapper entrypoint from /usr/local/bin/etcd to /usr/bin/etcd.

Type of Change

  • Image build change
  • Configuration change

Does this affect the image build?

  • Yes

Associated Issues

Related PRs

Test Methodology

  • Wrapper syntax and git diff --check pass.
  • AMD64 build, boot, service contract, persistence, v2 API, image overrides, and mTLS passed.
  • Quay control and MCR v2 each passed five targeted Kola tests. Quay-blocked direct and three-test runs passed without fallback.
  • Targeted ARM64 passed without Secure Boot. PR CI and full ARM64 Secure Boot remain pending.

Merge Checklist

  • Relevant local Kola tests pass
  • PR image build and CI pass
  • Ready to merge

@gsettles01
Garrett Settles (gsettles01) force-pushed the gsettles/etcd-mcr-v2 branch 2 times, most recently from ef66810 to c548ce4 Compare August 31, 2026 17:56
@gsettles01 Garrett Settles (gsettles01) changed the title etcd: use MCR v2 image [WIP] etcd: use MCR v2 image Sep 2, 2026
@gsettles01 Garrett Settles (gsettles01) changed the title [WIP] etcd: use MCR v2 image etcd: use MCR v2 image Sep 3, 2026
@gsettles01
Garrett Settles (gsettles01) marked this pull request as ready for review September 3, 2026 14:49
Copilot AI lite review requested due to automatic review settings September 3, 2026 14:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The wrapper now hardcodes an entrypoint path that can unintentionally break existing ETCD_IMAGE override usage unless the entrypoint remains configurable.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates the ACL etcd container runtime wiring to use the MCR v2 etcd image by default while preserving the existing service contract and version/tag substitution mechanism.

Changes:

  • Switch the default ETCD_IMAGE_URL from quay.io/coreos/etcd to mcr.microsoft.com/oss/v2/etcd-io/etcd in the systemd unit.
  • Update the docker --entrypoint used by the wrapper from /usr/local/bin/etcd to /usr/bin/etcd.
File summaries
File Description
sdk_container/src/third_party/coreos-overlay/app-admin/etcd-wrapper/files/etcd-wrapper Updates the container entrypoint used when launching etcd via the wrapper.
sdk_container/src/third_party/coreos-overlay/app-admin/etcd-wrapper/files/etcd-member.service Changes the default etcd image registry/repo to MCR v2 while keeping the existing tag templating.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jiria

Copy link
Copy Markdown
Member

The registry move looks right, but I think the arch-suffixed tag needs to move with it.

etcd-wrapper-3.5.16.ebuild still builds @ETCD_IMAGE_TAG@ with a quay-specific suffix:

local tag="v${PV}"
if [[ "${ARCH}" != "amd64" ]]; then
	tag+="-${ARCH}"
fi

So on ARM64 the unit ends up with ETCD_IMAGE_TAG=v3.5.16-arm64 and the wrapper pulls mcr.microsoft.com/oss/v2/etcd-io/etcd:v3.5.16-arm64. I checked the registries directly:

  • mcr.microsoft.com/v2/oss/v2/etcd-io/etcd/manifests/v3.5.16-arm64 -> 404
  • quay.io/v2/coreos/etcd/manifests/v3.5.16-arm64 -> 200 (which is why the suffix existed)
  • MCR's tag list has only v3.5.16 and v3.5.16-1...v3.5.16-15, no per-arch variants

With Restart=always, a failed pull means etcd-member.service restart-loops indefinitely on every ARM64 node, and AMD64 testing won't surface it since the suffix isn't applied there.

The good news is no per-arch tag is needed - v3.5.16 is already an OCI index with both linux/amd64 and linux/arm64, and both manifests have Entrypoint: ["/usr/bin/etcd"], so your entrypoint change is correct for both. Would you be up for dropping the suffix in the same PR?

--- a/sdk_container/src/third_party/coreos-overlay/app-admin/etcd-wrapper/etcd-wrapper-3.5.16.ebuild
+++ b/sdk_container/src/third_party/coreos-overlay/app-admin/etcd-wrapper/etcd-wrapper-3.5.16.ebuild
 src_install() {
-	local tag="v${PV}"
-	if [[ "${ARCH}" != "amd64" ]]; then
-		tag+="-${ARCH}"
-	fi
+	# MCR publishes a single multi-arch index per version; no per-arch tag suffix.
+	local tag="v${PV}"

Also curious how the targeted ARM64 run in the test methodology passed - was that using an explicit ETCD_IMAGE override rather than the ebuild-generated tag?

Copilot AI review requested due to automatic review settings September 5, 2026 21:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The entrypoint path is now hard-coded, which can break existing image override scenarios that previously worked with the old default image layout.

Review details

Suppressed comments (1)

sdk_container/src/third_party/coreos-overlay/app-admin/etcd-wrapper/files/etcd-wrapper:36

  • The container entrypoint path is now hard-coded to /usr/bin/etcd. This can break existing ETCD_IMAGE/ETCD_IMAGE_URL overrides that point at images where the etcd binary lives elsewhere (including the previously default quay.io/coreos/etcd, which this wrapper previously invoked via /usr/local/bin/etcd). Consider making the entrypoint configurable via an env var (defaulting to /usr/bin/etcd) so overrides remain functional.
/usr/libexec/sdnotify-proxy /run/etcd-notify /usr/bin/docker run --name etcd-member --network=host --ipc=host -u $(id -u ${ETCD_USER}):$(id -g ${ETCD_USER}) -v /run:/run -v /usr/share/ca-certificates:/usr/share/ca-certificates:ro -v ${etcd_data_dir}:/var/lib/etcd:rw -v ${ETCD_SSL_DIR}:/etc/ssl/certs:ro --env-file <(env; echo PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin; echo NOTIFY_SOCKET=/run/etcd-notify) --entrypoint /usr/bin/etcd ${ETCD_IMAGE:-${ETCD_IMAGE_URL}:${ETCD_IMAGE_TAG}} "$@"
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@gsettles01

Copy link
Copy Markdown
Author

The registry move looks right, but I think the arch-suffixed tag needs to move with it.

etcd-wrapper-3.5.16.ebuild still builds @ETCD_IMAGE_TAG@ with a quay-specific suffix:

local tag="v${PV}"
if [[ "${ARCH}" != "amd64" ]]; then
	tag+="-${ARCH}"
fi

So on ARM64 the unit ends up with ETCD_IMAGE_TAG=v3.5.16-arm64 and the wrapper pulls mcr.microsoft.com/oss/v2/etcd-io/etcd:v3.5.16-arm64. I checked the registries directly:

  • mcr.microsoft.com/v2/oss/v2/etcd-io/etcd/manifests/v3.5.16-arm64 -> 404
  • quay.io/v2/coreos/etcd/manifests/v3.5.16-arm64 -> 200 (which is why the suffix existed)
  • MCR's tag list has only v3.5.16 and v3.5.16-1...v3.5.16-15, no per-arch variants

With Restart=always, a failed pull means etcd-member.service restart-loops indefinitely on every ARM64 node, and AMD64 testing won't surface it since the suffix isn't applied there.

The good news is no per-arch tag is needed - v3.5.16 is already an OCI index with both linux/amd64 and linux/arm64, and both manifests have Entrypoint: ["/usr/bin/etcd"], so your entrypoint change is correct for both. Would you be up for dropping the suffix in the same PR?

--- a/sdk_container/src/third_party/coreos-overlay/app-admin/etcd-wrapper/etcd-wrapper-3.5.16.ebuild
+++ b/sdk_container/src/third_party/coreos-overlay/app-admin/etcd-wrapper/etcd-wrapper-3.5.16.ebuild
 src_install() {
-	local tag="v${PV}"
-	if [[ "${ARCH}" != "amd64" ]]; then
-		tag+="-${ARCH}"
-	fi
+	# MCR publishes a single multi-arch index per version; no per-arch tag suffix.
+	local tag="v${PV}"

Also curious how the targeted ARM64 run in the test methodology passed - was that using an explicit ETCD_IMAGE override rather than the ebuild-generated tag?

Good catch—you’re right. The CPU architecture suffix was specific to Quay’s tag layout. I removed that conditional, so both AMD64 and ARM64 now use the MCR image tag v3.5.16. Docker will automatically select the correct architecture from that multi-architecture image on MCR.

Regarding your question about why the earlier ARM64 test passed, the code that would add the arm64 suffix never ran - the pipeline run took the RPM path instead of portage. To cover the gap, I asked AI to build a small script to check the ebuild tag render logic without doing a full Portage build. That and I overrode asking for it to explicitly run the etcd tests in addition. Here's that commit and pipeline run. The pipeline run shows Build RPM Image (aarch64) → Build RPMs → Validate etcd ebuild image tag and succeeded and logged arm64: ETCD_IMAGE_TAG=v3.5.16 where the ebuild now renders with the correct MCR tag.

Thanks for catching the tag coverage gap and helping tighten this up :- )

Garrett Settles (gsettles01) added a commit that referenced this pull request Sep 5, 2026
Per Copilot's PR #66 review, custom images may use a different etcd path.
Copilot AI review requested due to automatic review settings September 5, 2026 22:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

It changes a core control-plane dependency’s image source/entrypoint and the PR metadata indicates CI/full validation is still pending, so it needs final human verification.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

It changes the default runtime image source and the etcd container entrypoint path, which is a high-impact boot/service behavior change that benefits from final human validation (and CI completion) before approval.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Move the default etcd image from Quay to MCR v2. Update the wrapper entrypoint to /usr/bin/etcd to match the MCR v2 image layout.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants