Andrew Beekhof wrote:
On 4/6/06, Alan Robertson <[EMAIL PROTECTED]> wrote:
Huang Zhen wrote:
The GUI client and CIM need management library to implement batch
operation.
It means that user can add a set of operations but not need do it actually,
then commit all these operations in one command.
To do this we need cib's help.
With current cib API all changes are sent cib daemon immeidately.
Like
"
rc = cib_conn->cmds->update(
cib_conn, "crm_config", fragment, &output, 0);
"
Can we implement a kind of copied cib to do the batch operation?
The management library will create a copy of cib when user begins the
batch operation.
Then all changes would be sent to this copy.
When user wants to commit, send the xml in local cib copy to cib daemon.
We can reuse the current cib code. Two functions may be enough:
copy_cib_conn() and commit_cib_conn().
And your suggestions on this batch operations?
To me, this sounds reasonable. Andrew?
You can do that already... but what if the CIB changed in the meantime?
And before someone says locking...
What if a transition is in progress?
What if a failure occurs while the CIB is being modified?
Should I deny the updates from resource actions?
Resource actions should only affect the status section.
Ditto for transitions.
Any particular kind of failure did you have in mind above?
--
Alan Robertson <[EMAIL PROTECTED]>
"Openness is the foundation and preservative of friendship... Let me
claim from you at all times your undisguised opinions." - William
Wilberforce
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/