| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Reading the code, it seems there's something missing...
|
|
|
|
| |
GValue memory management is tricky...
|
|
|
|
|
|
|
|
|
|
|
| |
Creating mutexes with the PTHREAD_MUTEX_ERRORCHECK attribute proved to be
a wrong way. It turned out locking was not working properly as any attempt
to lock already locked mutex failed with a return value that we didn't check.
The only reason we were using this special attribute was to prevent crash on
forcefully unlocking mutex in an unknown state. That didn't work either as long
as EPERM was returned when trying to unlock the mutex that has been locked from
other thread... that was forcefully canceled. That only led to deadlocks
fortunately hard to hit, unfortunately equally hard to debug.
|
| |
|
| |
|
|
|
|
|
| |
Rpm database stores raw device number that needs to be compared with
st_rdev attribute of stat object, not the st_dev one.
|
|
|
|
|
|
|
|
| |
Due to a failure in handling request for instance of
LMI_SoftwareIdentityFileCheck representing non-existent file, a
CIM_ERR_FAILED was delivered to client instead of CIM_ERR_NOT_FOUND.
Resolves: rhbz#1032502
|
|
|
|
|
|
|
| |
Added LMI_DiskPhysicalPackageContainer association between
LMI_DiskPhysicalPackage and LMI_Chassis.
Also, added default values for disk manufacturer and model.
|
|
|
|
| |
A small copy-paste error from commit cb1ffc827
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Indications are often started on CIMOM startup if there are some registered
persistently (or failed their cleanup). This will start several indication
managers as needed. When a new filter is registered, it needs initial values
for polling mode. This is normally done on manage thread iteration but in this
case, when indication manager is already running, it doesn't get filled and
any change event will go unnoticed since we don't have anything to compare
new values against.
This change will immediately fill actual values for newly added filters
in case indications have been already started.
|
|
|
|
|
|
|
|
|
|
| |
Some jobs may not be completable on some machines. With current
algorithm, in case of worker process failure, the terminated process is
resurrected and job is restarted. This patch takes into account the
number of resurrections done during processing of single job. If this
number exceeds some limit, job is thrown away and exception is raised.
Resolves: rhbz#1031132
|
|
|
|
|
|
|
|
| |
Cached YumBase instance may keep some objects with active connection to
files in yum package database. We need to clean them when unlocking
database in order to allow other processes to operate.
Resolves: rhbz#1028535
|
|
|
|
|
|
|
| |
When searching for package with a partial name match, other filtering
properties were ignored.
Resolves: rhbz#1030999
|
|
|
|
|
|
|
|
| |
OpenSUSE distribution uses tilde character (~) in version of their
packages a lot. This patch allows to parse such packages.
Resolves: bz#1031345
Reported-by: Klaus Kämpf <kkaempf@suse.de>
|
|
|
|
|
|
|
| |
Until now repository configuration was reloaded only at the provider
start and when the request related to repositories came.
Resolves: rhbz#1030831
|
|
|
|
| |
non-directory
|
|
|
|
| |
Fix some potential errors in the string formatting.
|
|
|
|
|
| |
This function was not used and contained some potential issues so it's
better to get rid of it.
|