Added locks when working with the variable conn #PSBM-152468The conn variable is responsible for connection when working
with dbus from libvcmmd. When working with conn from multiple
threads, it is possible to race for data when the conn
variable is assigned the value NULL. This causes the assert
to be triggered in dbus and the subsequent drop in virtqemud.
We add locks when working with this variable from multiple threads.
Signed-off-by: Fima Shevrin ...
Merge pull request #19 in OVZ/libvcmmd from ~ADROB/libvcmmd:master to master* commit '604339e81657ccdfb279237a7c251d932c26b5a1':
Add dist-vz7-u19 build tag
Merge pull request #18 in OVZ/libvcmmd from ~ADROB/libvcmmd:master to master* commit '26410442bb2b5b45f10866d1d1969824543a2e85':
Get rid of "stringop-truncation" error
Get rid of "stringop-truncation" errorSince we know for sure that the following condition is met:
strlen(vcmmd_bus_name) <= VCMMD_BUSNAME_MAXLEN - 1
as we check it when discovering bus name, it's safe to use plain strcpy
(instead of strncpy) when initializing interface name.
Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Merge pull request #17 in OVZ/libvcmmd from ~ADROB/libvcmmd:master to master* commit '9abfc4c249a9a147fbdf8a3e6ae58a74e33c997d':
Introduce VCMMD_ERROR_BUSNAME_FETCH_FAILED error code
Fix error handling when getting bus name
Merge pull request #16 in OVZ/libvcmmd from ~ADROB/libvcmmd:master to master* commit 'c6f0cec20444a6773b7908ae932b8db5130ec2c6':
Discover dbus name for vcmmd service dynamically
Merge pull request #14 in OVZ/libvcmmd from ~ADROB/libvcmmd:master to master* commit '4fba961190f21e2e202cdc0783cf2452d891ffdd':
Do not build for vz8-beta anymore
Merge pull request #13 in OVZ/libvcmmd from ~ADROB/libvcmmd:master to master* commit '6794dc92246c2792927c7c59c7529d5bda977955':
Add VCMMD_VE_CONFIG_CACHE and VCMMD_VE_CONFIG_CPUNUM config keys
Merge pull request #12 in OVZ/libvcmmd from ~ADROB/libvcmmd:master to master* commit '53e7c55bdffc2f8dc8c4059fa776201c69785aa9':
Increment major version to 8.0.0
Add targets.list file
Merge pull request #11 in OVZ/libvcmmd from ~ADROB/libvcmmd:master to master* commit '2d2e1a6bf5115238e5d34abf69ddb03bf0b2e547':
vcmmd_unregister_ve: return error code got from VCMMD
vcmmd_unregister_ve: return error code got from VCMMDStop returning VCMMD_ERROR_CONNECTION_FAILED in case it's not appropriate.
Now we return the error returned by VCMMD itself (if non-zero), or
VCMMD_ERROR_INVALID_VE_CONFIG in case parsing DBus reply was
unsuccessful.
PSBM-133944
Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Merge pull request #8 in OVZ/libvcmmd from ~TRUSHKIN/libvcmmd:master to master* commit '5c573a7c6e6d8d89f962914432c06ac15ba3bf26':
Handle org.freedesktop.DBus.Error.Disconnected
Handle org.freedesktop.DBus.Error.DisconnectedAfter restarting DBus service, libdbus continues using shared
connection which becomes invalid. So, it's not possible to manage
vcmmd via prl-disp service w/o restarting second one. libdbus doesn't
provide any facilities to handle this issue while using shared
connection.
This CL enables using private connection from libvcmmd and
handling the case described above.