| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
/usr/bin/mofcomp requires that Pegasus runs at the time the script is executed.
Therefore we could not register any MOF files into database if Pegasus was
down.
To fix this, openlmi-mof-register now does not depend on mofcomp and
contains its own MOF parser to parse just '#pragma include' directives,
comments and string literals.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The approach introduced in commit 381f4038a6a was on a good way however
turned out the pthread_cancel() actually queues a cancellation request
since we're using deferred cancellation mode and continues the code flow
until a function that is a cancellation point is called. We unlocked
the mutex before joining the thread which led to mutex acquisition by
the thread and then cancelling on a syscall, leaving the mutex locked
forever.
Having cancellation and join with mutex held was not a solution as it
would make the thread waiting for mutex leading to deadlock.
Instead, this patch introduces a private flag that will indicate the
thread should cancel itself. Two scenarios are possible:
- the thread is doing unlocked stuff, typically waiting for events
using syscalls that are cancellation points. In this case the
pthread_cancel() will take effect immediately, breaking the syscall
and quitting the thread. We're still in unlocked state.
- the thread is holding the lock, in that case the im_stop_ind() will
wait until that work is finished. It's better to leave the manage
thread finish its job, it's mostly CMPI stuff and breaking in the
middle would leak some memory. Once the main thread acquires the
mutex, it cancels the thread, sets a private flag and unlocks again.
While waiting for thread join is finished, the thread picks up the
lock again as it was waiting for it and as a first thing it will
check the private flag and quits gracefully, unlocking the mutex.
As a side effect, the pthread cancellation machinery has no chance
to kick in as there was no cancellation point on the way.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and References.
This simple test calls EnumerateInstances and EnumerateInstanceNames on all
LMI_* classes and then calls GetInstance, AssociatorNames, Associators,
ReferenceNames and References on all instances.
It does not check actual content of returned names and instances, it just
checks that the above calls do not crash and are consistent (e.g.
EnumerateInstanceNames returns the same set as EnumerateInstances).
|
|
|
|
|
|
| |
Added openlmi-python-test subpackage with contents taken from
src/python/lmi/test. This allows for testing code charing among verious
openlmi* git repositories.
|
|
|
|
|
|
| |
Power provider didn't call power_ref to init itself when enumerating some
"static" objects like LMI_HostedPowerManagementService. But it has to be
called because of obtaining hostname from ComputerSystem instance.
|
|
|
|
|
|
|
|
|
| |
CIM_PowerManagementCapabilities class has the description decorator
poorly written from formatting point of view. There are missing
newlines, spaces, etc. This commit rewrites the doc and cleans it up.
It also removes non-implemented items from the PowerStatesSupported
valuemap.
|
|
|
|
|
| |
New provider:
* LMI_DiskDriveSoftwareIdentity
|
|
|
|
|
|
|
|
| |
Fixed package installation tests that did not ensure that particular package is
uninstalled before test begins.
Speeded up test set up phase for TestSoftwareIdentityFileChecks and
TestSoftwareIdentityChecks.
|
|
|
|
|
|
|
| |
Environment needs to be propagated to factory function of CIMError when
error occurs while handling asynchronous job.
Resolves: rhbz#1043243
|
|
|
|
|
| |
Packages with empty source tarballs failed to build on rhel7. Added
empty readmes to previously empty packages to fix it.
|
|
|
|
|
|
|
|
|
|
|
| |
In some rare cases, digest algorithm is not set in rpm packages (happens
on rhel7). Try to deduce it from hash digest stored for installed files
and fallback to some sane default.
In case it's not set, package use md5 digest algorithm for its files.
Provider failed to generate it correctly. The Checksum was doubled.
Resolves: rhbz#1032590
|
|
|
|
|
|
|
|
| |
get_target_operating_system returns a tuple which can not be equal to
integer. Due to this error, GetInstance() call failed on on
LMI_SoftwareIdentityFileCheck objects on rhel7.
Resolves: rhbz#1032590
|
|
|
|
|
|
|
|
|
|
|
| |
Files residing on nodevice or remote filesystems now correctly set these
properties. FSCreationClassName is set to "LMI_TransientFileSystem" and
FSName is set to "PATH=<path to file>". This behavior is consistent with
how storage providers set those properties. To check for filesystem, the
provider uses udev and checks for ID_FS_UUID_ENC and DEVNAME fields. If
these are not found, filesystem is then considered nodevice or remote.
Additional test for files on transient filesystems has been added.
|
| |
|
|
|
|
|
|
| |
This should belong in commit 2b22e29 that reworked job handling.
Resolves: rhbz#1039018
|
|
|
|
|
| |
$RPM_BUILD_DIR is not created before %install phase on rhel7. It needs
to be done explicitly.
|
|
|
|
| |
Test installation, removal and updating of rpm packages.
|
|
|
|
|
| |
Assert that InstallDate is filled properly for available packages that
are installed.
|
|
|
|
|
| |
Speeded up test initialization and cleanup. Use as few calls to
subprocesses as possible.
|
|
|
|
|
|
| |
This is a collective work of Jan Grec and Michal Minar.
Added tests for LMI_SoftwareInstallationService.
Added tests for software provider as a whole.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was a serious flaw in previous object model. JobManager was a
thread spawned from inside of separated YumWorker process. Meanwhile
IndicationManager was spawned in provider process which is correct
otherwise it coult not send indications through broker.
The problem is that JobManager needs to create indications and access
IndicationManager. But they were in different processes.
JobManager worked with static data duplicated from provider process when
the worker process has been forked. Therefor all subscriptions and
indication enablement made after the worker processed has been
created did not affect jobmanager.
For some unknown reasons this could also cause a segfault to worker
process when creating indications that were sent to provider process.
This patch shuffles classes a bit:
* JobManager is spawned as a thread in provider process by YumDB.
* JObManager spawns its own SessionManager that is a wrapper for
YumWorker process
* SessionManager is a thread running in provider's process. It
manages worker process and ensures that yum database is locked when
there is an active session.
* YumWorker does not spawn any other process. It processes jobs one by
one.
Resolves: #1039018
|
|
|
|
|
|
|
|
|
| |
When available packages were searched, they were all treated as not
installed. Yum uses two different classes to represent installed and
available packages and the same package may instantiated from both of
them.
Resolves: #1039025
|
| |
|
|
|
|
|
|
|
|
|
| |
This patch increases the timeout for all the D-Bus message send calls to
DBUS_TIMEOUT_INFINITE. This means we wait for Realmd to finish the join/leave
operations: it is hard to predict how long can those take and the default D-Bus
timeout may not be enough. When the enrollment takes more than what's the D-Bus
default timeout, the provider reports (false) failure even when the oprations
succeeds.
|
|
|
|
|
|
|
|
| |
This patch makes lsblk primary source for information about disks instead of
smartctl. This change was needed because in virtual environment some disks might
be recognized by smartctl while others not, and in this case, some disks would
be missing in LMI classes. With lsblk, all disks are always listed. Smartctl
is used as source of additional information if avaiable.
|
| |
|
| |
|
|
|
|
|
| |
New provider:
* LMI_DiskDriveSystemDeviceProvider
|
| |
|
|
|
|
|
| |
New provider:
* LMI_DiskDriveRealizes
|
|
|
|
| |
Set strict version dependencies for the meta-package
|
|
|
|
|
|
|
|
|
| |
Found by clang analysis:
Error: PW.BRANCH_PAST_INITIALIZATION:
openlmi-providers-0.4.1_75_gf47c906/src/account/LMI_AccountProvider.c:324: branch_past_initialization: transfer of control bypasses initialization of:
openlmi-providers-0.4.1_75_gf47c906/src/account/LMI_AccountProvider.c:324: caretline: ^
openlmi-providers-0.4.1_75_gf47c906/src/account/LMI_AccountProvider.c:324: name_at_decl_position: variable "groups" (declared at line 328)
|
|
|
|
|
|
|
|
|
|
|
|
| |
In certain cases password may be stored in /etc/passwd directly and we
need to tell libuser where to pull the password from. This patch
automatically falls back to /etc/passwd if there's no password found
in /etc/shadow. In case password retrieval fails in both cases, the
UserPassword and UserPasswordEncoding LMI_Account properties are left
unset.
Based on a patch by Klaus Kämpf <kkaempf@suse.de>
https://bugzilla.redhat.com/show_bug.cgi?id=1031334
|
|
|
|
|
|
|
| |
New provider:
* LMI_DiskDriveProvider
Also, added missing config init to disk providers.
|
| |
|
|
|
|
| |
Blame me, commit 52cdb2a9c497
|
|
|
|
|
|
|
|
|
|
|
| |
Added one test to SoftwareIdentityFileCheck.Invoke() method testing
correct error code.
Renamed testing package pkg1 to pkg2 in misc repository to match its
comment.
Rendering function CIMInstanceNames should behave nicely for
objects of another type and return their text representation.
|
|
|
|
|
|
|
|
| |
CIM_ERR_NOT_FOUND shall be raised when objectpath of invoked method does
not refer to existing repository. CIM_ERR_FAILED was raised instead
which is unhelpful.
Resolves: rhbz#1036291
|
|
|
|
|
|
|
|
| |
This fix repairs previous patch trying to speed up generating of
software identities associated with software collection through
LMI_MemberOfSoftwareCollection.
Resolves: rhbz#1035328
|
|
|
|
|
|
| |
LMI_SoftwareInstallationService passed incorrect value in InstanceID
property. Value should contain the whole class name, not shortened
version.
|
|
|
|
|
| |
This patch adds test modul for LMI_InstallationServiceAffectsElement
association class.
|
|
|
|
|
|
|
|
|
|
|
| |
LMI_SoftwareInstallationServiceAffectsElement association class
generated just the newest available packages. With this patch, all
available packages are generated.
When generating associators of installation service ComputerSystem
instance was omitted. This patch adds it to generated items.
Resolves: rhbz#1034698
|
|
|
|
|
|
| |
Software tests now create custom testing repositories and packages.
This makes them more robust and efficient (nothing needs to be
downloaded).
|
|
|
|
|
| |
...to prevent race of the watcher thread still using data that has been
freed just a moment ago.
|
|
|
|
|
|
|
|
|
|
| |
Associators generator of LMI_MemberOfSoftwareCollection is broken. It
adds Collection property to genereted instance names of
LMI_SoftwareIdentity. Moreover its very slow if instances are requested.
This patch removes superfluous key property and adds optimizations
reducing its execution time to seconds.
Resolves: rhbz#1035328
|
|
|
|
|
|
|
|
|
|
| |
Associators generator of LMI_SoftwareIdentityServiceAffectsElement is
broken. It generates only CIM_ComputerSystem, not any
LMI_SoftwareIdentity instance. And if it did, it would be too slow (tens
of minutes). This patch allows software identities to be generated and
adds optimizations reducing its execution time to seconds.
Resolves: rhbz#1034698
|
|
|
|
| |
As pointed out by scanbot :).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the indication manager thread was stopped, it destroys its mutex and
creates new one. If pthread_mutex_destroy() fails because the mutex is
locked, the new mutex is not created -> the old one is used, but it's already
locked -> deadlock.
So let's make sure the thread does not hold the mutex when destroying the thread.
Rewrite of indication manager thread is needed to have the manage() function
interruptible when waiting for events, e.g. using a pipe and select(),
this pthread_cancel leads to memory leaks.
|
|
|
|
|
|
|
| |
Enumeration of LMI_SoftwareInstallationServiceAffectsElement did not
work. Provider would hang indefinitely.
Resolves: rhbz#1034615
|
|
|
|
|
|
| |
included mofs to cache.
/usr/bin/mofcomp from pywbem is used for the parsing.
|