forked from metal3-io/ironic-ipa-downloader
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use dnf to install packages in the ipa ramdisk
Move the logic to modify the ipa-ramdisk to the chrooted.sh script that is executed in a chroot environment. This allows us to use native commands directly in the ipa-ramdisk image, like dnf, and exit correctly in case of failures. Also provide a list of packages installed in the ipa-ramdisk.
- Loading branch information
Showing
3 changed files
with
51 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
set -ex | ||
|
||
# Install the packages we need in the ipa-ramdisk | ||
# FIXME(elfosardo): the python3-bcrypt package should be required by | ||
# python3-ironic-lib but it's not at the moment; remove this when the | ||
# python3-ironic-lib rpm is updated with the correct requirement. | ||
dnf upgrade -y \ | ||
openstack-ironic-python-agent \ | ||
python3-bcrypt \ | ||
python3-ironic-python-agent \ | ||
python3-ironic-lib | ||
|
||
# Update netconfig to use MAC for DUID/IAID combo (same as RHCOS) | ||
# FIXME: we need an alternative of this packaged | ||
mkdir -p /etc/NetworkManager/conf.d /etc/NetworkManager/dispatcher.d | ||
echo -e '[main]\ndhcp=dhclient\n[connection]\nipv6.dhcp-duid=ll' > /etc/NetworkManager/conf.d/clientid.conf | ||
echo -e '[[ "$DHCP6_FQDN_FQDN" =~ - ]] && hostname $DHCP6_FQDN_FQDN' > /etc/NetworkManager/dispatcher.d/01-hostname | ||
chmod +x /etc/NetworkManager/dispatcher.d/01-hostname | ||
|
||
# Provide a list of packages installed in the ipa-ramdisk | ||
rpm -qa | sort > ipa-ramdisk-pkgs-list.txt | ||
|
||
# Cleaning steps | ||
dnf clean all | ||
rm -rf /var/cache/{yum,dnf}/* | ||
rm -f /etc/resolv.conf | ||
rm -f /etc/yum.repos.d/* | ||
mv /*.repo /etc/yum.repos.d/ |