This is an automatically generated e-mail. To reply, visit: http://reviewboard-fedoraserver.rhcloud.com/r/203/

Ship it!

config/roles/domaincontroller/role.py (Diff revision 3)
131
    # Initialize role
133
    # Initialize role
132
    def __init__(self, name, directory, *args, **kwargs):
134
    def __init__(self, name, directory, *args, **kwargs):
133
        super(Role, self).__init__(name, directory, *args, **kwargs)
135
        super(Role, self).__init__(name, directory, *args, **kwargs)
134
136
137
        # Add a compiled regular expression for testing domain validity
138
        self.allowed_fqdn = re.compile(r"(?!-)[A-Z\d-]{1,63}(?<!-)$", re.IGNORECASE)

I know this seems super-pedantic, but why not compile the regex once on the class level (if we want to optimize this point ;).


config/roles/domaincontroller/role.py (Diff revision 3)
318
                                   "{} is a local-only hostname".format(prop))
329
                                   "Invalid hostname: %s" % value)

Some day I'll replace all old style string formatting with new-style calls to .format(), I swear. ;)


- Nils Philippsen


On September 2nd, 2015, 5:37 nachm. CEST, Stephen Gallagher wrote:

Review request for RoleKit Mailing List, Miloslav Trmac, Nils Philippsen, Stephen Gallagher, and Thomas Woerner.
By Stephen Gallagher.

Updated Sept. 2, 2015, 5:37 nachm.

Bugs: 43
Repository: rolekit

Description

This patch changes the default behavior of the domain controller
role. After discussions with UXD experts, it was determined that
the domain should never be auto-detected from the environment,
since it is very difficult to change later. It should always come
from some user action.

This patch changes the default domain to use the role instance name
for the domain name, as long as the instance name contains valid
characters. It also changes the behavior of the host_name option to
set the hostname to dc-<16 characters> if it is currently set to
localhost.

Fixes https://github.com/libre-server/rolekit/issues/43

Testing

Deployed multiple domain controllers with varying initial hostnames.

Diffs

  • doc/xml/rolekit.roles.domaincontroller.xml (2416c889ba0035dc6247b2eb209dbe13eb3b9708)
  • config/roles/domaincontroller/role.py (62d2bc64d6efb9c2b7e254c8d61c612f05e4c4be)

View Diff