Bug 36807 - UMC Setup denies trying again when a joinscript failed
UMC Setup denies trying again when a joinscript failed
Status: RESOLVED DUPLICATE of bug 40046
Product: UCS
Classification: Unclassified
Component: UMC - Setup wizard
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-x
Assigned To: UMC maintainers
:
: 34998 38987 39648 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-18 13:21 CET by Arvid Requate
Modified: 2016-04-11 16:22 CEST (History)
5 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:
best: Patch_Available+


Attachments
management-console-module-setup.log (3.54 KB, text/x-log)
2014-11-18 13:21 CET, Arvid Requate
Details
Screenshot (308.97 KB, image/png)
2015-07-01 17:39 CEST, Florian Best
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2014-11-18 13:21:28 CET
Created attachment 6409 [details]
management-console-module-setup.log

When a joinscript fails during the initial UMC setup of say a Samba4 DC Slave, the GUI offers to "try again". But when you try that you get this traceback and you are stuck with the only option to reinstall:


==========================================================
08.01.14 14:56:13.427  MODULE      ( PROCESS ) : Die Ausführung des Kommandos setup/join ist fehlgeschlagen:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/__init__.py", line 176, in _decorated
    return function(self, request, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 316, in _response
    result = _multi_response(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 460, in _response
    return list(function(self, iterator, *nones))
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 282, in _fake_func
    yield function(self, *args)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/setup/__init__.py", line 231, in join
    raise Exception(_('Already joined systems cannot be joined.'))
Exception: Bereits gejointe Systeme können nicht gejoint werden.
==========================================================

In my case it was Bug 36806 which lead to my initial join failure and I wanted to try again after fixing the issue manually.
Comment 1 Alexander Kläser univentionstaff 2014-11-20 10:21:38 CET
At a different setup where an error occurred due to an computer account with the same MAC address, I could start the join process again.
Comment 2 Florian Best univentionstaff 2014-11-20 10:26:57 CET
(In reply to Alexander Kläser from comment #1)
> At a different setup where an error occurred due to an computer account with
> the same MAC address, I could start the join process again.
well, in your case the join completely failed because the computer already exists in LDAP with the MAC address.
The error here is when the execution of join scripts fail. Then /var/log/univention-join/joined exists and prevents executing setup/join() again.
Comment 3 Alexander Kläser univentionstaff 2014-11-20 10:30:34 CET
(In reply to Florian Best from comment #2)
> (In reply to Alexander Kläser from comment #1)
> > At a different setup where an error occurred due to an computer account with
> > the same MAC address, I could start the join process again.
> well, in your case the join completely failed because the computer already
> exists in LDAP with the MAC address.
> The error here is when the execution of join scripts fail. Then
> /var/log/univention-join/joined exists and prevents executing setup/join()
> again.

So the error handling is not correct. It should be ok, to restart the join process completely, even though the system had been joined.
Comment 4 Florian Best univentionstaff 2014-11-20 10:33:50 CET
(In reply to Alexander Kläser from comment #3)
> (In reply to Florian Best from comment #2)
> > (In reply to Alexander Kläser from comment #1)
> > > At a different setup where an error occurred due to an computer account with
> > > the same MAC address, I could start the join process again.
> > well, in your case the join completely failed because the computer already
> > exists in LDAP with the MAC address.
> > The error here is when the execution of join scripts fail. Then
> > /var/log/univention-join/joined exists and prevents executing setup/join()
> > again.
> 
> So the error handling is not correct. It should be ok, to restart the join
> process completely, even though the system had been joined.
yes, i think so. I guess the check was there because in UCS3.2 we didn't have the wizard flavor and we differentiated the wizard-mode by checking for the joined file.
Comment 5 Florian Best univentionstaff 2014-11-24 12:44:25 CET
*** Bug 34998 has been marked as a duplicate of this bug. ***
Comment 6 Florian Best univentionstaff 2015-07-01 17:39:32 CEST
Created attachment 6992 [details]
Screenshot

Stumbled on this again. Philipp told also that this happened during the technical training.
Comment 7 Florian Best univentionstaff 2015-07-01 18:01:17 CEST
diff --git a/ucs-4.0-2/base/univention-system-setup/umc/python/setup/__init__.py b/ucs-4.0-2/base/univention-system-setup/umc/python/setup/__init__.py
index f63fc03..22afd55 100644
--- a/ucs-4.0-2/base/univention-system-setup/umc/python/setup/__init__.py
+++ b/ucs-4.0-2/base/univention-system-setup/umc/python/setup/__init__.py
@@ -235,8 +235,6 @@ def join(self, values=None, username=None, password=None):
                # determine new system role
                oldrole = orgValues.get('server/role', '')
                newrole = values.get('server/role', oldrole)
-               if orgValues.get('joined'):
-                       raise Exception(_('Already joined systems cannot be joined.'))
 
                def _thread(obj, username, password):
                        # acquire the lock until the scripts have been executed
Comment 8 Florian Best univentionstaff 2015-07-20 14:30:42 CEST
*** Bug 38987 has been marked as a duplicate of this bug. ***
Comment 9 Arvid Requate univentionstaff 2015-11-05 13:10:50 CET
Seen again during UCS 4.1-0 product tests (no surprise).
Comment 10 Alexander Kläser univentionstaff 2016-04-11 16:21:27 CEST
Along with Bug 40046, the check for an already joined system has been removed.

*** This bug has been marked as a duplicate of bug 40046 ***
Comment 11 Alexander Kläser univentionstaff 2016-04-11 16:22:26 CEST
*** Bug 39648 has been marked as a duplicate of this bug. ***