Patrik Martinsson wrote:
Hello Steve.
I use the same method to update my cib, exect for everey update i do i
increase the admin_epoch number to a higher one
<cib admin_epoch="0" epoch="0" num_updates="0"> would mean in my new cib
<cib admin_epoch="1" epoch="0" num_updates="0">then i use the -R -x flag to
cibadmin, like cibadmin -R -x mynewcib.xml
Althou i read in the pdf Micheal Alger sent this following, (that seems to
be a VERY good document btw. thanks for that one)
Yeah that pdf is great. Way better than the documentation on the
website. No offence to whoever wrote it but it seemed to go in circles
without really helping me much. Lots of links that seem to go round and
round.
*admin_epoch *
*Never modified by the cluster. Use this to make the configurations on any
inactive nodes obsolete.
Never set this value to zero, in such cases the cluster cannot tell the
difference between your
configuration and the "empty" one used when nothing is found on disk.*
*epoch*
*Incremented every time the configuration is updated (usually by the admin)*
*num_updates*
*Incremented every time the configuration or status is updated (usually by
the cluster)*
So maybe i shiould try increasing epoch instead of admin_epoch, i´ll try
that later.
Anyway, hope it helps you out.
Best regards,
Patrik Martinsson, student, sweden.
2008/7/4 [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
Here is the process I use to update using the entire cib.xml:
# Dump the CIB to a file:
cibadmin -Q > /tmp/cib.xml
# edit the cib.xml with your updates
vi /tmp/cib.xml
# Short verify:
crm_verify -VVVV -x /tmp/cib.xml
# Long verify:
crm_verify -VVVVV -x /tmp/cib.xml
# Run Ptest to again verify:
ptest -VVVV -X /tmp/cib.xml
# Once happy with new cib file, do the actual CIB replace:
cibadmin -R -x /tmp/cib.xml
# Check that the resources are good:
crm_mon -1
Hope it helps...
-JPH
Steve Wray wrote:
Michael Alger wrote:
On Fri, Jul 04, 2008 at 10:14:57AM +1200, Steve Wray wrote:
Having made a copy of the cib.xml file and modified that copy, I
had thought that the way to make it live was to run:
# cibadmin -R -x cib.xml
Call cib_replace failed (-45): Update was older than existing
configuration
<null>
however, as you can see, this doesn't work.
Its odd because I don't see any data in the update which tells
cibadmin anything about how old it is. I tried touch on the new
cib.xml file but this changed nothing.
I doubt it uses the timestamp of the file you're using in any way,
since you can also make updates by directly passing cibadmin an XML
string.
I think the "epoch" and/or the "num_updates" attributes of the <cib>
element might indicate its age.
Yeah thats what I figured so I removed them in my modified cib.xml file,
still didn't work
Are you copying the cib.xml from the file system, or obtaining it
with cibadmin -Q?
ah yes... I did copy the cib.xml from the filesystem and modify that, then
try to feed it back into cibadmin...
I'll try getting it from cibadmin -Q next time.
Is this not the right way to replace the entire existing cib.xml
with the modified version?
I've never updated the whole CIB, only parts of it, so I'm not
entirely sure. Offhand I'd try modifying the <cib> element to have
no attributes at all, but that may be a bad idea if you're using -R.
This page: http://www.linux-ha.org/v2/AdminTools/cibadmin
only gives examples with replacing specific things; I want to
replace the entire file.
Have you seen this PDF:
http://clusterlabs.org/mw/Image:Configuration_Explained.pdf
(link is to a page about the PDF, not the PDF itself)
I've only just started reading it, but it seems like it will be
pretty informative. I particularly liked the part about the GUI.
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems