From 118f8a2f7ac52f286e147f68c5abb7aca9a88120 Mon Sep 17 00:00:00 2001 From: Simon Pichugin Date: Mar 08 2019 11:04:25 +0000 Subject: Issue 50263 - LDAPS port not listening after installation Bug description: When I add an additional instance to my server, an error is displayed at the end of the installation and the LDAPS port is not listening. The issue was introduced in https://pagure.io/389-ds-base/pull-request/50202#_7__59 Fix description: Make interactive installation process general["start"] argument. https://pagure.io/389-ds-base/issue/50263 Reviewed by: mreynolds, wibrown, mhonek (Thanks!) --- diff --git a/src/lib389/lib389/instance/options.py b/src/lib389/lib389/instance/options.py index d2dfe85..5ee69a3 100644 --- a/src/lib389/lib389/instance/options.py +++ b/src/lib389/lib389/instance/options.py @@ -1,5 +1,5 @@ # --- BEGIN COPYRIGHT BLOCK --- -# Copyright (C) 2016 Red Hat, Inc. +# Copyright (C) 2019 Red Hat, Inc. # All rights reserved. # # License: GPL (version 3 or any later version). @@ -126,7 +126,6 @@ class General2Base(Options2): self._type['systemd'] = bool self._helptext['systemd'] = "Enables systemd platform features. If set to \"True\", dscreate auto-detects whether systemd is installed. Set this only to \"False\" in a development environment." - self._options['start'] = True self._type['start'] = bool self._helptext['start'] = "Starts the instance after the install completes. If false, the instance is created but started." diff --git a/src/lib389/lib389/instance/remove.py b/src/lib389/lib389/instance/remove.py index 5fbd511..378cd64 100644 --- a/src/lib389/lib389/instance/remove.py +++ b/src/lib389/lib389/instance/remove.py @@ -1,5 +1,5 @@ # --- BEGIN COPYRIGHT BLOCK --- -# Copyright (C) 2016 Red Hat, Inc. +# Copyright (C) 2019 Red Hat, Inc. # All rights reserved. # # License: GPL (version 3 or any later version). diff --git a/src/lib389/lib389/instance/setup.py b/src/lib389/lib389/instance/setup.py index 71b9e3d..757450d 100644 --- a/src/lib389/lib389/instance/setup.py +++ b/src/lib389/lib389/instance/setup.py @@ -1,5 +1,5 @@ # --- BEGIN COPYRIGHT BLOCK --- -# Copyright (C) 2016 Red Hat, Inc. +# Copyright (C) 2019 Red Hat, Inc. # Copyright (C) 2019 William Brown # All rights reserved. # @@ -240,7 +240,7 @@ class SetupDs(object): # Set the defaults general = {'config_version': 2, 'full_machine_name': socket.getfqdn(), 'strict_host_checking': True, 'selinux': True, 'systemd': ds_paths.with_systemd, - 'defaults': '999999999'} + 'defaults': '999999999', 'start': True} slapd = {'self_sign_cert_valid_months': 24, 'group': ds_paths.group, @@ -478,6 +478,19 @@ class SetupDs(object): else: break + # Start the instance? + while 1: + val = input('\nDo you want to start the instance after the installation? [yes]: ').rstrip().lower() + if val == '' or val == 'yes' or val == 'y': + # Default behaviour + break + elif val == "no" or val == 'n': + general['start'] = False + break + else: + print('Invalid value, please use \"yes\" or \"no\"') + continue + # Are you ready? while 1: val = input('\nAre you ready to install? [no]: ').rstrip().lower()