Code review comment for ~raharper/curtin:feature/enable-storage-vmtest-on-centos

Revision history for this message
Lee Trager (ltrager) wrote :

I have been testing this branch using the MAAS CI. Nodes in the MAAS CI have no direct access to the Internet. This is causing UEFI CentOS 7 installs to fail when running

yum --assumeyes --quiet install --downloadonly --setopt=keepcache=1 grub2-efi-x64

I made sure the image I built has grub2-efi-x64[1]. While I think its a good feature that Curtin will automatically install missing dependencies if those dependencies are currently on the system Curtin should not try to access the Internet.

I would suggest querying RPM directly to see if a package is available before trying to use yum

[root@autopkgtest /]# rpm -q grub2-efi-x64
grub2-efi-x64-2.02-0.65.el7.centos.2.x86_64
[root@autopkgtest /]# echo $?
0
[root@autopkgtest /]# rpm -q missing-package
package missing-package is not installed
[root@autopkgtest /]# echo $?
1

[1] https://code.launchpad.net/~ltrager/maas-images/centos_storage_curthooks/+merge/353351

review: Needs Fixing

« Back to merge proposal