Bug 1709476

Summary: UBI: Include sudo in the base images to support Azure
Product: Red Hat Enterprise Linux 8 Reporter: Josh Boyer <jwboyer>
Component: ubi8-containerAssignee: Jindrich Novy <jnovy>
Status: CLOSED DEFERRED QA Contact: Martin Jenner <mjenner>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.1CC: abokovoy, jwboyer, smccarty, yacao
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-19 03:13:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Josh Boyer 2019-05-13 16:40:59 UTC
Description of problem:

Our UBI yum repositories include the sudo package, however this is not included by default in the base images themselves.  Azure currently runs everything via sudo and therefore our base images do not work in that environment.

Version-Release number of selected component (if applicable):
ubi8

How reproducible:
Always


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

https://github.com/Microsoft/azure-pipelines-agent/issues/2043

Comment 2 Alexander Bokovoy 2019-05-15 18:01:36 UTC
Yes, many CI providers pre-configure access to containers with sudo. In the case of Azure Pipelines, if you want to use containers directly from the pipeline definition, the container itself has to provide sudo. See https://github.com/microsoft/azure-pipelines-agent/issues/2043 for details.

Comment 3 Josh Boyer 2019-05-15 19:26:18 UTC
Yeah, I linked to the Azure issue in the original description.  Has IdM actually run into cases outsize of Azure where the lack of sudo in the images presents hurdles that users/customers can't overcome?  The crux of the issue here is that it is relatively simply to include sudo in the base images, but that bloats the size further and size is extremely sensitive here.

Comment 4 Alexander Bokovoy 2019-05-15 19:56:47 UTC
We don't ship IdM container in RHEL 8 yet. 

However, I already stumbled upon this problem when setting up CI for FreeIPA on Azure where I use Fedora 30/31 base images. I had to use fedora-toolbox container image as a base to build packages as that one has sudo. Without it, my only option would have been to pull the original image and rebuild a container by adding sudo locally. Unfortunately, then I cannot specify container in Azure pipeline definition directly and would need to deal with it by talking to a container engine.

If there would be a similar UBI image with sudo, that would simplify work a lot by not requiring a special container rebuild just to make sudo available in the image.

Comment 5 Scott McCarty 2019-05-23 17:26:46 UTC
I responded to the MS GitHub repo that we could consider adding a layered image at Microsoft someday to support this use case. Until then, I recommend users build a layered image on UBI, and push it to quay.io.

https://github.com/Microsoft/azure-pipelines-agent/issues/2043

Comment 8 Scott McCarty 2019-06-19 03:13:52 UTC
All this could potentially be solved with building a version and putting it in Quay.io. Going to close, deferred this bug..