public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: ccaulfield@sourceware.org To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com Subject: Cluster Project branch, master, updated. cluster-2.99.05-62-gd073771 Date: Thu, 10 Jul 2008 14:19:00 -0000 [thread overview] Message-ID: <20080710141912.22569.qmail@sourceware.org> (raw) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project". http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=d073771dd925558714cbaf1ab3624f9a42d0a12c The branch, master has been updated via d073771dd925558714cbaf1ab3624f9a42d0a12c (commit) from 86eb6e11bea697f6a55009f74e010db09d6a1540 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d073771dd925558714cbaf1ab3624f9a42d0a12c Author: Christine Caulfield <ccaulfie@redhat.com> Date: Thu Jul 10 15:18:12 2008 +0100 [CONFIG] Add a man page for confdb2ldif and make the program do as the man page says. Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> ----------------------------------------------------------------------- Summary of changes: config/tools/ldap/confdb2ldif.c | 4 +- config/tools/man/Makefile | 2 +- config/tools/man/confdb2ldif.8 | 64 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 config/tools/man/confdb2ldif.8 diff --git a/config/tools/ldap/confdb2ldif.c b/config/tools/ldap/confdb2ldif.c index d173d00..ab80dae 100644 --- a/config/tools/ldap/confdb2ldif.c +++ b/config/tools/ldap/confdb2ldif.c @@ -167,7 +167,7 @@ int main(int argc, char *argv[]) fprintf(stderr, " %s dc=mycompany,dc=com\n", argv[0]); fprintf(stderr, " %s dc=mycompany,dc=com rhcluster\n", argv[0]); fprintf(stderr, "\n"); - fprintf(stderr, "objdb root defaults to 'cn=cluster'\n"); + fprintf(stderr, "objdb root defaults to 'cluster'\n"); fprintf(stderr, "\n"); return 0; } @@ -190,7 +190,7 @@ int main(int argc, char *argv[]) exit (1); } - result = confdb_object_find(handle, OBJECT_PARENT_HANDLE, "cluster", strlen("cluster"), &cluster_handle); + result = confdb_object_find(handle, OBJECT_PARENT_HANDLE, clusterroot, strlen(clusterroot), &cluster_handle); if (result != SA_AIS_OK) { printf ("Could not object_find \"cluster\": %d\n", result); exit (1); diff --git a/config/tools/man/Makefile b/config/tools/man/Makefile index 149e93a..8fe29bf 100644 --- a/config/tools/man/Makefile +++ b/config/tools/man/Makefile @@ -1,4 +1,4 @@ -TARGET= ccs_test.8 +TARGET= ccs_test.8 confdb2ldif.8 include ../../../make/defines.mk include $(OBJDIR)/make/man.mk diff --git a/config/tools/man/confdb2ldif.8 b/config/tools/man/confdb2ldif.8 new file mode 100644 index 0000000..2964eec --- /dev/null +++ b/config/tools/man/confdb2ldif.8 @@ -0,0 +1,64 @@ +.TH confdb2ldif 8 + +.SH NAME +confdb2ldif - Create an LDIF file from a cluster configuration + +.SH SYNOPSIS +.B confdb2ldap <basedn> [<config object base>] + +.SH DESCRIPTION +\fBconfdb2ldif\fP reads the cluster configuration from the openais object database +and generates an LDIF file suitable for importing into an LDAP database. The LDIF +file is written to standard output. + +.SH OPTIONS +.TP +\fB<basedn>\fP +This is the base DN of the LDAP server into which the configuration will be imported. +confdb2ldif will create a "cn=cluster" object below this to contain the cluster configuration. +The base DN is usually derived from the host's domain name. So if the host is ldapsrv.mycorp.com +then the base DN could be dc=mycorp,dc=com. +.TP +\fB[<config object base>]\fP +Configuration object in the objdb to start from. This defaults to "cluster" and +there should rarely be any need to change it. + +.SH COMMENTS +\fBconfdb2ldif\fP uses the openais libconfdb to read the configuration. The default way to +do this is run against a running aisexec to read the live configuration. +It is possible to generate an LDIF file from a non-running system by using the standalone feature of openais's libconfdb. +.br +eg to read the configuration from /etc/cluster/cluster.conf, use the following command: + +.nf +OPENAIS_DEFAULT_CONFIG_IFACE=xmlconfig:cmanpreconfig confdb2ldif dc=mycompany,dc=com +.fi + +or to do it from CCS + +.nf +OPENAIS_DEFAULT_CONFIG_IFACE=ccsconfig:cmanpreconfig confdb2ldif dc=mycompany,dc=com +.fi + +The LDIF file is written to stdout and so can be saved or piped straight into ldapmodify if required. +.br +.br +It's important that the 99cluster.ldif schema file has been loaded into the LDAP server +before adding the contents of this generated LDIF file. + +.SH EXAMPLE + +.nf +confdb2ldif dc=mycorp,dc=com | ldapmodify -x -a -D"cn=Directory Manager" -c -v -W +.fi + +.SH BUGS +\fBconfdb2ldif\fP parses the cluster configuration without checking it against the loaded +schema. So if there are attributes in the config file that are not known to the schema, +parts of the load will fail. It is important to check the results of feeding the +output into ldapmodify. In particular aisexec logging operations will not convert +into LDIF because they rely on duplicate keys. + + +.SH SEE ALSO +libconfdb(3), openais(8), cluster.conf(5) hooks/post-receive -- Cluster Project
reply other threads:[~2008-07-10 14:19 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080710141912.22569.qmail@sourceware.org \ --to=ccaulfield@sourceware.org \ --cc=cluster-cvs@sources.redhat.com \ --cc=cluster-devel@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).