Bug 1594194
| Summary: | Make vdsm-client schema cache part of the package | ||
|---|---|---|---|
| Product: | [oVirt] vdsm | Reporter: | Sandro Bonazzola <sbonazzo> |
| Component: | Tools | Assignee: | Marcin Sobczyk <msobczyk> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Pavol Brilla <pbrilla> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.20.31 | CC: | bugs, lsvaty, mperina, msobczyk, pbrilla, pstehlik, ratamir |
| Target Milestone: | ovirt-4.2.7 | Keywords: | Regression |
| Target Release: | --- | Flags: | rule-engine:
ovirt-4.2+
rule-engine: blocker+ lsvaty: testing_ack+ |
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | vdsm-4.20.41 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-11-02 14:30:18 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This bug report has Keywords: Regression or TestBlocker. Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP. QE just sanity check. (In reply to Pavel Stehlik from comment #2) > QE just sanity check. Any update on this? (In reply to Raz Tamir from comment #3) > (In reply to Pavel Stehlik from comment #2) > > QE just sanity check. > > Any update on this? Adding needinfo Requested part is included in last 4.20.37 build:
%package client
Summary: VDSM client
BuildArch: noarch
# A hack for unbreaking external packages that expect vdsm-cli.
Provides: %{name}-cli = %{version}-%{release}
Requires: %{name}-api = %{version}-%{release}
Requires: %{name}-yajsonrpc = %{version}-%{release}
Requires: %{name}-python = %{version}-%{release}
Obsoletes: %{name}-cli < %{version}-%{release}
# Required to generate schema cache in post step
Requires(post): %{name}-api = %{version}-%{release}
Requires(post): python
%description client
Access vdsm API from the command line.
%post client
# Generating api schema caches each installation or update of
# vdsm client package in case the api schema files were changed since last
# installation.
/usr/bin/python -c 'from vdsm.api.vdsmapi import create_cache; create_cache()'
As Requires(post) is not stored anywhere during/after install, this is sanity only test.
Moving back to New: we wanted to get rid of cache generation in post (In reply to Sandro Bonazzola from comment #6) > Moving back to New: we wanted to get rid of cache generation in post Correct, currently we have fixed only RPM dependency issue, but it doesn't help the issue we have on node. Fix for the node issue should be delivered in 4.2.7 sorry for confusion ... Can you provide verification steps for QE? this looks like more internal change7 There are several aspects of the change that can be verified: * previously, vdsm-client created files in '/var/cache/vdsm/schema/' as a post-install step - it was an issue when building oVirt node images and this no longer happens * running 'time vdsm-client -h' shows a significant difference (~2x) without the contents of '/var/cache/vdsm/schema' (which could be pruned by OS at any time) for previous version * simply running 'vdsm-client -h' for new version verifies that the schema files are read correctly - you can check the exit code of the process or the inclusion of strings such as "StoragePool" or "StorageDomain" in the output before without existing /var/cache/vdsm/schema: 4.20.39.1-1.el7ev real 0m1.316s user 0m1.113s sys 0m0.183s after 4.20.42-1.el7ev : real 0m0.858s user 0m0.703s sys 0m0.156s verified This bugzilla is included in oVirt 4.2.7 release, published on November 2nd 2018. Since the problem described in this bug report should be resolved in oVirt 4.2.7 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report. |
The vdsm-client sub package in vdsm-4.20.31 is defined as: %package client Summary: VDSM client BuildArch: noarch # A hack for unbreaking external packages that expect vdsm-cli. Provides: %{name}-cli = %{version}-%{release} Requires: %{name}-api = %{version}-%{release} Requires: %{name}-yajsonrpc = %{version}-%{release} Requires: %{name}-python = %{version}-%{release} Obsoletes: %{name}-cli < %{version}-%{release} %description client Access vdsm API from the command line. %post client # Generating api schema caches each installation or update of # vdsm client package in case the api schema files were changed since last # installation. /usr/bin/python -c 'from vdsm.api.vdsmapi import create_cache; create_cache()' But missing: Requires(post): %{name}-api = %{version}-%{release} Requires(post): python So there's no guarantee that the %post script will be executed correctly since vdsm-client can be installed before python and vdsm-api for example when building oVirt Node. Marking as regression being vdsm-4.20.23 previously released in oVirt 4.2.3 not affected by this.