[Freeipa-devel] [PATCH] stop using uuid in DS instance names
Richard Megginson
rmeggins at redhat.com
Fri Oct 19 17:32:35 UTC 2007
Karl MacMillan wrote:
> The use of a uuid for the DS instance name is overkill and it is a real
> pain. This patch will use ipa-realm-name instead (resulting in something
> like slapd-ipa-EXAMPLE.COM).
>
That probably won't work either - Fedora DS has problems when there is a
"." in the instance name - see
https://bugzilla.redhat.com/show_bug.cgi?id=316831
> Karl
>
> ------------------------------------------------------------------------
>
> # HG changeset patch
> # User "Karl MacMillan <kmacmill at redhat.com>"
> # Date 1192814547 14400
> # Node ID f0e409c7191ea32e58a39c6ddc4468b08a8ba5e7
> # Parent 61c76c977b20c469a627603b2b90ddafee8342a2
> Remove the use of uuid in the directory server instance name.
>
> diff --git a/ipa-server/ipaserver/dsinstance.py b/ipa-server/ipaserver/dsinstance.py
> --- a/ipa-server/ipaserver/dsinstance.py
> +++ b/ipa-server/ipaserver/dsinstance.py
> @@ -34,18 +34,6 @@ def ldap_mod(fd, dn, pwd):
> def ldap_mod(fd, dn, pwd):
> args = ["/usr/bin/ldapmodify", "-h", "127.0.0.1", "-xv", "-D", dn, "-w", pwd, "-f", fd.name]
> run(args)
> -
> -def generate_serverid():
> - """Generate a UUID (universally unique identifier) suitable
> - for use as a unique identifier for a DS instance.
> - """
> - try:
> - import uuid
> - id = str(uuid.uuid1())
> - except ImportError:
> - import commands
> - id = commands.getoutput("/usr/bin/uuidgen")
> - return id
>
> def realm_to_suffix(realm_name):
> s = realm_name.split(".")
> @@ -82,7 +70,7 @@ class DsInstance:
>
> def create_instance(self, ds_user, realm_name, host_name, dm_password):
> self.ds_user = ds_user
> - self.serverid = generate_serverid()
> + self.serverid = "ipa-" + realm_name
> self.realm_name = realm_name.upper()
> self.suffix = realm_to_suffix(self.realm_name)
> self.host_name = host_name
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Freeipa-devel mailing list
> Freeipa-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/freeipa-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3245 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20071019/e0bf89a4/attachment.bin>
More information about the Freeipa-devel
mailing list