| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
It was impossible to remove user when its home directory was unable
to delete, e.g. either pointing to a bad location or inaccessible as
in not being mounted, etc. Even the "force" argument didn't help.
For this reason, any failure on homedir deletion is now ignored and
a warning is noted in the log. The particular error return code is
unused now but kept in the MOF file for compatibility, adding a note.
|
|
|
|
| |
This ideally shouldn't happen in well writen providers.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes the way the inotify watching is done. Instead of
watching files directly, we watch the directory they reside in and just
filter out changes in files we don't want to watch. This brings a benefit
of reliable notification through file deletions and other inode number
changing changes. It's also less racy as we had to recreate watches on
IN_IGNORED events with possibility of missing some events. File deletions
or atomic replaces were always problematic.
There are some lingering issues however. The most severe is a problem of
shadow files and libuser calls. At the time the event is processed further
in the gather() method, shadow files may not been updated yet. This causes
libuser to miss some information required for proper CIM object instance
construction, potentially propagating half-baked data to the user. This
could be solved by implementing a settle timeout, possibly compressing
more fast-coming events into one. For the moment a simple artificial
sleep has been put before returning from the watcher in good hope shadow
files are updated properly.
Then there's a current problem of throwing out the rest of the read buffer,
losing notifications of other files if watched. This is by current design
of the watcher callback and could be fixed by implementing proper event
queue.
|
|
|
|
|
|
| |
When cimom is terminated or killed and the provider is requested to
clean up, let's stop waiting for separated process to complete its jobs
and raise an error instead.
|
|
|
|
|
| |
Let's not process any additional jobs when terminating command has been
received.
|
|
|
|
|
|
|
| |
Separated process did a clean up only when the session ended. But when
cimom is suddenly terminated or killed, process can receive terminating
command even during the session. Let's clean up yum database and cached
objects when that happens.
|
|
|
|
|
|
|
|
|
|
|
| |
When job manager received None command (which says "shut down") it
is was enqueued into priority queue where comparison functions did not
count with None as a valid object. This does not have inpact on
functionality (job manager and YumWorker terminate anyway) but the
terminating message is not written into log due to an AttributeError.
This modifies comparison function to accept None and give it the highest
priority.
|
|
|
|
|
|
|
| |
Separated process disables all loggers when starting up because most of
them are not needed anymore. That includes tracing function in
lmi.base.cmpi_logging. This logger needs to be reenabled in order for
trace messages to be logged.
|
|
|
|
|
|
|
| |
This greatly speeds up listing of associators of
LMI_SoftwareIdentityResource. Packages of particular reposity can now be
listed in few seconds (for 2000 pkgs large repository) instead of
minutes.
|
|
|
|
|
|
|
|
|
| |
Listing of installed packages could take several minutes. With overriden
and optimized MI_associators method this is reduced to several seconds.
Original method calls GetInstance() on each returned object path which
is very time consuming operation in this case.
This resolves: rhbz#1005803
|
|
|
|
|
| |
Fixed examples for account provider.
Some were syntactically wrong, others were very inefficient.
|
|
|
|
| |
Examples are now usable with the newest shell.
|
|
|
|
|
| |
0 shall be returned on successful run of tests and 1 otherwise.
Not the other way round.
|
|
|
|
| |
Limit number of randomly selected packages to speed up tests.
|
|
|
|
|
|
|
| |
CMake doesn't like spaces around version requirements in pkg-config checks.
Unfortunately also maintains configure cache and doesn't pick the changes in
CMakeLists.txt up automatically so my typo went unspotted during testing.
Damn.
|
|
|
|
|
| |
The commit aac4d3a0d1dc brought new symbols in the code without bumping
libuser version req.
|
|
|
|
|
|
| |
When the watcher() callback returns unsuccessfully and gather() part
has not been run, we may end up with NULL enums that have been originally
created by add_enumeration(). This prevents segfault in such case.
|
|
|
|
|
|
|
| |
When provider is disabled via WITH-PROVIDER=OFF in cmake, don't install
even the mof file.
Fixes ticket #170.
|
| |
|
| |
|
|
|
|
|
| |
New Provider:
* LMI_DiskPhysicalPackage
|
|
|
|
|
| |
Skipped two unreliable performed on random packages. This is a temporary
solution.
|
|
|
|
|
| |
TargetOperatingSystem property is tested also in
TestSoftwareIdentityChecks, let's share the code in util module.
|
|
|
|
| |
Also remove dependency on sblim-cmpi-base
|
| |
|
| |
|
|
|
|
|
| |
Few tests of LMI_SoftwareIdentityFileCheck are not reliable on randomly
selected package. Let's skip them temporarily.
|
|
|
|
| |
Make sure to check for correct TargetOperatingSystem for rhel.
|
|
|
|
|
|
|
|
|
| |
Can't really have global variables for threads and mutexes as long
as there are more indication managers running, simultaneously using
the same objects, leading to deadlock in a matter of time.
This patch moves the pthread stuff in the IMManager struct which is
(usually) speficic to each CIM indication class.
|
|
|
|
|
| |
Potential double free or freeing of uninitialized memory. Fixes some
asserts thrown from libuser.
|
|
|
|
|
|
|
|
|
|
| |
This is an attempt to get rid of most probable race conditions by creating
inotify watches outside the watcher thread and making them persistent for
the whole time the indication subscription is active. There's a certain
amount of time when watching if off due to gather part of the indication
manager. Leaving a watch fd open with active watches allows us to queue
events that we process next time the watcher is called (once gather part
is finished).
|
| |
|
|
|
|
|
| |
LMI_InstalledSoftwareIdentity generated wrong object paths of
SoftwareIdentities. System does not belong into its keys.
|
|
|
|
|
| |
Base software tests on LmiTestCase from lmi.test.base. Use lmi.shell
abstractions instead of plain pywbem.
|
|
|
|
| |
Do not use packages related to openlmi and CIM for testing purposes.
|
|
|
|
|
| |
Base test classes have been renamed, this patch makes small provider
tests working again.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Base test case class is renamed to BaseLmiTest. But it's not intended
for direct use in provider tests. For this purpose two more classes are
added. Namely LmiTestCase and CIMTestCase.
Tests wanting to take advantage of lmi shell's power should subclass
LmiTestCase. Those based on pure pywbem code shall subclass the other
one.
Added lots of convenience methods. Allowed to use lmi.shell abstractions
if available.
Useful utilities are moved to standalone util module.
|
|
|
|
| |
Whitespaces hunting.
|
|
|
|
|
|
|
| |
Dangerous tests changing yum package database are not reliable because
they operate on dynamically changing repositories. This patch
temporarily disables them until custom testing repositories are created
for the purpose of software tests.
|
|
|
|
|
| |
Do not presume that any cache is available before call to yum.
If the cache is not there, call fails.
|
| |
|
| |
|
|
|
|
| |
library.
|
|
|
|
|
|
|
|
|
| |
system_name property has been removed from BaseConfiguration.
This replaces remaining reference with access to ComputerSystem module.
Silently ignore the first access to get_system_name() when
ComputerSystem instance has not been loaded yet. host property is not
mandatory.
|
|
|
|
|
| |
Let's use gethostname() instead of querying BaseConfiguration's system_name
property that has been removed.
|
|
|
|
|
| |
Removed import from software provider. providers package can not depend
on any lmi provider package.
|
|
|
|
|
|
| |
1) Account: Use new atomic libuser api.
2) Account: Added author and license to lock.c and lock.h.
3) Account: Added group locking to LMI_AccountProvider.
|