Skip to content

Conversation

@thiagoalessio
Copy link
Member

@thiagoalessio thiagoalessio commented Aug 14, 2019

On the first stage of the baremetal build, the command go build ... already requires libvirt-devel to be present, otherwise it fails horribly with the following message:

Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
pkg-config: exit status 1

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 14, 2019
@stbenjam
Copy link
Member

/label platform/baremetal

@openshift-ci-robot openshift-ci-robot added the platform/baremetal IPI bare metal hosts platform label Aug 14, 2019
On the first stage of the **baremetal** build, the command `go build ...` already requires `libvirt-devel` to be present, otherwise it fails horribly with the following message:

```
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
pkg-config: exit status 1
```
# It builds an image containing only the openshift-install.

FROM registry.svc.ci.openshift.org/openshift/release:golang-1.10 AS builder
RUN yum install -y libvirt-devel
Copy link
Member

Choose a reason for hiding this comment

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

Current pattern is to chain this up to a trialing yum clean all, like this.

Copy link
Member

Choose a reason for hiding this comment

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

Also, won't you want all of these? If not, why not?

Copy link
Member

Choose a reason for hiding this comment

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

I don't think anything other than libvirt-devel is needed to compile, we're not actually running the installer or really interacting with libvirt, so the rest isn't needed (I think).

Copy link
Member

Choose a reason for hiding this comment

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

That makes sense, but makes me wonder why the baremetal installer needs to set the libvirt build tag at all?

Copy link
Member

Choose a reason for hiding this comment

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

We use a libvirt provisioning host to bootstrap the cluster

Copy link
Member

Choose a reason for hiding this comment

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

To be clear, those full set of packages are needed wherever you would run the installer from, but they’re not needed to build it

Copy link
Member

Choose a reason for hiding this comment

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

Can we include them here then? That way folks who wanted to could run the baremetal installer via a container runtime, vs. extracting just the binary and having it dynamically link to local libraries.

Copy link
Contributor

Choose a reason for hiding this comment

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

That'd be a little awkward since it'd be so different from how the installer runs elsewhere. It's not a big deal to depend on libvirt. We're only supporting RHEL 8 hosts.

Copy link
Member

Choose a reason for hiding this comment

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

Also I should mention this is just the build container, we only need devel here. The actual container we're distributing (below this section) has libvirt-libs, so the installer could run inside the container runtime, and talk to an external libvirt.

Having libvirt itself run inside the container would be complicated, we'd need to do many of the things kubervirt does to make that happen.

@metal3ci
Copy link

Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/1041/

@openshift-ci-robot
Copy link
Contributor

@thiagoalessio: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/e2e-aws-scaleup-rhel7 7ef78fa link /test e2e-aws-scaleup-rhel7

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@stbenjam
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 14, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: stbenjam, thiagoalessio
To complete the pull request process, please assign wking
You can assign the PR to them by writing /assign @wking in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@stbenjam
Copy link
Member

stbenjam commented Aug 14, 2019

I've brought this over to #2220, to incorporate the yum clean all change, would like to see this get in ASAP so we can get working builds of the image.

/close

@openshift-ci-robot
Copy link
Contributor

@stbenjam: Closed this PR.

Details

In response to this:

I've brought this over to #2220, to incorporate the yum clean all change, would like to see this get in ASAP so we can get working builds of the image.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@thiagoalessio
Copy link
Member Author

IMO yum clean all seems unnecessary at that step of a multistage build, but whatever works for you.

@thiagoalessio thiagoalessio deleted the ART-885/build-baremetal-installer branch August 14, 2019 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Indicates that a PR is ready to be merged. platform/baremetal IPI bare metal hosts platform size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants