Bug 44957 - appcenter/docker/progress: TypeError: execv() arg 2 must contain only strings
appcenter/docker/progress: TypeError: execv() arg 2 must contain only strings
Status: NEW
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: App Center maintainers
App Center maintainers
:
: 47036 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-07 16:48 CEST by Florian Best
Modified: 2020-07-01 09:46 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 6: Setup Problem: Issue for the setup process
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.103
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2018061221000681, 2018051921000357, 2017121621000243, 2017070321000018, 2018051921000375
Bug group (optional): External feedback
Max CVSS v3 score:
best: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2017-07-07 16:48:30 CEST
Version: 4.1-4 errata435 (Vahr)

Execution of command 'appcenter/docker/progress' has failed:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 281, in execute
    function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 318, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 462, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 284, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/mixins.py", line 149, in progress
    ret = progress_obj.poll()
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 309, in _thread
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 462, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 284, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 371, in invoke_docker
    result['success'] = action.call(app=app, username=self.username, password=self.password, **kwargs)
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 196, in call
    return obj.call_with_namespace(namespace)
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 202, in call_with_namespace
    result = self.main(namespace)
  File "%PY2.7%/univention/appcenter/actions/install.py", line 67, in main
    return self.do_it(args)
  File "%PY2.7%/univention/appcenter/actions/install_base.py", line 109, in do_it
    self._do_it(app, args)
  File "%PY2.7%/univention/appcenter/actions/docker_install.py", line 65, in _do_it
    ret = super(Install, self)._do_it(app, args)
  File "%PY2.7%/univention/appcenter/actions/install.py", line 82, in _do_it
    self._register_attributes(app, args)
  File "%PY2.7%/univention/appcenter/actions/register.py", line 217, in _register_attributes
    schema_obj.register(schema_file, opts, udm_passthrough_options)
  File "%PY2.7%/univention/lib/ldap_extension.py", line 178, in register
    rc, self.object_dn, stdout = self.udm_find_object_dn()
  File "%PY2.7%/univention/lib/ldap_extension.py", line 99, in udm_find_object_dn
    rc, stdout = self.udm_find_object()
  File "%PY2.7%/univention/lib/ldap_extension.py", line 92, in udm_find_object
    p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
    raise child_exception
TypeError: execv() arg 2 must contain only strings
Comment 1 Johannes Keiser univentionstaff 2018-01-19 15:52:10 CET
Reported again:  Version: 4.2-3 errata254 (Lesum
Comment 2 Johannes Keiser univentionstaff 2018-05-25 20:18:08 CEST
Reported again: Version: 4.3-0 errata84 (Neustadt)

Internal server error during "appcenter/docker/progress".
Request: appcenter/docker/progress

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 253, in execute
    function.__func__(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 318, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 192, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/mixins.py", line 149, in progress
    ret = progress_obj.poll()
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 309, in _thread
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 192, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 426, in invoke_docker
    result['success'] = action.call(app=app, username=self.username, password=self.password, **kwargs)
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 220, in call
    return obj.call_with_namespace(namespace)
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 226, in call_with_namespace
    result = self.main(namespace)
  File "%PY2.7%/univention/appcenter/actions/install.py", line 73, in main
    return self.do_it(args)
  File "%PY2.7%/univention/appcenter/actions/install_base.py", line 105, in do_it
    self._do_it(app, args)
  File "%PY2.7%/univention/appcenter/actions/docker_install.py", line 63, in _do_it
    ret = super(Install, self)._do_it(app, args)
  File "%PY2.7%/univention/appcenter/actions/install.py", line 88, in _do_it
    self._register_attributes(app, args)
  File "%PY2.7%/univention/appcenter/actions/register.py", line 216, in _register_attributes
    schema_obj.register(schema_file, opts, udm_passthrough_options)
  File "%PY2.7%/univention/lib/ldap_extension.py", line 178, in register
    rc, self.object_dn, stdout = self.udm_find_object_dn()
  File "%PY2.7%/univention/lib/ldap_extension.py", line 99, in udm_find_object_dn
    rc, stdout = self.udm_find_object()
  File "%PY2.7%/univention/lib/ldap_extension.py", line 92, in udm_find_object
    p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
TypeError: execv() arg 2 must contain only strings
Comment 3 Johannes Keiser univentionstaff 2018-07-20 17:43:33 CEST
Reported again:
Version: 4.3-1 errata112 (Neustadt)

Internal server error during "appcenter/docker/progress".
Request: appcenter/docker/progress

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 253, in execute
    function.__func__(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 318, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 192, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/mixins.py", line 149, in progress
    ret = progress_obj.poll()
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 309, in _thread
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 192, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 426, in invoke_docker
    result['success'] = action.call(app=app, username=self.username, password=self.password, **kwargs)
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 220, in call
    return obj.call_with_namespace(namespace)
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 226, in call_with_namespace
    result = self.main(namespace)
  File "%PY2.7%/univention/appcenter/actions/install.py", line 73, in main
    return self.do_it(args)
  File "%PY2.7%/univention/appcenter/actions/install_base.py", line 107, in do_it
    self._do_it(app, args)
  File "%PY2.7%/univention/appcenter/actions/docker_install.py", line 63, in _do_it
    ret = super(Install, self)._do_it(app, args)
  File "%PY2.7%/univention/appcenter/actions/install.py", line 88, in _do_it
    self._register_attributes(app, args)
  File "%PY2.7%/univention/appcenter/actions/register.py", line 216, in _register_attributes
    schema_obj.register(schema_file, opts, udm_passthrough_options)
  File "%PY2.7%/univention/lib/ldap_extension.py", line 178, in register
    rc, self.object_dn, stdout = self.udm_find_object_dn()
  File "%PY2.7%/univention/lib/ldap_extension.py", line 99, in udm_find_object_dn
    rc, stdout = self.udm_find_object()
  File "%PY2.7%/univention/lib/ldap_extension.py", line 92, in udm_find_object
    p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
TypeError: execv() arg 2 must contain only strings

Role: domaincontroller_master
Comment 4 Florian Best univentionstaff 2019-07-25 14:59:53 CEST
*** Bug 47036 has been marked as a duplicate of this bug. ***
Comment 5 Florian Best univentionstaff 2020-07-01 09:46:43 CEST
This is an appcenter error. The appcenter passes None in self.udm_passthrough_options.

Patch?:

diff --git a/management/univention-appcenter/python/appcenter/actions/register.py b/management/univention-appcenter/python/appcenter/actions/register.py
index d70a8b877c..3e761095c1 100644
--- a/management/univention-appcenter/python/appcenter/actions/register.py
+++ b/management/univention-appcenter/python/appcenter/actions/register.py
@@ -218,6 +218,8 @@ class Register(CredentialsAction):
                                if app.automatic_schema_creation:
                                        schema_obj = UniventionLDAPSchema(ucr_instance())
                                        userdn = self._get_userdn(args)
+                                       if userdn is None:
+                                               raise RegisterSchemaFileFailed('could not detect user dn')
                                        udm_passthrough_options = ['--binddn', userdn, '--bindpwdfile', password_file]
                                        opts = Values()
                                        opts.packagename = 'appcenter-app-%s' % app.id