Skip to content

Commit

Permalink
Merge pull request kubevirt#5586 from kubevirt-bot/cherry-pick-5328-t…
Browse files Browse the repository at this point in the history
…o-release-0.41

[release-0.41] rpm: Update libvirt and QEMU
  • Loading branch information
kubevirt-bot authored May 5, 2021
2 parents 818be03 + 47a2592 commit c8a5db3
Show file tree
Hide file tree
Showing 7 changed files with 745 additions and 356 deletions.
846 changes: 590 additions & 256 deletions WORKSPACE

Large diffs are not rendered by default.

34 changes: 25 additions & 9 deletions cmd/virt-launcher/virt-launcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,24 +218,40 @@ func initializeDirs(virtShareDir string,
}
}

func detectDomainWithUUID(domainManager virtwrap.DomainManager) *api.Domain {
domains, err := domainManager.ListAllDomains()
if err != nil {
log.Log.Reason(err).Errorf("failed to list domains when detecting UUID")
return nil
}
for _, domain := range domains {
if domain.Spec.UUID != "" {
return domain
}
}
return nil
}

func waitForDomainUUID(timeout time.Duration, events chan watch.Event, stop chan struct{}, domainManager virtwrap.DomainManager) *api.Domain {

ticker := time.NewTicker(timeout).C
checkEarlyExit := time.NewTicker(time.Second * 2).C
domainCheckTicker := time.NewTicker(time.Second * 10).C
for {
select {
case <-ticker:
panic(fmt.Errorf("timed out waiting for domain to be defined"))
case e := <-events:
if e.Object != nil && e.Type == watch.Added {
domain := e.Object.(*api.Domain)
log.Log.Infof("Detected domain with UUID %s", domain.Spec.UUID)
case <-domainCheckTicker:
log.Log.V(3).Infof("Periodically checking for domain with UUID")
domain := detectDomainWithUUID(domainManager)
if domain != nil {
return domain
}
case <-events:
log.Log.V(3).Infof("Checking for domain with UUID due to incoming libvirt event")
domain := detectDomainWithUUID(domainManager)
if domain != nil {
return domain
} else if e.Type == watch.Modified {
domain, ok := e.Object.(*api.Domain)
if ok && domain.ObjectMeta.DeletionTimestamp != nil {
return nil
}
}
case <-stop:
return nil
Expand Down
21 changes: 17 additions & 4 deletions hack/rpm-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ set -ex
source hack/common.sh
source hack/config.sh

LIBVIRT_VERSION=0:6.6.0-13.1
LIBVIRT_VERSION=0:7.0.0-12
SEABIOS_VERSION=0:1.14.0-1
QEMU_VERSION=15:5.1.0-18
QEMU_VERSION=15:5.2.0-15

# Define some base packages to avoid dependency flipping
# since some dependencies can be satisfied by multiple packages
Expand Down Expand Up @@ -60,11 +60,24 @@ bazel run \
# create a rpmtree for libvirt-devel. libvirt-devel is needed for compilation and unit-testing.
bazel run \
--config=${ARCHITECTURE} \
//:bazeldnf -- rpmtree --public --name libvirt-devel_x86_64 $basesystem libvirt-devel-${LIBVIRT_VERSION} lz4-libs
//:bazeldnf -- rpmtree --public --name libvirt-devel_x86_64 \
$basesystem \
libvirt-devel-${LIBVIRT_VERSION} \
keyutils-libs \
krb5-libs \
libmount \
lz4-libs

bazel run \
--config=${ARCHITECTURE} \
//:bazeldnf -- rpmtree --public --arch=aarch64 --name libvirt-devel_aarch64 $basesystem libvirt-devel-${LIBVIRT_VERSION} lz4-libs
//:bazeldnf -- rpmtree --public --arch=aarch64 --name libvirt-devel_aarch64 \
$basesystem \
libvirt-devel-${LIBVIRT_VERSION} \
keyutils-libs \
krb5-libs \
libmount \
lz4-libs

# create a rpmtree for virt-launcher and virt-handler. This is the OS for our node-components.
bazel run \
--config=${ARCHITECTURE} \
Expand Down
16 changes: 8 additions & 8 deletions repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@ repositories:
name: 32-aarch64-update-repo
gpgkey: https://src.fedoraproject.org/rpms/fedora-repos/raw/main/f/RPM-GPG-KEY-fedora-32-primary
- arch: x86_64
baseurl: https://download.copr.fedorainfracloud.org/results/@kubevirt/libvirt-6.6.0-13.1.el8_3/fedora-32-x86_64/
baseurl: https://download.copr.fedorainfracloud.org/results/@kubevirt/libvirt-7.0.0-12.el8/fedora-32-x86_64/
name: kubevirt/libvirt-copr-x86_64
gpgkey: https://download.copr.fedorainfracloud.org/results/@kubevirt/libvirt-6.6.0-13.1.el8_3/pubkey.gpg
gpgkey: https://download.copr.fedorainfracloud.org/results/@kubevirt/libvirt-7.0.0-12.el8/pubkey.gpg
- arch: x86_64
baseurl: https://download.copr.fedorainfracloud.org/results/@kubevirt/qemu-5.1.0-18.el8/fedora-32-x86_64/
baseurl: https://download.copr.fedorainfracloud.org/results/@kubevirt/qemu-5.2.0-15.el8/fedora-32-x86_64/
name: kubevirt/qemu-copr-x86_64
gpgkey: https://download.copr.fedorainfracloud.org/results/@kubevirt/qemu-5.1.0-18.el8/pubkey.gpg
gpgkey: https://download.copr.fedorainfracloud.org/results/@kubevirt/qemu-5.2.0-15.el8/pubkey.gpg
- arch: x86_64
baseurl: https://download.copr.fedorainfracloud.org/results/@kubevirt/seabios-1.14.0-1.el8/fedora-32-x86_64/
name: kubevirt/seabios-copr-x86_64
gpgkey: https://download.copr.fedorainfracloud.org/results/@kubevirt/seabios-1.14.0-1.el8/pubkey.gpg
- arch: aarch64
baseurl: https://download.copr.fedorainfracloud.org/results/@kubevirt/libvirt-6.6.0-13.1.el8_3/fedora-32-aarch64/
baseurl: https://download.copr.fedorainfracloud.org/results/@kubevirt/libvirt-7.0.0-12.el8/fedora-32-aarch64/
name: kubevirt/libvirt-copr-aarch64
gpgkey: https://copr-be.cloud.fedoraproject.org/results/%40kubevirt/libvirt-6.6.0-13.1.el8_3/pubkey.gpg
gpgkey: https://download.copr.fedorainfracloud.org/results/@kubevirt/libvirt-7.0.0-12.el8/pubkey.gpg
- arch: aarch64
baseurl: https://download.copr.fedorainfracloud.org/results/@kubevirt/qemu-5.1.0-18.el8/fedora-32-aarch64/
baseurl: https://download.copr.fedorainfracloud.org/results/@kubevirt/qemu-5.2.0-15.el8/fedora-32-aarch64/
name: kubevirt/qemu-copr-aarch64
gpgkey: https://copr-be.cloud.fedoraproject.org/results/%40kubevirt/qemu-5.1.0-18.el8/pubkey.gpg
gpgkey: https://download.copr.fedorainfracloud.org/results/@kubevirt/qemu-5.2.0-15.el8/pubkey.gpg
- arch: aarch64
baseurl: https://download.copr.fedorainfracloud.org/results/@kubevirt/seabios-1.14.0-1.el8/fedora-32-aarch64/
name: kubevirt/seabios-copr-aarch64
Expand Down
Loading

0 comments on commit c8a5db3

Please sign in to comment.