The content provided is generated by AI for reference only:
Conclusion
The IPA image build failure you encountered is a typical issue caused by the unavailability of the official CentOS 8 mirror sources. The most direct and effective solution is to switch to a working centos-vault mirror such as Huawei Cloud, or even better, migrate to a currently maintained operating system as the base for your build.
Recommendation: The openEuler community also offers image building tools (e.g., eulermaker) and alternative solutions. Consider building the Ironic Agent image based on openEuler in the future to improve sustainability and security.
Click here to view detailed analysis and solution
Analysis and Solutions for IPA Image Build Failure
Based on the error information you provided, the IPA (Ironic Python Agent) image build failed primarily because the CentOS 8 software repository mirrorlist.centos.org cannot be resolved, leading to failed dependency downloads.
Error Details Analysis
Curl error (6): Couldn’t resolve host name for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist
Key Issue:
- The domain
mirrorlist.centos.org cannot be resolved (due to DNS issues or the domain being deprecated).
- This problem occurs during the image build process when using the
disk-image-create tool to pull the CentOS 8 AppStream repository.
- This is a classic case of mirror source failure after CentOS Linux 8 reached end-of-life (EOL).
Background Note: CentOS Linux 8 was officially discontinued at the end of 2021. Official mirror sources have been gradually shut down, and many mirror sites no longer provide services or redirect to archive addresses (Vault), causing build pipelines to break.
Solutions
Solution 1: Switch to a Working CentOS Mirror Source (Recommended for Temporary Fix)
Replace the default mirrorlist.centos.org with a still-accessible mirror. For example, use Huawei Cloud’s mirror site:
# Recommended: Use Huawei Cloud's CentOS Vault mirror (for older versions)
http://mirrors.huaweicloud.com/centos-vault/
How to Apply:
In your build environment, manually override the yum repo configuration file. For instance, create or edit /etc/yum.repos.d/CentOS-AppStream.repo:
[appstream]
name=CentOS-$releasever - AppStream
baseurl=http://mirrors.huaweicloud.com/centos-vault/8.5.2111/AppStream/x86_64/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
You can also add the --no-tls-checks flag (if SSL issues occur) and specify a custom internal repo path.
Tip: Inject custom .repo files into your build environment to avoid relying on broken public mirror lists.
Solution 2: Migrate to a Currently Maintained OS Base Image
Since CentOS 8 is no longer supported, the long-term solution is to switch to a supported base system, such as:
| Alternative OS |
Advantages |
| CentOS Stream 8 |
Rolling updates, official continuation, supported until 2024 |
| Rocky Linux 8 |
Community-driven, RHEL-compatible, long-term support |
| AlmaLinux 8 |
Stable alternative, actively maintained |
Example Build Command (using Rocky Linux):
disk-image-create -o /mnt/ironic-agent-ssh ironic-python-agent-ramdisk rocky-linux selinux-permissive devuser
Ensure that diskimage-builder supports the target distribution’s element (check the elements/ directory for rocky-linux or almalinux).
Solution 3: Use Local Cache or Offline Mirrors
If you’re working in an internal network or want to eliminate network dependencies:
- Pre-download the CentOS 8 Vault ISO or mirror tree.
- Set up a local HTTP server to serve
AppStream and BaseOS resources.
- During the build, specify the local mirror URL:
baseurl=http://your-local-mirror/centos/8.5/AppStream/x86_64/os/
Related Reference Information (from Knowledge Base)
https://mirrors.huaweicloud.com/centos-vault/ is Huawei Cloud’s archived CentOS mirror, useful for restoring dependencies from older versions (recommended by user yanzhicong).
- User netfish previously identified the root cause of similar issues as unreachable mirror sources and suggested switching to domestic mirrors to resolve metadata download failures.
- The
CentOS Mirrorlist failure due to DNS resolution issues has been confirmed in multiple scenarios (e.g., x2openEuler-upgrade package installation failure).
Recommended Action Steps Summary
| Step |
Action |
| 1 |
Confirm that your current base OS is CentOS 8 and the build process relies on mirrorlist.centos.org |
| 2 |
Replace the AppStream and BaseOS repository sources with a working mirror (e.g., Huawei Cloud Vault) |
| 3 |
If issues persist, consider switching to Rocky Linux / AlmaLinux / CentOS Stream |
| 4 |
Verify network connectivity and DNS settings in the build environment |
| 5 |
For production environments, upgrade your build pipeline to eliminate dependency on EOL systems |
Conclusion
The IPA image build failure you experienced is a typical result of the official CentOS 8 mirror sources being unavailable. The most direct and effective fix is to switch to a working centos-vault mirror like Huawei Cloud, or ideally, migrate to a currently maintained operating system as your build base.
Recommendation: The openEuler community provides image building tools (e.g., eulermaker) and alternative solutions. Consider building the Ironic Agent image based on openEuler in the future to enhance sustainability and security.