Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport NPE fixes #852

Closed
wants to merge 52 commits into from
Closed

Backport NPE fixes #852

wants to merge 52 commits into from

Commits on Sep 30, 2022

  1. Fix limiting GWT resources during RPM build

    Signed-off-by: Martin Perina <mperina@redhat.com>
    mwperina committed Sep 30, 2022
    Configuration menu
    Copy the full SHA
    996c08f View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2022

  1. Skip validation of build environment

    We are checking maximum number of available file descriptors when
    building engine for all support permutations. But in CBS this validation
    doesn't work because maximum number of available file descriptors is not
    reported properly. And we are also limiting number of workers for GWT
    build, so we don't get near this limit.
    
    Signed-off-by: Martin Perina <mperina@redhat.com>
    mwperina committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    fb07222 View commit details
    Browse the repository at this point in the history
  2. Increase GWT localWorkers to 2

    Having 2 localWorkers for GWT build decreases compilation time
    significantly and it doesn't exceed available resources in CBS.
    
    Signed-off-by: Martin Perina <mperina@redhat.com>
    mwperina committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    116ed20 View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2022

  1. core: add callback to RemoveDiskCommand

    Adding callback to RemoveDiskCommand so that it would wait for
    RemoveImageCommand to finish, incl. removing the image from the DB.
    This fixes an issue where RemoveDisk job was marked as FINISHED
    before the image was actually removed from the DB.
    
    Bug-Url: https://bugzilla.redhat.com/2137207
    mkemel authored and ahadas committed Oct 26, 2022
    Configuration menu
    Copy the full SHA
    2adc535 View commit details
    Browse the repository at this point in the history
  2. build: ovirt-engine-4.5.3.2

    Signed-off-by: Martin Perina <mperina@redhat.com>
    mwperina committed Oct 26, 2022
    Configuration menu
    Copy the full SHA
    f70688f View commit details
    Browse the repository at this point in the history
  3. build: post ovirt-engine-4.5.3.2

    Signed-off-by: Martin Perina <mperina@redhat.com>
    mwperina committed Oct 26, 2022
    Configuration menu
    Copy the full SHA
    0b54a45 View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2022

  1. Remove apache-commons-jxpath dependency

    apache-commons-jxpath is no longer needed, it was a dependency of
    apache-commons-configuration, which has been already removed in
    oVirt#619
    
    Signed-off-by: Martin Perina <mperina@redhat.com>
    mwperina committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    c8d5ddc View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2022

  1. add sudo for non-root automation builds

    dnf builddep needs root, let's try a passwordless sudo in case the
    automation is using a different user. Sudo needs to be configred
    separately.
    michalskrivanek committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    584160b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    09bb735 View commit details
    Browse the repository at this point in the history
  3. frontend: Add TPM parameter when cloning a VM from a snapshot

    When cloning a VM from a snapshot, isTpmEnabled parameter is not set
    in VmSnapshotListModel, resulting in a loss of the TPM device and an
    error if the TPM device is mandatory, i.e. for VMs with newer Windows
    versions as the guest OS.  This patch fixes the omission and adds the
    corresponding parameter.
    
    Bug-Url: oVirt#702
    Bug-Url: https://bugzilla.redhat.com/2136180
    mz-pdm authored and ahadas committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    a7633b7 View commit details
    Browse the repository at this point in the history
  4. core: Update TPM device in parameters

    TPM device is not updated in
    VmDeviceUtils.updateVmDevicesInParameters.  This results in omitting
    the TPM device at least when exporting a VM to a data domain and an
    error when the TPM device is mandatory, i.e. for VMs with a modern
    Windows guest OS.  This patch fixes the omission and sets the
    corresponding parameter.
    
    Bug-Url: oVirt#702
    mz-pdm authored and ahadas committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    0089bdf View commit details
    Browse the repository at this point in the history
  5. Create rhv-build (oVirt#725)

    * Create rhv-build
    michalskrivanek authored Nov 2, 2022
    Configuration menu
    Copy the full SHA
    0140945 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    087b27f View commit details
    Browse the repository at this point in the history
  7. Update rhv-build.yaml

    michalskrivanek authored and mrkev-gh committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    88f5e1a View commit details
    Browse the repository at this point in the history
  8. Update rhv-build.yaml

    michalskrivanek authored and mrkev-gh committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    bd8ae93 View commit details
    Browse the repository at this point in the history
  9. Update rhv-build.yaml

    michalskrivanek authored and mrkev-gh committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    99e6295 View commit details
    Browse the repository at this point in the history
  10. Update rhv-build.yaml

    michalskrivanek authored and mrkev-gh committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    5824965 View commit details
    Browse the repository at this point in the history
  11. Update rhv-build.yaml

    michalskrivanek authored and mrkev-gh committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    230c5e9 View commit details
    Browse the repository at this point in the history
  12. Update rhv-build.yaml

    michalskrivanek authored and mrkev-gh committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    b5a3d5a View commit details
    Browse the repository at this point in the history
  13. Update rhv-build.yaml

    michalskrivanek authored and mrkev-gh committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    52fff1c View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2022

  1. core: fail storage domain attach if getImagesList fails

    If getImagesList fails due to an error we should not continue with
    attaching the SD assuming there no disks on the storage as this will
    corrupt the OVF stores.
    
    Instead fail the attach operation and have the user retry once the issue
    is resolved.
    
    Bug-Url: https://bugzilla.redhat.com/2126602
    Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
    bennyz authored and ahadas committed Nov 6, 2022
    Configuration menu
    Copy the full SHA
    6536fa9 View commit details
    Browse the repository at this point in the history
  2. core: fix monitoring of RemoveVm

    Previously, RemoveVm and RemoveAllVmImages didn't have a callback so they
    didn't wait for all instances of RemoveImage to finish before finishing
    RemoveVm and therefore the job of RemoveVm may have been completed while
    the images are still locked in the database.
    
    Now, RemoveVm is completed after RemoveImage completes and the images are
    removed from the database.
    
    Signed-off-by: Arik Hadas <ahadas@redhat.com>
    ahadas committed Nov 6, 2022
    Configuration menu
    Copy the full SHA
    2b9f47d View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2022

  1. build: fix rpm release names for snapshot builds

    GitHub builds had duplicated dates in RPM names. Also swapped date and
    githash so that RPMs are time-sorted. Use githash for snapshot builds.
    michalskrivanek authored and mrkev-gh committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    7479235 View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2022

  1. build: fix return code when SUFFIX is empty

    we run with bash -e, need to make sure all return codes are 0.
    michalskrivanek authored and mrkev-gh committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    894ae2e View commit details
    Browse the repository at this point in the history
  2. build: ovirt-engine-4.5.3.3

    Signed-off-by: Martin Perina <mperina@redhat.com>
    mwperina committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    3af61ab View commit details
    Browse the repository at this point in the history
  3. build: post ovirt-engine-4.5.3.3

    Signed-off-by: Martin Perina <mperina@redhat.com>
    mwperina committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    53bf827 View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2022

  1. core: prevent duplicate audit logs for ReduceImage

    ReduceImage is an asynchronous operation. Previously, on positive flow we
    logged a successful execution message on both 'execute' and 'end-action'
    phases of the command. The former is incorrect and therefore dropped (we
    typically log a message that says that the operation has started at this
    point but we don't plan for another translation cycle so it's not added
    as part of this change).
    
    Bug-Url: https://bugzilla.redhat.com/2141437
    Signed-off-by: Arik Hadas <ahadas@redhat.com>
    ahadas committed Nov 10, 2022
    Configuration menu
    Copy the full SHA
    55911c0 View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2022

  1. core: Imported VM missing in OVFSTORE

    When importing an OVA that is not originated in oVirt the VM will diappear
    after detaching its storage domain. The vm will not be seen in the import VM
    tab. From now on even if the imported VM is no originated in ovirt it could
    be imported after detaching the storage domain.
    
    Bug-Url: https://bugzilla.redhat.com/2028242
    Signed-off-by: Artiom Divak <adivak@redhat.com>
    Signed-off-by: Arik Hadas <ahadas@redhat.com>
    ArtiomDivak authored and ahadas committed Nov 13, 2022
    Configuration menu
    Copy the full SHA
    22a6f93 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2022

  1. build: ovirt-engine-4.5.3.4

    Signed-off-by: Martin Perina <mperina@redhat.com>
    mwperina authored and mrkev-gh committed Nov 16, 2022
    Configuration menu
    Copy the full SHA
    b965428 View commit details
    Browse the repository at this point in the history
  2. build: post ovirt-engine-4.5.3.4

    Signed-off-by: Martin Perina <mperina@redhat.com>
    mwperina committed Nov 16, 2022
    Configuration menu
    Copy the full SHA
    34f8d07 View commit details
    Browse the repository at this point in the history

Commits on Nov 24, 2022

  1. Bump apache-sshd to 2.9.2

    Signed-off-by: Martin Perina <mperina@redhat.com>
    mwperina committed Nov 24, 2022
    Configuration menu
    Copy the full SHA
    2fc4d05 View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2022

  1. Use correct ovirt-engine-build-dependencies version

    Use ovirt-engine-build-dependencies >= 4.5.3 and < 4.5.4, which contains
    latest build dependencies for ovirt-engine-4.5.3.z branch
    
    Signed-off-by: Martin Perina <mperina@redhat.com>
    mwperina authored and mrkev-gh committed Nov 25, 2022
    Configuration menu
    Copy the full SHA
    60d6764 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2022

  1. Revert "packaging: move selinux from ovirt-engine-common to ovirt-eng…

    …ine-setup"
    
    This reverts commit e8eee20.
    
    Moving it causes grafana on a separate machine to fail, because the
    plugin to enable httpd_can_network_connect is now only on the engine
    machine. Reverting that patch should fix that.
    
    This does not introduce a new regression, because the need for it was a
    mere optimization, but is now not needed anymore, as we removed
    use/integration of ansible-runner-service.
    
    Change-Id: I35f57983c03c2de78b16ad63d37f399db103a07b
    Bug-Url: https://bugzilla.redhat.com/2126778
    Signed-off-by: Yedidyah Bar David <didi@redhat.com>
    didib authored and mrkev-gh committed Dec 2, 2022
    Configuration menu
    Copy the full SHA
    f7edcd3 View commit details
    Browse the repository at this point in the history

Commits on Dec 5, 2022

  1. Search correctly entities with user role (oVirt#766)

    When a user is asking for data via the API with some filter (name of the
    required entity for example), we should call implicitly the search
    engine from one hand to implement the filter and from the other hand we
    are getting all the entities that the user can access according to the
    permissions via a pre-defined query.
    Given the search and the query results, both are intersected to given a
    result that matches the given filter with the user authorization.
    
    In AbstractBackendCollectionResource we have two signatures for getBackendCollection method:
    
    protected List<Q> getBackendCollection(QueryType query, QueryParametersBase queryParams)
    protected List<Q> getBackendCollection(QueryType query, QueryParametersBase queryParams, SearchType searchType)
    
    The 1st just brings the query results, teh 2nd brings query and search
    results and intersect them.
    
    When a user tries to search for a specific entity and the 1st signature
    is used instead of the 2nd, the result is that the first item is picked
    from the resulted collection and mismatch the requested entity, this may
    cause an error where an operation is attempted to be excuted with the
    wrong information (for example, creating a template and giving the wrong
    template cluster)
    
    This patch fixes a wrong call to the 1st signature when the 2nd
    signature should be used in the following entities:
    
    Data Centers
    Clusters
    VNIC Profiles
    
    Signed-Off-By: Eli Mesika <emesika@redhat.com>
    Bug-Url: https://bugzilla.redhat.com/2144346
    
    Signed-off-by: Eli Mesika <emesika@redhat.com>
    emesika authored and mwperina committed Dec 5, 2022
    Configuration menu
    Copy the full SHA
    c883510 View commit details
    Browse the repository at this point in the history
  2. build: ovirt-engine-4.5.3.5

    Signed-off-by: Martin Perina <mperina@redhat.com>
    mwperina committed Dec 5, 2022
    Configuration menu
    Copy the full SHA
    2404865 View commit details
    Browse the repository at this point in the history
  3. build: post ovirt-engine-4.5.3.5

    Signed-off-by: Martin Perina <mperina@redhat.com>
    mwperina committed Dec 5, 2022
    Configuration menu
    Copy the full SHA
    b949613 View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2022

  1. core: fix execution of RemoveImage

    RemoveImage now attaches the created async task to itself rather than to
    its parent command and its EndProcedure type is changed to COMMAND_MANAGED.
    With these changes, first the execution of RemoveImage is completed and
    then its parent's callback detects it and completes the execution of the
    parent command.
    
    Signed-off-by: Arik Hadas <ahadas@redhat.com>
    ahadas committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    e98a41a View commit details
    Browse the repository at this point in the history
  2. core: fix async task-less execution of remove-image

    RemoveImage may lack async tasks when:
    1. The image doesn't exist
    2. There's a failure during delete image
    
    With these changes, the image is removed from the database (rather than
    staying in LOCKED state) and the command would finish successfully in
    the first case, and in the second case the command end with failure and
    the image switches to ILLEGAL state.
    
    Signed-off-by: Arik Hadas <ahadas@redhat.com>
    ahadas committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    decf569 View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2023

  1. Fix EL9 build complaining about git unsafe directory

    Mark current directory as safe for git to be able to parse git hash when
    building .src.rpm
    
    Signed-off-by: Martin Perina <mperina@redhat.com>
    mwperina committed Jan 5, 2023
    Configuration menu
    Copy the full SHA
    97c5d2d View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2023

  1. fix setting value to engine config properties

    Setting some of the properties returned an error [1]
    This is a regression caused by https://bugzilla.redhat.com/show_bug.cgi?id=2089299
    
    [1] https://lists.ovirt.org/archives/list/users@ovirt.org/message/OPH7BHGBGWMECQKRXY6GW3YGZR73JK2D/
    
    Signed-off-by: dangel101 <dangel101@gmail.com>
    dangel101 authored and mwperina committed Jan 6, 2023
    Configuration menu
    Copy the full SHA
    cacd843 View commit details
    Browse the repository at this point in the history
  2. executing ansible runner artifacts clean up with fixed delay

    Ansible-Runner artifacts are cleaned up periodically according to the properties
    configured in engine-config:
    AnsibleRunnerArtifactsLifetimeInDays: How many days artifacts will be kept before
    they are cleaned up
    AnsibleRunnerArtifactsCleanupCheckTimeInHours: The periodic time to execute the clean up
    
    Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=2151549
    Signed-off-by: dangel101 <dangel101@gmail.com>
    dangel101 authored and mwperina committed Jan 6, 2023
    Configuration menu
    Copy the full SHA
    53b62cf View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2023

  1. build: ovirt-engine-4.5.3.6

    Signed-off-by: Martin Perina <mperina@redhat.com>
    mwperina committed Jan 25, 2023
    Configuration menu
    Copy the full SHA
    9e5bfdb View commit details
    Browse the repository at this point in the history
  2. build: post ovirt-engine-4.5.3.6

    Signed-off-by: Martin Perina <mperina@redhat.com>
    mwperina committed Jan 25, 2023
    Configuration menu
    Copy the full SHA
    f21a4b1 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2023

  1. Configuration menu
    Copy the full SHA
    fbdcebf View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2023

  1. add debug info

    Adding info regarding the file's creation time in days, current date in days
    and the config value artifacts life time is set to, for easier debugging
    
    Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=2151549
    Signed-off-by: dangel101 <dangel101@gmail.com>
    dangel101 authored and mwperina committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    d9e3e93 View commit details
    Browse the repository at this point in the history
  2. Don't stop clean up when a file cannot be removed

    WE have handled only IOException, but when a file cannot be removed due
    to insufficient permissions then SecurityException is raised and because
    of that we didn't continue with the removal of other directories.
    
    Bug-Url: https://bugzilla.redhat.com/2151549
    Signed-off-by: Martin Perina <mperina@redhat.com>
    mwperina committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    982b9cd View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2023

  1. build: ovirt-engine-4.5.3.7

    Signed-off-by: Michal Skrivanek <michal.skrivanek@redhat.com>
    michalskrivanek committed Feb 9, 2023
    Configuration menu
    Copy the full SHA
    1898c9e View commit details
    Browse the repository at this point in the history
  2. build: post ovirt-engine-4.5.3.7

    Signed-off-by: Michal Skrivanek <michal.skrivanek@redhat.com>
    michalskrivanek committed Feb 9, 2023
    Configuration menu
    Copy the full SHA
    9d0405b View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2023

  1. webadmin: avoid NPE on null rx, tx drops

    Bug-Url: http://bugzilla.redhat.com/2180230
    Change-Id: Iee6fa946f52481091a431a6ef0f173d74f9e37f2
    Signed-off-by: Eitan Raviv <eraviv@redhat.com>
    erav authored and mwperina committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    f4a8f22 View commit details
    Browse the repository at this point in the history

Commits on May 21, 2023

  1. core: fix NPE when picking host for transfer-image

    When picking a host for transfer-image job, we filter hosts that
    are UP and then process the data they reported on storage domains
    without checking whether the host actually reported this data.
    It can happen that hosts are UP and still have not reported data
    on storage domains, in which case the data is null, resulting in
    an NPE in the transfer-image flow.
    
    This patch changes the predicate that is used to filter hosts for
    transfer-image, adding a null-check to avoid that NPE.
    
    Bug-Url: https://bugzilla.redhat.com/2203132
    Signed-off-by: Arik Hadas <ahadas@redhat.com>
    ahadas committed May 21, 2023
    Configuration menu
    Copy the full SHA
    07e2608 View commit details
    Browse the repository at this point in the history
  2. Avoid NPE on refreshlun call without plugged VMs

    Signed-off-by: Laszlo Szomor <laszomor@gmail.com>
    lszomor authored and ahadas committed May 21, 2023
    Configuration menu
    Copy the full SHA
    39f3a78 View commit details
    Browse the repository at this point in the history
  3. core: simplify SyncDirectLunsCommand#getPluggedVms

    Signed-off-by: Arik Hadas <ahadas@redhat.com>
    ahadas committed May 21, 2023
    Configuration menu
    Copy the full SHA
    0870417 View commit details
    Browse the repository at this point in the history