Add prefix for WConfD livelock file name

WConfD will also need a livelock to request locks in its
own name, e.g., when providing short-lived locks.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Aaron Karper <akarper@google.com>
Move unpacking of config-change to a separate function

In this way, the logic of determining whether the configuration needs
to be distributed, as well as the implicit serial numb can be shared
with other functions.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Aaron Karper <akarper@google.com>
Support config-changes with temporary ConfigLock

Support changes of the configuration with a temporarily acquired
configuration lock. This can be used to support requests to directly
change parts of the configuration.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Aaron Karper <akarper@google.com>
Extend modifyConfig to also modify TempResState

Extend the modifyConfig function to also support modifications
of the state of temporary reservations.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Aaron Karper <akarper@google.com>
Extend config modification to depend on TempRes

Extend modifyConfigWithLock so that the config modification
may also depend on the state of the temporary reservations.
This is needed, e.g., to commit temporary IP reservations.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Aaron Karper <akarper@google.com>
Make WConfD export a function to add an instance

This function handles all the configuration modifications
necessary: it adds the instance to the list of instances,
drops the DRBD minor reservations, and commits the temporary
IPs.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Aaron Karper <akarper@google.com>
Add instances to the configuration directly via WConfD

Make jobs adding instances do so by means of the corresponding
WConfD function. In this way, no long-lived config lock has to
be acquired.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Aaron Karper <akarper@google.com>