Project

General

Profile

Bug #19325

TypeError: cannot concatenate 'str' and 'ReconfigError' objects when error on attributes entry-condor_tarball not matched in the glideinWMS.xml file

Added by Lorena Lobato Pardavila almost 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Start date:
03/07/2018
Due date:
% Done:

0%

Estimated time:
First Occurred:
Occurs In:
Stakeholders:
Duration:

Description

Context: A collateral error was found out when manipulating entries configuration in the glideinWMS.xml file from a Factory test.

Details: When there is entry attribute - condor_tarball attribute not matched in the glideinWMS.xml and any service is being activated, a concatenation error appears in the background related to the code.

Example: Reconfiguration in the Factory test that was created (fermicloud137.fnal.gov)

[root@fermicloud137 gwms-factory]# /usr/sbin/gwms-factory reconfig
Using default factory config file: /etc/gwms-factory/glideinWMS.xml
Reconfiguring the factoryCondor (version=default, os=rhel6, arch=default) for entry ITB_FC_CE2 could not be resolved from <glidein><condor_tarballs>...</condor_tarballs></glidein> configuration.
Traceback (most recent call last):
  File "/sbin/reconfig_glidein", line 251, in <module>
    print2(re)
  File "/sbin/reconfig_glidein", line 41, in print2
    journal.send( message )
  File "/usr/lib64/python2.7/site-packages/systemd/journal.py", line 391, in send
    args = ['MESSAGE=' + MESSAGE]
TypeError: cannot concatenate 'str' and 'ReconfigError' objects
                                                           [FAILED]

Action: Need to be investigated and solved.

History

#1 Updated by Lorena Lobato Pardavila almost 2 years ago

  • Description updated (diff)

#2 Updated by Marco Mambelli almost 2 years ago

  • Assignee set to Lorena Lobato Pardavila
  • Target version set to v3_2_23

#3 Updated by Lorena Lobato Pardavila almost 2 years ago

  • Status changed from New to Assigned

#4 Updated by Lorena Lobato Pardavila almost 2 years ago

  • Reproduction Steps:

To reproduce the problem and have clear in which use case this occurs, any of the attributes need to be changed in etc/gwms-factory/glideinWMS either for factory el6 or el7.

  • Workflow:
    • Have tried changing different parameters in order to identify which is the pattern that trigger this error. * Have tried to change the OS when architecture is “x86” or “default” and even it was changed, the problem is when “version=default”. * The error appears in el7 and NOT in el6.
  • Test machines
    • As it's on el7, I won't be using gwms-dev-factory(el6). Dennis added me in .k5login for fermicloud036 factory and frontend=*fermicloud141*. The two CEs right now are fermicloud025 and fermicloud121, no outside access. * We should see the errors in: /var/log/gwms-factory/server/factory/factory.err.log

#5 Updated by Lorena Lobato Pardavila almost 2 years ago

  • Status changed from Assigned to Feedback
  • Assignee changed from Lorena Lobato Pardavila to Marco Mambelli
  • Problem: As specified previously, the problems occurs on el7 and it's that message can be either of type string or of type Exception.
  • Solution: The fix needs to go to both creation/reconfig_frontend and creation/reconfig_glidein

They both have the following definition near the top:

Replace

try: # necessary because systemd is not on rhel6
  from systemd import journal
  def print2( message ):
    print message
    journal.send( message )

By

try: # necessary because systemd is not on rhel6
  from systemd import journal
  def print2( message ):

    message2 = str(message)

    print message2
    journal.send( message2 )

*Branch: v3/19325

#6 Updated by Lorena Lobato Pardavila over 1 year ago

  • Assignee changed from Marco Mambelli to Lorena Lobato Pardavila

After the feedback, I have updated the branch

commit bc6df2eadaf242d498d45501bcc036d6fefd172d (HEAD -> v3/19325, origin/v3/19325)
Author: Lorena Lobato <>
Date: Tue Apr 24 14:30:13 2018 -0500

Corrected empty lines around the string assignment

Ready to merge

#7 Updated by Lorena Lobato Pardavila over 1 year ago

  • Status changed from Feedback to Closed

Merged into branch_v3_2

#8 Updated by Marco Mambelli over 1 year ago

  • Target version changed from v3_2_23 to v3_4_0

#9 Updated by Marco Mambelli over 1 year ago

  • Status changed from Closed to Resolved

#10 Updated by Marco Mambelli over 1 year ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF